-
Notifications
You must be signed in to change notification settings - Fork 455
[LWD] feat(desktop): hide operations list in portfolio when ff on #15612
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "ledger-live-desktop": minor | ||
| --- | ||
|
|
||
| hide Operations List in Portfolio when FF is on for new TX History |
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -26,13 +26,15 @@ export const PortfolioView = memo(function PortfolioView({ | |||||||
| shouldDisplayGraphRework, | ||||||||
| shouldDisplayQuickActionCtas, | ||||||||
| shouldDisplayAssetSection, | ||||||||
| shouldDisplayOperationsList, | ||||||||
| isWallet40Enabled, | ||||||||
| accounts, | ||||||||
| filterOperations, | ||||||||
| t, | ||||||||
| isClearCacheBannerVisible, | ||||||||
| }: PortfolioViewModelResult) { | ||||||||
|
Comment on lines
26
to
35
|
||||||||
| const shouldDisplayAddAccountCta = totalAccounts === 0 && isWallet40Enabled; | ||||||||
| const shouldRenderLegacyOperationsList = !shouldDisplayOperationsList && totalOperations > 0; | ||||||||
|
|
||||||||
| return ( | ||||||||
| <> | ||||||||
|
|
@@ -48,7 +50,7 @@ export const PortfolioView = memo(function PortfolioView({ | |||||||
| /> | ||||||||
| <div id="portfolio-container" data-testid="portfolio-container" className="flex flex-col"> | ||||||||
| {/* Main content area */} | ||||||||
| <div className="flex flex-1 flex-col gap-32"> | ||||||||
| <div className="flex flex-1 flex-col gap-32 pb-32"> | ||||||||
| <div className="flex flex-col gap-24"> | ||||||||
| <PageHeader title={t("portfolio.title")} /> | ||||||||
| {shouldDisplayGraphRework && <Balance />} | ||||||||
|
|
@@ -67,7 +69,7 @@ export const PortfolioView = memo(function PortfolioView({ | |||||||
| {shouldDisplayAddAccountCta && <AddAccount />} | ||||||||
| {shouldDisplayAssetSection && <CryptoAddressesBanner />} | ||||||||
|
|
||||||||
| {totalOperations > 0 && ( | ||||||||
| {shouldRenderLegacyOperationsList && ( | ||||||||
| <OperationsList | ||||||||
|
||||||||
| <OperationsList | |
| <OperationsList | |
| data-testid="portfolio-operations-list" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldDisplayOperationsListis destructured without a default. In non-ViewModel usages (notably tests that spreaddefaultProps), this can beundefined, which currently behaves asfalseand unintentionally renders the operations list. Consider providing a default (shouldDisplayOperationsList = false) to keep behavior deterministic when the prop is omitted.