From bedcbe1204f2d12d229ad619427886340e5fd6a6 Mon Sep 17 00:00:00 2001 From: Jon Tzeng Date: Mon, 18 Nov 2024 16:00:39 -0800 Subject: [PATCH 1/4] Fix receive flip input to default to fiat entry --- src/__tests__/scenes/__snapshots__/RequestScene.test.tsx.snap | 2 +- src/components/scenes/RequestScene.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/__tests__/scenes/__snapshots__/RequestScene.test.tsx.snap b/src/__tests__/scenes/__snapshots__/RequestScene.test.tsx.snap index 9a4c38e671c..68f2fcef740 100644 --- a/src/__tests__/scenes/__snapshots__/RequestScene.test.tsx.snap +++ b/src/__tests__/scenes/__snapshots__/RequestScene.test.tsx.snap @@ -191,7 +191,7 @@ exports[`Request should render with loaded props 1`] = ` marginRem={0} > Date: Mon, 18 Nov 2024 16:28:41 -0800 Subject: [PATCH 2/4] Fix default home/assets screen logic Got broken in the navigation upgrade --- src/actions/LoginActions.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/actions/LoginActions.tsx b/src/actions/LoginActions.tsx index a75b475e12e..9488b05aa64 100644 --- a/src/actions/LoginActions.tsx +++ b/src/actions/LoginActions.tsx @@ -120,11 +120,12 @@ export function initializeAccount(navigation: NavigationBase, account: EdgeAccou performance.mark('loginEnd', { detail: { isNewAccount: newAccount } }) } else { + const { defaultScreen } = getDeviceSettings() rootNavigation.replace('edgeApp', { screen: 'edgeAppStack', params: { screen: 'edgeTabs', - params: { screen: 'home' } + params: defaultScreen === 'home' ? { screen: 'home' } : { screen: 'walletsTab', params: { screen: 'walletList' } } } }) referralPromise.catch(() => console.log(`Failed to load account referral info`)) From 7ed490ba78443083fc145e455c33398e789ece03 Mon Sep 17 00:00:00 2001 From: Jon Tzeng Date: Fri, 22 Nov 2024 14:23:09 -0800 Subject: [PATCH 3/4] Remove autofocus from `WalletListModal` --- .../modals/__snapshots__/WalletListModal.test.tsx.snap | 2 +- src/components/modals/WalletListModal.tsx | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/__tests__/modals/__snapshots__/WalletListModal.test.tsx.snap b/src/__tests__/modals/__snapshots__/WalletListModal.test.tsx.snap index 486a9a9424f..807061b8050 100644 --- a/src/__tests__/modals/__snapshots__/WalletListModal.test.tsx.snap +++ b/src/__tests__/modals/__snapshots__/WalletListModal.test.tsx.snap @@ -353,7 +353,7 @@ exports[`WalletListModal should render with loading props 1`] = ` } } accessible={true} - autoFocus={true} + autoFocus={false} disableAnimation={ { "value": 0, diff --git a/src/components/modals/WalletListModal.tsx b/src/components/modals/WalletListModal.tsx index 1f9b96f7add..8d7e0663594 100644 --- a/src/components/modals/WalletListModal.tsx +++ b/src/components/modals/WalletListModal.tsx @@ -213,7 +213,6 @@ export function WalletListModal(props: Props) { {headerTitle} Date: Tue, 19 Nov 2024 16:55:41 -0800 Subject: [PATCH 4/4] Add "Add Wallet" button to `WalletListScene` --- CHANGELOG.md | 4 ++++ src/components/scenes/WalletListScene.tsx | 13 +++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c2995909bf4..8a270d16d0d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,11 @@ ## 4.17.2 +- added: "Add Wallet" button to bottom of `WalletListScene` - fixed: (Zcash/Pirate) Fixed android build issues +- fixed: Default home/assets scene post-login based on last visited scene +- fixed: Receive flip input default currency selection +- removed: Keyboard autofocus from `WalletListModal` ## 4.17.1 diff --git a/src/components/scenes/WalletListScene.tsx b/src/components/scenes/WalletListScene.tsx index e62ac830dc5..bcdf2da0278 100644 --- a/src/components/scenes/WalletListScene.tsx +++ b/src/components/scenes/WalletListScene.tsx @@ -86,6 +86,10 @@ export function WalletListScene(props: Props) { navigation.navigate('walletRestore') }) + const handlePressAddWallets = useHandler(() => { + navigation.navigate('createWalletSelectCrypto', {}) + }) + const tokenSupportingWalletIds = React.useMemo(() => { const walletIds: string[] = [] for (const wallet of Object.values(account.currencyWallets)) { @@ -129,8 +133,13 @@ export function WalletListScene(props: Props) { if (isSearching && tokenSupportingWalletIds.length > 0) { return } - return - }, [handlePressAddEditToken, handlePressRestoreWallets, tokenSupportingWalletIds, isSearching]) + return ( + + ) + }, [isSearching, tokenSupportingWalletIds.length, handlePressAddWallets, handlePressRestoreWallets, handlePressAddEditToken]) const renderFooter: FooterRender = React.useCallback( sceneWrapperInfo => {