Skip to content

Commit fef43f5

Browse files
authored
fix: remove the staking portfolio persistence modal (#1572)
* feat: remove the staking portfolio persistence modal * test(extension): remove outdated step
1 parent bdf7d29 commit fef43f5

File tree

19 files changed

+6
-131
lines changed

19 files changed

+6
-131
lines changed

apps/browser-extension-wallet/src/features/delegation/components/MultiDelegationStakingPopup.tsx

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import { useWalletActivities } from '@hooks/useWalletActivities';
2222
import {
2323
MULTIDELEGATION_DAPP_COMPATIBILITY_LS_KEY,
2424
MULTIDELEGATION_FIRST_VISIT_LS_KEY,
25-
MULTIDELEGATION_FIRST_VISIT_SINCE_PORTFOLIO_PERSISTENCE_LS_KEY,
2625
STAKING_BROWSER_PREFERENCES_LS_KEY
2726
} from '@utils/constants';
2827
import { withSignTxConfirmation } from '@lib/wallet-api-ui';
@@ -104,10 +103,6 @@ export const MultiDelegationStakingPopup = (): JSX.Element => {
104103
);
105104
const [multidelegationDAppCompatibility, { updateLocalStorage: setMultidelegationDAppCompatibility }] =
106105
useLocalStorage(MULTIDELEGATION_DAPP_COMPATIBILITY_LS_KEY, true);
107-
const [
108-
multidelegationFirstVisitSincePortfolioPersistence,
109-
{ updateLocalStorage: setMultidelegationFirstVisitSincePortfolioPersistence }
110-
] = useLocalStorage(MULTIDELEGATION_FIRST_VISIT_SINCE_PORTFOLIO_PERSISTENCE_LS_KEY, true);
111106

112107
const [stakingBrowserPreferencesPersistence, { updateLocalStorage: setStakingBrowserPreferencesPersistence }] =
113108
useLocalStorage(STAKING_BROWSER_PREFERENCES_LS_KEY, DEFAULT_STAKING_BROWSER_PREFERENCES);
@@ -127,14 +122,11 @@ export const MultiDelegationStakingPopup = (): JSX.Element => {
127122
stakingBrowserPreferencesPersistence,
128123
setStakingBrowserPreferencesPersistence,
129124
multidelegationFirstVisit,
130-
triggerMultidelegationFirstVisit: () => setMultidelegationFirstVisit(false),
131-
multidelegationDAppCompatibility,
132-
triggerMultidelegationDAppCompatibility: () => setMultidelegationDAppCompatibility(false),
133-
multidelegationFirstVisitSincePortfolioPersistence,
134-
triggerMultidelegationFirstVisitSincePortfolioPersistence: () => {
125+
triggerMultidelegationFirstVisit: () => {
135126
setMultidelegationFirstVisit(false);
136-
setMultidelegationFirstVisitSincePortfolioPersistence(false);
137127
},
128+
multidelegationDAppCompatibility,
129+
triggerMultidelegationDAppCompatibility: () => setMultidelegationDAppCompatibility(false),
138130
expandStakingView: (urlSearchParams?: string) =>
139131
handleOpenBrowser({ section: BrowserViewSections.STAKING, urlSearchParams }),
140132
balancesBalance: balance,

apps/browser-extension-wallet/src/hooks/__tests__/useWalletManager.test.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -580,8 +580,7 @@ describe('Testing useWalletManager hook', () => {
580580
'hideBalance',
581581
'isForgotPasswordFlow',
582582
'multidelegationFirstVisit',
583-
'isMultiDelegationDAppCompatibilityModalVisible',
584-
'multidelegationFirstVisitSincePortfolioPersistence'
583+
'isMultiDelegationDAppCompatibilityModalVisible'
585584
]
586585
});
587586
expect(clearBackgroundStorage).toBeCalledWith({

apps/browser-extension-wallet/src/hooks/useWalletManager.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -698,8 +698,7 @@ export const useWalletManager = (): UseWalletManager => {
698698
'hideBalance',
699699
'isForgotPasswordFlow',
700700
'multidelegationFirstVisit',
701-
'isMultiDelegationDAppCompatibilityModalVisible',
702-
'multidelegationFirstVisitSincePortfolioPersistence'
701+
'isMultiDelegationDAppCompatibilityModalVisible'
703702
];
704703

705704
if (isForgotPasswordFlow) {

apps/browser-extension-wallet/src/types/local-storage.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ export interface ILocalStorage {
5959
isForgotPasswordFlow?: boolean;
6060
multidelegationFirstVisit?: boolean;
6161
isMultiDelegationDAppCompatibilityModalVisible?: boolean;
62-
multidelegationFirstVisitSincePortfolioPersistence?: boolean;
6362
unconfirmedTransactions: UnconfirmedTransaction[];
6463
stakingBrowserPreferences: StakingBrowserPreferences;
6564
showPinExtension?: boolean;

apps/browser-extension-wallet/src/utils/constants.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ export const cardanoCoin: Wallet.CoinId = {
1616
symbol: CARDANO_COIN_SYMBOL[Wallet.Cardano.NetworkId.Mainnet]
1717
};
1818

19-
export const EPOCH_DURATION_DAYS = 5;
20-
2119
export const MIN_COIN_TO_SEND = 1;
2220

2321
export const COLLATERAL_ADA_AMOUNT = 5;
@@ -114,8 +112,6 @@ export const SEND_NFT_DEFAULT_AMOUNT = '1';
114112

115113
export const COINGECKO_URL = 'https://www.coingecko.com';
116114

117-
export const MULTIDELEGATION_FIRST_VISIT_SINCE_PORTFOLIO_PERSISTENCE_LS_KEY =
118-
'multidelegationFirstVisitSincePortfolioPersistence';
119115
export const MULTIDELEGATION_FIRST_VISIT_LS_KEY = 'multidelegationFirstVisit';
120116
export const MULTIDELEGATION_DAPP_COMPATIBILITY_LS_KEY = 'isMultiDelegationDAppCompatibilityModalVisible';
121117
export const STAKING_BROWSER_PREFERENCES_LS_KEY = 'stakingBrowserPreferences';

apps/browser-extension-wallet/src/views/browser-view/features/staking/components/StakingContainer.tsx

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import { useBalances, useCustomSubmitApi, useFetchCoinPrice, useLocalStorage, us
1515
import {
1616
MULTIDELEGATION_DAPP_COMPATIBILITY_LS_KEY,
1717
MULTIDELEGATION_FIRST_VISIT_LS_KEY,
18-
MULTIDELEGATION_FIRST_VISIT_SINCE_PORTFOLIO_PERSISTENCE_LS_KEY,
1918
STAKING_BROWSER_PREFERENCES_LS_KEY
2019
} from '@utils/constants';
2120
import { useDelegationStore } from '@src/features/delegation/stores';
@@ -35,10 +34,6 @@ export const StakingContainer = (): React.ReactElement => {
3534
);
3635
const [multidelegationDAppCompatibility, { updateLocalStorage: setMultidelegationDAppCompatibility }] =
3736
useLocalStorage(MULTIDELEGATION_DAPP_COMPATIBILITY_LS_KEY, true);
38-
const [
39-
multidelegationFirstVisitSincePortfolioPersistence,
40-
{ updateLocalStorage: setMultidelegationFirstVisitSincePortfolioPersistence }
41-
] = useLocalStorage(MULTIDELEGATION_FIRST_VISIT_SINCE_PORTFOLIO_PERSISTENCE_LS_KEY, true);
4237
const sendAnalytics = useCallback(() => {
4338
// TODO implement analytics for the new flow
4439
const an = {
@@ -142,11 +137,6 @@ export const StakingContainer = (): React.ReactElement => {
142137
triggerMultidelegationFirstVisit: () => setMultidelegationFirstVisit(false),
143138
multidelegationDAppCompatibility,
144139
triggerMultidelegationDAppCompatibility: () => setMultidelegationDAppCompatibility(false),
145-
multidelegationFirstVisitSincePortfolioPersistence,
146-
triggerMultidelegationFirstVisitSincePortfolioPersistence: () => {
147-
setMultidelegationFirstVisit(false);
148-
setMultidelegationFirstVisitSincePortfolioPersistence(false);
149-
},
150140
walletAddress,
151141
walletName,
152142
currentChain,

packages/e2e-tests/src/features/MultidelegationDelegatedFundsMultiplePoolsPopup.feature

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,12 @@ Feature: Staking Page - Delegated funds - Multiple pools - Popup View
66

77
@LW-8330
88
Scenario: Popup View - Delegation card displays correct data
9-
And I disable showing Multidelegation persistence banner
109
When I navigate to Staking popup page
1110
Then I see Delegation title displayed for multidelegation
1211
And I see Delegation card displaying correct data
1312

1413
@LW-8338
1514
Scenario: Popup View - Delegated pools cards are present
16-
And I disable showing Multidelegation persistence banner
1715
When I navigate to Staking popup page
1816
And I see Delegation pool cards are displayed
1917

packages/e2e-tests/src/features/MultidelegationDelegatedFundsSinglePoolPopup.feature

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,12 @@ Feature: Staking Page - Delegated funds - Single pool - Popup View
66

77
@LW-8330
88
Scenario: Popup View - Delegation card displays correct data
9-
And I disable showing Multidelegation persistence banner
109
When I navigate to Staking popup page
1110
Then I see Delegation title displayed for multidelegation
1211
And I see Delegation card displaying correct data
1312

1413
@LW-8338
1514
Scenario: Popup View - Delegated pools cards are present
16-
And I disable showing Multidelegation persistence banner
1715
When I navigate to Staking popup page
1816
And I see Delegation pool cards are displayed
1917

packages/e2e-tests/src/features/NetworkSwitchingExtended.feature

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ Feature: LW: Network Switching - extended view
44
Background:
55
Given Wallet is synced
66
And I disable showing Multidelegation beta banner
7-
And I disable showing Multidelegation persistence banner
87

98
@LW-3226
109
Scenario Outline: Extended View - Currency symbol is correct when on different network - <network> <ticker>

packages/e2e-tests/src/fixture/localStorageInitializer.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,6 @@ class LocalStorageInitializer {
3636
await localStorageManager.setItem('multidelegationFirstVisit', 'false');
3737
};
3838

39-
disableShowingMultidelegationPersistenceBanner = async () => {
40-
await localStorageManager.setItem('multidelegationFirstVisitSincePortfolioPersistence', 'false');
41-
};
42-
4339
enableShowingAnalyticsBanner = async () => {
4440
await localStorageManager.setItem('analyticsStatus', '');
4541
};

0 commit comments

Comments
 (0)