Skip to content

Commit 9704d70

Browse files
feat(desktop): hide operations list in portfolio when ff on
1 parent 1bf4e7e commit 9704d70

3 files changed

Lines changed: 13 additions & 2 deletions

File tree

.changeset/thick-bananas-talk.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"ledger-live-desktop": minor
3+
"@ledgerhq/live-common": minor
4+
---
5+
6+
hide operationList in Portfolio when FF is active

apps/ledger-live-desktop/src/mvvm/features/Portfolio/PortfolioView.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,15 @@ export const PortfolioView = memo(function PortfolioView({
2626
shouldDisplayGraphRework,
2727
shouldDisplayQuickActionCtas,
2828
shouldDisplayAssetSection,
29+
shouldDisplayOperationsList,
2930
isWallet40Enabled,
3031
accounts,
3132
filterOperations,
3233
t,
3334
isClearCacheBannerVisible,
3435
}: PortfolioViewModelResult) {
3536
const shouldDisplayAddAccountCta = totalAccounts === 0 && isWallet40Enabled;
37+
const shouldDisplayOperationsListCondition = !shouldDisplayOperationsList && totalOperations > 0;
3638

3739
return (
3840
<>
@@ -48,7 +50,7 @@ export const PortfolioView = memo(function PortfolioView({
4850
/>
4951
<div id="portfolio-container" data-testid="portfolio-container" className="flex flex-col">
5052
{/* Main content area */}
51-
<div className="flex flex-1 flex-col gap-32">
53+
<div className="flex flex-1 flex-col gap-32 pb-32">
5254
<div className="flex flex-col gap-24">
5355
<PageHeader title={t("portfolio.title")} />
5456
{shouldDisplayGraphRework && <Balance />}
@@ -67,7 +69,7 @@ export const PortfolioView = memo(function PortfolioView({
6769
{shouldDisplayAddAccountCta && <AddAccount />}
6870
{shouldDisplayAssetSection && <CryptoAddressesBanner />}
6971

70-
{totalOperations > 0 && (
72+
{shouldDisplayOperationsListCondition && (
7173
<OperationsList
7274
accounts={accounts}
7375
title={t("dashboard.recentActivity")}

apps/ledger-live-desktop/src/mvvm/features/Portfolio/hooks/usePortfolioViewModel.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export interface PortfolioViewModelResult {
2020
readonly shouldDisplayGraphRework: boolean;
2121
readonly shouldDisplayQuickActionCtas: boolean;
2222
readonly shouldDisplayAssetSection: boolean;
23+
readonly shouldDisplayOperationsList: boolean;
2324
readonly isWallet40Enabled: boolean;
2425
readonly filterOperations: (operation: Operation, account: AccountLike) => boolean;
2526
readonly accounts: AccountLike[];
@@ -35,6 +36,7 @@ export const usePortfolioViewModel = (): PortfolioViewModelResult => {
3536
shouldDisplayGraphRework,
3637
shouldDisplayQuickActionCtas,
3738
shouldDisplayAssetSection,
39+
shouldDisplayOperationsList,
3840
isEnabled: isWallet40Enabled,
3941
} = useWalletFeaturesConfig("desktop");
4042
const { t } = useTranslation();
@@ -79,6 +81,7 @@ export const usePortfolioViewModel = (): PortfolioViewModelResult => {
7981
shouldDisplayGraphRework,
8082
shouldDisplayQuickActionCtas,
8183
shouldDisplayAssetSection,
84+
shouldDisplayOperationsList,
8285
isWallet40Enabled,
8386
filterOperations,
8487
accounts,

0 commit comments

Comments
 (0)