From 93bca725967948d3578e8759442cc1bb4f5f233c Mon Sep 17 00:00:00 2001 From: gregs Date: Tue, 10 Dec 2024 13:57:24 -0300 Subject: [PATCH 01/14] wallet groups --- src/languages/en_US.json | 8 + src/navigation/AddWalletNavigator.tsx | 11 ++ src/navigation/ChooseWalletGroup.tsx | 225 ++++++++++++++++++++++++++ src/navigation/routesNames.ts | 1 + src/screens/AddWalletSheet.tsx | 114 +------------ 5 files changed, 248 insertions(+), 111 deletions(-) create mode 100644 src/navigation/ChooseWalletGroup.tsx diff --git a/src/languages/en_US.json b/src/languages/en_US.json index ab043d0691e..8ef05e71dd9 100644 --- a/src/languages/en_US.json +++ b/src/languages/en_US.json @@ -2606,6 +2606,14 @@ "my_account_address": "My account address:", "network_title": "Network", "new": { + "choose_wallet_group": { + "title": "Choose Wallet Group", + "description": "Choose the wallet group you’d like to create a new wallet within, or create a new one." + }, + "new_wallet_group": { + "title": "New Wallet Group", + "description": "Create a new wallet group" + }, "add_wallet_sheet": { "options": { "cloud": { diff --git a/src/navigation/AddWalletNavigator.tsx b/src/navigation/AddWalletNavigator.tsx index 30b617d7bbf..13794dacb22 100644 --- a/src/navigation/AddWalletNavigator.tsx +++ b/src/navigation/AddWalletNavigator.tsx @@ -7,6 +7,7 @@ import { ImportOrWatchWalletSheet, ImportOrWatchWalletSheetParams } from '@/scre import { BackgroundProvider } from '@/design-system'; import { RouteProp, useRoute } from '@react-navigation/native'; import { SimpleSheet } from '@/components/sheet/SimpleSheet'; +import { ChooseWalletGroup } from './ChooseWalletGroup'; const Swipe = createMaterialTopTabNavigator(); @@ -41,6 +42,16 @@ export const AddWalletNavigator = () => { }, }} /> + { + setScrollEnabled(true); + }, + }} + /> { + navigate(Routes.WALLET_SCREEN); + navigate(Routes.MODAL_SCREEN, { + actionType: 'Create', + asset: [], + isNewProfile: true, + onCloseModal: async (args: { name: string; color: number }) => { + if (!args) return; + try { + const { name, color } = args; + await createWallet({ color, name }); + await dispatch(walletsLoadState(profilesEnabled)); + // @ts-ignore + await initializeWallet(); + } catch (error) { + logger.error(new RainbowError('[AddWalletSheet]: Error while trying to add account'), { error }); + } + }, + profile: { color: null, name: `` }, + type: 'wallet_profile', + }); + }; + + return ( + + + + 􀅼 + + + + + {i18n.t(i18n.l.wallet.new.new_wallet_group.title)} + + + {i18n.t(i18n.l.wallet.new.new_wallet_group.description)} + + + + ); +} + +function AccountAvatar({ account, size }: { account: RainbowAccount; size: number }) { + const { colors } = useTheme(); + + if (account.image) { + return ; + } + + const backgroundColor = colors.avatarBackgrounds[account.color]; + const emoji = returnStringFirstEmoji(account.label) || profileUtils.addressHashedEmoji(account.address); + + return ( + + {emoji} + + ); +} + +function WalletGroup({ wallet }: { wallet: RainbowWallet }) { + const separatorSecondary = useForegroundColor('separatorSecondary'); + + const accounts = wallet.addresses; + + const { navigate } = useNavigation(); + const dispatch = useDispatch(); + const initializeWallet = useInitializeWallet(); + + const onAddToGroup = () => { + navigate(Routes.WALLET_SCREEN); + navigate(Routes.MODAL_SCREEN, { + actionType: 'Create', + asset: [], + isNewProfile: true, + onCloseModal: async (args: { name: string; color: number }) => { + if (!args) return; + try { + const { name, color } = args; + if (wallet.damaged) throw new Error('Wallet is damaged'); + const newWallets = await dispatch(createAccountForWallet(wallet.id, color, name)); + // @ts-ignore + await initializeWallet(); + // If this wallet was previously backed up to the cloud + // We need to update userData backup so it can be restored too + if (wallet.backedUp && wallet.backupType === WalletBackupTypes.cloud) { + try { + await backupUserDataIntoCloud({ wallets: newWallets }); + } catch (error) { + logger.error(new RainbowError('[AddWalletSheet]: Updating wallet userdata failed after new account creation'), { error }); + throw error; + } + } + } catch (e) { + logger.error(new RainbowError('[AddWalletSheet]: Error while trying to add account'), { + error: e, + }); + showWalletErrorAlert(); + } + }, + profile: { color: null, name: `` }, + type: 'wallet_profile', + }); + }; + + return ( + + + {accounts.map(account => ( + + ))} + + + + {removeFirstEmojiFromString(wallet.name)} + + + + {accounts[0].ens || formatAddressForDisplay(accounts[0].address, 4, 4)} + + {accounts.length > 1 && ( + + + {`+${accounts.length - 1}`} + + + )} + + + + ); +} + +export function ChooseWalletGroup() { + const { wallets } = useWallets(); + + if (!wallets) return; + + const groups = Object.values(wallets).filter(wallet => wallet.type === WalletTypes.mnemonic); + + return ( + + + {i18n.t(i18n.l.wallet.new.choose_wallet_group.title)} + + + {i18n.t(i18n.l.wallet.new.choose_wallet_group.description)} + + + + + {groups.map(wallet => ( + + ))} + + + ); +} diff --git a/src/navigation/routesNames.ts b/src/navigation/routesNames.ts index 96cc67fb146..10251e661b0 100644 --- a/src/navigation/routesNames.ts +++ b/src/navigation/routesNames.ts @@ -4,6 +4,7 @@ const Routes = { ADD_CASH_SCREEN_NAVIGATOR: 'AddCashSheetNavigator', ADD_CASH_SHEET: 'AddCashSheet', ADD_WALLET_NAVIGATOR: 'AddWalletNavigator', + CHOOSE_WALLET_GROUP: 'ChooseWalletGroup', ADD_WALLET_SHEET: 'AddWalletSheet', APP_ICON_UNLOCK_SHEET: 'AppIconUnlockSheet', AVATAR_BUILDER: 'AvatarBuilder', diff --git a/src/screens/AddWalletSheet.tsx b/src/screens/AddWalletSheet.tsx index 6021f7ad295..7aeee3fc6c4 100644 --- a/src/screens/AddWalletSheet.tsx +++ b/src/screens/AddWalletSheet.tsx @@ -3,37 +3,28 @@ import { AddWalletItem } from '@/components/add-wallet/AddWalletRow'; import { Box, globalColors, Inset } from '@/design-system'; import { useNavigation } from '@/navigation'; import Routes from '@/navigation/routesNames'; -import React, { useRef } from 'react'; +import React from 'react'; import * as i18n from '@/languages'; -import { HARDWARE_WALLETS, PROFILES, useExperimentalFlag } from '@/config'; +import { HARDWARE_WALLETS, useExperimentalFlag } from '@/config'; import { analytics, analyticsV2 } from '@/analytics'; import { InteractionManager, Linking } from 'react-native'; -import { createAccountForWallet, walletsLoadState } from '@/redux/wallets'; -import WalletBackupTypes from '@/helpers/walletBackupTypes'; -import { createWallet } from '@/model/wallet'; -import WalletTypes from '@/helpers/walletTypes'; import { logger, RainbowError } from '@/logger'; import WalletsAndBackup from '@/assets/WalletsAndBackup.png'; import CreateNewWallet from '@/assets/CreateNewWallet.png'; import PairHairwareWallet from '@/assets/PairHardwareWallet.png'; import ImportSecretPhraseOrPrivateKey from '@/assets/ImportSecretPhraseOrPrivateKey.png'; import WatchWalletIcon from '@/assets/watchWallet.png'; -import { captureException } from '@sentry/react-native'; -import { useDispatch } from 'react-redux'; import { - backupUserDataIntoCloud, getGoogleAccountUserData, GoogleDriveUserData, isCloudBackupAvailable, login, logoutFromGoogleDrive, } from '@/handlers/cloudBackup'; -import showWalletErrorAlert from '@/helpers/support'; import { cloudPlatform } from '@/utils/platform'; import { IS_ANDROID } from '@/env'; import { RouteProp, useRoute } from '@react-navigation/native'; import { WrappedAlert as Alert } from '@/helpers/alert'; -import { useInitializeWallet, useWallets } from '@/hooks'; const TRANSLATIONS = i18n.l.wallet.new.add_wallet_sheet; @@ -53,11 +44,6 @@ export const AddWalletSheet = () => { const { goBack, navigate } = useNavigation(); const hardwareWalletsEnabled = useExperimentalFlag(HARDWARE_WALLETS); - const profilesEnabled = useExperimentalFlag(PROFILES); - const dispatch = useDispatch(); - const initializeWallet = useInitializeWallet(); - const creatingWallet = useRef(); - const { isDamaged, selectedWallet, wallets } = useWallets(); const onPressCreate = async () => { try { @@ -66,102 +52,8 @@ export const AddWalletSheet = () => { type: 'new', }); analytics.track('Tapped "Create a new wallet"'); - if (creatingWallet.current) return; - creatingWallet.current = true; - // Show naming modal - InteractionManager.runAfterInteractions(() => { - goBack(); - }); - InteractionManager.runAfterInteractions(() => { - setTimeout(() => { - navigate(Routes.MODAL_SCREEN, { - actionType: 'Create', - asset: [], - isNewProfile: true, - onCancel: () => { - creatingWallet.current = false; - }, - onCloseModal: async (args: any) => { - if (args) { - const name = args?.name ?? ''; - const color = args?.color ?? null; - // Check if the selected wallet is the primary - let primaryWalletKey = selectedWallet.primary ? selectedWallet.id : null; - - // If it's not, then find it - !primaryWalletKey && - Object.keys(wallets as any).some(key => { - const wallet = wallets?.[key]; - if (wallet?.type === WalletTypes.mnemonic && wallet.primary) { - primaryWalletKey = key; - return true; - } - return false; - }); - - // If there's no primary wallet at all, - // we fallback to an imported one with a seed phrase - !primaryWalletKey && - Object.keys(wallets as any).some(key => { - const wallet = wallets?.[key]; - if (wallet?.type === WalletTypes.mnemonic && wallet.imported) { - primaryWalletKey = key; - return true; - } - return false; - }); - try { - // If we found it and it's not damaged use it to create the new account - if (primaryWalletKey && !wallets?.[primaryWalletKey].damaged) { - const newWallets = await dispatch(createAccountForWallet(primaryWalletKey, color, name)); - // @ts-ignore - await initializeWallet(); - // If this wallet was previously backed up to the cloud - // We need to update userData backup so it can be restored too - if (wallets?.[primaryWalletKey].backedUp && wallets[primaryWalletKey].backupType === WalletBackupTypes.cloud) { - try { - await backupUserDataIntoCloud({ wallets: newWallets }); - } catch (e) { - logger.error(new RainbowError('[AddWalletSheet]: Updating wallet userdata failed after new account creation'), { - error: e, - }); - throw e; - } - } - - // If doesn't exist, we need to create a new wallet - } else { - await createWallet({ - color, - name, - clearCallbackOnStartCreation: true, - }); - await dispatch(walletsLoadState(profilesEnabled)); - // @ts-ignore - await initializeWallet(); - } - } catch (e) { - logger.error(new RainbowError('[AddWalletSheet]: Error while trying to add account'), { - error: e, - }); - if (isDamaged) { - setTimeout(() => { - showWalletErrorAlert(); - }, 1000); - } - } - } - creatingWallet.current = false; - }, - profile: { - color: null, - name: ``, - }, - type: 'wallet_profile', - }); - }, 50); - }); + navigate(Routes.CHOOSE_WALLET_GROUP, {}); } catch (e) { logger.error(new RainbowError('[AddWalletSheet]: Error while trying to add account'), { error: e, From a745d295022c2c128b0c0829f30e3f1b155ee572 Mon Sep 17 00:00:00 2001 From: gregs Date: Tue, 10 Dec 2024 14:19:57 -0300 Subject: [PATCH 02/14] a --- src/navigation/ChooseWalletGroup.tsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/navigation/ChooseWalletGroup.tsx b/src/navigation/ChooseWalletGroup.tsx index 45f43428e2a..f11f8cdb788 100644 --- a/src/navigation/ChooseWalletGroup.tsx +++ b/src/navigation/ChooseWalletGroup.tsx @@ -31,7 +31,6 @@ function NewWalletGroup() { const initializeWallet = useInitializeWallet(); const onNewWallet = () => { - navigate(Routes.WALLET_SCREEN); navigate(Routes.MODAL_SCREEN, { actionType: 'Create', asset: [], @@ -110,7 +109,6 @@ function WalletGroup({ wallet }: { wallet: RainbowWallet }) { const initializeWallet = useInitializeWallet(); const onAddToGroup = () => { - navigate(Routes.WALLET_SCREEN); navigate(Routes.MODAL_SCREEN, { actionType: 'Create', asset: [], From d3105676fb3d99b8b8a22262fa6681818143fb92 Mon Sep 17 00:00:00 2001 From: gregs Date: Tue, 10 Dec 2024 20:18:18 -0300 Subject: [PATCH 03/14] ops --- src/navigation/ChooseWalletGroup.tsx | 55 ++++++++++++++++++++-------- 1 file changed, 39 insertions(+), 16 deletions(-) diff --git a/src/navigation/ChooseWalletGroup.tsx b/src/navigation/ChooseWalletGroup.tsx index f11f8cdb788..f652e81c7f2 100644 --- a/src/navigation/ChooseWalletGroup.tsx +++ b/src/navigation/ChooseWalletGroup.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { Box, Separator, Text, useForegroundColor } from '@/design-system'; -import { View, Text as NativeText } from 'react-native'; +import { View, Text as NativeText, Dimensions, InteractionManager } from 'react-native'; import chroma from 'chroma-js'; import { useInitializeWallet, useWallets } from '@/hooks'; import { PROFILES, useExperimentalFlag } from '@/config'; @@ -21,8 +21,10 @@ import { removeFirstEmojiFromString, returnStringFirstEmoji } from '@/helpers/em import { profileUtils } from '@/utils'; import * as i18n from '@/languages'; import showWalletErrorAlert from '@/helpers/support'; +import { ScrollView } from 'react-native-gesture-handler'; +import { BackButton } from '@/components/header'; -function NewWalletGroup() { +function NewWalletGroup({ numWalletGroups }: { numWalletGroups: number }) { const blue = useForegroundColor('blue'); const { navigate } = useNavigation(); @@ -30,11 +32,10 @@ function NewWalletGroup() { const dispatch = useDispatch(); const initializeWallet = useInitializeWallet(); - const onNewWallet = () => { + const onNewWalletGroup = () => { navigate(Routes.MODAL_SCREEN, { actionType: 'Create', - asset: [], - isNewProfile: true, + numWalletGroups, onCloseModal: async (args: { name: string; color: number }) => { if (!args) return; try { @@ -43,17 +44,18 @@ function NewWalletGroup() { await dispatch(walletsLoadState(profilesEnabled)); // @ts-ignore await initializeWallet(); + navigate(Routes.WALLET_SCREEN, {}, true); } catch (error) { logger.error(new RainbowError('[AddWalletSheet]: Error while trying to add account'), { error }); } }, profile: { color: null, name: `` }, - type: 'wallet_profile', + type: 'new_wallet_group', }); }; return ( - + - {accounts.map(account => ( + {accounts.slice(0, 4).map(account => ( ))} @@ -184,9 +187,13 @@ function WalletGroup({ wallet }: { wallet: RainbowWallet }) { } export function ChooseWalletGroup() { + const { goBack } = useNavigation(); const { wallets } = useWallets(); - if (!wallets) return; + if (!wallets) { + showWalletErrorAlert(); + return; + } const groups = Object.values(wallets).filter(wallet => wallet.type === WalletTypes.mnemonic); @@ -195,14 +202,26 @@ export function ChooseWalletGroup() { height="full" width="full" background="surfaceSecondary" - style={{ paddingHorizontal: 24, paddingTop: 72, gap: 20, alignItems: 'center' }} + style={{ paddingHorizontal: 24, gap: 20, alignItems: 'center', paddingBottom: 64 }} > + + + + 􀆉 + + + {i18n.t(i18n.l.wallet.new.choose_wallet_group.title)} {i18n.t(i18n.l.wallet.new.choose_wallet_group.description)} + + + + + - - - {groups.map(wallet => ( - - ))} + + + + + + {groups.map(wallet => ( + + ))} + ); From d1d29d16ee39a1e8cfce64a0f484e556e73fc632 Mon Sep 17 00:00:00 2001 From: gregs Date: Wed, 11 Dec 2024 12:05:38 -0300 Subject: [PATCH 04/14] ens --- src/navigation/ChooseWalletGroup.tsx | 5 ++--- src/utils/abbreviations.ts | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/navigation/ChooseWalletGroup.tsx b/src/navigation/ChooseWalletGroup.tsx index f652e81c7f2..35ae54a2fe8 100644 --- a/src/navigation/ChooseWalletGroup.tsx +++ b/src/navigation/ChooseWalletGroup.tsx @@ -14,7 +14,7 @@ import { logger, RainbowError } from '@/logger'; import { createAccountForWallet, walletsLoadState } from '@/redux/wallets'; import { createWallet, RainbowAccount, RainbowWallet } from '@/model/wallet'; import { ButtonPressAnimation } from '@/components/animations'; -import { formatAddressForDisplay } from '@/utils/abbreviations'; +import { abbreviateEnsForDisplay, formatAddressForDisplay } from '@/utils/abbreviations'; import { ImgixImage } from '@/components/images'; import { useTheme } from '@/theme'; import { removeFirstEmojiFromString, returnStringFirstEmoji } from '@/helpers/emojiHandler'; @@ -22,7 +22,6 @@ import { profileUtils } from '@/utils'; import * as i18n from '@/languages'; import showWalletErrorAlert from '@/helpers/support'; import { ScrollView } from 'react-native-gesture-handler'; -import { BackButton } from '@/components/header'; function NewWalletGroup({ numWalletGroups }: { numWalletGroups: number }) { const blue = useForegroundColor('blue'); @@ -165,7 +164,7 @@ function WalletGroup({ wallet }: { wallet: RainbowWallet }) { - {accounts[0].ens || formatAddressForDisplay(accounts[0].address, 4, 4)} + {abbreviateEnsForDisplay(accounts[0].ens) || formatAddressForDisplay(accounts[0].address, 4, 4)} {accounts.length > 1 && ( Date: Fri, 20 Dec 2024 08:51:36 -0300 Subject: [PATCH 05/14] design --- src/assets/CreateNewWalletGroup.png | Bin 0 -> 7141 bytes src/navigation/ChooseWalletGroup.tsx | 116 +++++++++++++-------------- 2 files changed, 57 insertions(+), 59 deletions(-) create mode 100644 src/assets/CreateNewWalletGroup.png diff --git a/src/assets/CreateNewWalletGroup.png b/src/assets/CreateNewWalletGroup.png new file mode 100644 index 0000000000000000000000000000000000000000..13a91c373e5e7a93ccf709596bd75ba6765c9fe4 GIT binary patch literal 7141 zcmVcl~|!jeIdy!2xUeUl(#fI z!b2Si2?-?PqBONcMW#HU_5tCL@`BW608wZWXrKxtjXj%v&OLjdZ+(01J9q5yAL>$W z?m7Est+m(x-sgBO@Ljko!SMeG&OMV(;&q(FJ=h%XuVMLJU<244FHT?&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UyF}36u(HsYn zl2`5DOn#58_YBVMvjk5##@abdugojO2=k12iQ?kZ9E?Av_|zAE_3+`5;m8#?z(=;y zxy<-y^X2&WFIkBT^&Y*k;JOHpEVuUqeUY#t#YD8a;|35T!3v!GSgYWiV0glE{)LYp zt`LdfrYLTJb6aWiP2i=hsLdvs2c9=~w%2Keuwi}chI$d8D?;Z!`2DxSp8>IVG# z2=bR9-Ve^Wc8=}isY}0ZS8$8qwkobbQDA1~(W)#+NTaaC{cckXUzq6oAEh5X8U=VP zDV_~$!g(oQKl{QbZhT*MShyn;SD+{`e;&e+1Ea7BDK1p0Jr4;&Cf}=vXO57>^a{J_tL!|6jbu>P@Gn8L z!e02~t@o}7?pVb!j7r=XmH5!`i(9Kgsd`{-=c5K&y}F+s4p(vM*!SSd?ewk) z?h3^*ocnYRr^ByGCY;X7d~dSx`XsdYn7&KlQSL+UT6)x#eEo7hRk^Zp96Ogjd2{w( bM+N@}2~*< - - - 􀅼 - - - - + + + + {i18n.t(i18n.l.wallet.new.new_wallet_group.title)} @@ -197,49 +205,39 @@ export function ChooseWalletGroup() { const groups = Object.values(wallets).filter(wallet => wallet.type === WalletTypes.mnemonic); return ( - - - - - 􀆉 - - - - - {i18n.t(i18n.l.wallet.new.choose_wallet_group.title)} - - - {i18n.t(i18n.l.wallet.new.choose_wallet_group.description)} - - - - - + + {({ backgroundColor }) => ( + + + + + + 􀆉 + + + + + {i18n.t(i18n.l.wallet.new.choose_wallet_group.title)} + + + {i18n.t(i18n.l.wallet.new.choose_wallet_group.description)} + + + + + - - - - - - - {groups.map(wallet => ( - - ))} - - - + + {groups.length > 0 && ( + + {groups.map(wallet => ( + + ))} + + )} + + + )} + ); } From 6a8faca9f98ad6f6da52f2424750c3f967ea89df Mon Sep 17 00:00:00 2001 From: gregs Date: Fri, 20 Dec 2024 09:06:02 -0300 Subject: [PATCH 06/14] a --- src/navigation/AddWalletNavigator.tsx | 10 ---------- src/navigation/Routes.ios.tsx | 2 ++ 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/navigation/AddWalletNavigator.tsx b/src/navigation/AddWalletNavigator.tsx index 13794dacb22..92b6cb7bc7c 100644 --- a/src/navigation/AddWalletNavigator.tsx +++ b/src/navigation/AddWalletNavigator.tsx @@ -42,16 +42,6 @@ export const AddWalletNavigator = () => { }, }} /> - { - setScrollEnabled(true); - }, - }} - /> + {profilesEnabled && ( <> From f19143a76ed7d6fdbbabb5818258b8f2d0be09d7 Mon Sep 17 00:00:00 2001 From: gregs Date: Fri, 20 Dec 2024 14:57:51 -0300 Subject: [PATCH 07/14] sheet --- src/components/sheet/SlackSheet.tsx | 3 +- src/navigation/ChooseWalletGroup.tsx | 63 +++++++++++++--------------- src/navigation/Routes.ios.tsx | 2 +- 3 files changed, 33 insertions(+), 35 deletions(-) diff --git a/src/components/sheet/SlackSheet.tsx b/src/components/sheet/SlackSheet.tsx index 27212d0527c..0fc473c1835 100644 --- a/src/components/sheet/SlackSheet.tsx +++ b/src/components/sheet/SlackSheet.tsx @@ -45,7 +45,8 @@ const Container = styled(Centered).attrs({ ? deviceHeight - contentHeight : 0, }), - ...(IS_ANDROID ? { borderTopLeftRadius: 30, borderTopRightRadius: 30 } : {}), + borderTopLeftRadius: 30, + borderTopRightRadius: 30, backgroundColor: backgroundColor, bottom: 0, left: 0, diff --git a/src/navigation/ChooseWalletGroup.tsx b/src/navigation/ChooseWalletGroup.tsx index 8061f56a07b..d768d071b23 100644 --- a/src/navigation/ChooseWalletGroup.tsx +++ b/src/navigation/ChooseWalletGroup.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { BackgroundProvider, Box, Separator, Text, useForegroundColor } from '@/design-system'; +import { Separator, Text, useBackgroundColor, useForegroundColor } from '@/design-system'; import { View, Text as NativeText } from 'react-native'; import chroma from 'chroma-js'; import { useInitializeWallet, useWallets } from '@/hooks'; @@ -23,7 +23,7 @@ import * as i18n from '@/languages'; import showWalletErrorAlert from '@/helpers/support'; import { ScrollView } from 'react-native-gesture-handler'; import CreateNewWalletGroupIcon from '@/assets/CreateNewWalletGroup.png'; -import { SimpleSheet } from '@/components/sheet/SimpleSheet'; +import { SlackSheet } from '@/components/sheet'; function NewWalletGroup({ numWalletGroups }: { numWalletGroups: number }) { const blue = useForegroundColor('blue'); @@ -196,6 +196,7 @@ function WalletGroup({ wallet }: { wallet: RainbowWallet }) { export function ChooseWalletGroup() { const { goBack } = useNavigation(); const { wallets } = useWallets(); + const surfaceSecondary = useBackgroundColor('surfaceSecondary'); if (!wallets) { showWalletErrorAlert(); @@ -205,39 +206,35 @@ export function ChooseWalletGroup() { const groups = Object.values(wallets).filter(wallet => wallet.type === WalletTypes.mnemonic); return ( - - {({ backgroundColor }) => ( - - - - - - 􀆉 - - - - - {i18n.t(i18n.l.wallet.new.choose_wallet_group.title)} - - - {i18n.t(i18n.l.wallet.new.choose_wallet_group.description)} + + + + + + 􀆉 + + + + {i18n.t(i18n.l.wallet.new.choose_wallet_group.title)} + + + {i18n.t(i18n.l.wallet.new.choose_wallet_group.description)} + - - - + + + - - {groups.length > 0 && ( - - {groups.map(wallet => ( - - ))} - - )} - - - )} - + + {groups.length > 0 && ( + + {groups.map(wallet => ( + + ))} + + )} + + ); } diff --git a/src/navigation/Routes.ios.tsx b/src/navigation/Routes.ios.tsx index 85bb6ddc48a..8b8755b455b 100644 --- a/src/navigation/Routes.ios.tsx +++ b/src/navigation/Routes.ios.tsx @@ -234,7 +234,7 @@ function NativeStackNavigator() { {...hardwareWalletTxNavigatorConfig} /> - + {profilesEnabled && ( <> From 910eb9e2ede96b6ec0e777b65dea13ec287fd9bb Mon Sep 17 00:00:00 2001 From: gregs Date: Fri, 20 Dec 2024 15:10:51 -0300 Subject: [PATCH 08/14] android route --- src/navigation/Routes.android.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/navigation/Routes.android.tsx b/src/navigation/Routes.android.tsx index 1e03c2d96a3..3123532bbec 100644 --- a/src/navigation/Routes.android.tsx +++ b/src/navigation/Routes.android.tsx @@ -37,6 +37,7 @@ import { stackNavigationConfig, learnWebViewScreenConfig, backupSheetSizes, + panelConfig, } from './config'; import { addWalletNavigatorPreset, @@ -93,6 +94,7 @@ import { RootStackParamList } from './types'; import WalletLoadingListener from '@/components/WalletLoadingListener'; import { Portal as CMPortal } from '@/react-native-cool-modals/Portal'; import { NetworkSelector } from '@/components/NetworkSwitcher'; +import { ChooseWalletGroup } from './ChooseWalletGroup'; const Stack = createStackNavigator(); const OuterStack = createStackNavigator(); @@ -161,6 +163,7 @@ function BSNavigator() { + Date: Mon, 6 Jan 2025 15:59:01 -0300 Subject: [PATCH 09/14] swipe nav & backups v2 --- src/navigation/AddWalletNavigator.tsx | 10 ++++ src/navigation/ChooseWalletGroup.tsx | 84 ++++++++++----------------- src/navigation/Routes.android.tsx | 2 - src/navigation/Routes.ios.tsx | 1 - 4 files changed, 42 insertions(+), 55 deletions(-) diff --git a/src/navigation/AddWalletNavigator.tsx b/src/navigation/AddWalletNavigator.tsx index 92b6cb7bc7c..13794dacb22 100644 --- a/src/navigation/AddWalletNavigator.tsx +++ b/src/navigation/AddWalletNavigator.tsx @@ -42,6 +42,16 @@ export const AddWalletNavigator = () => { }, }} /> + { + setScrollEnabled(true); + }, + }} + /> wallet.type === WalletTypes.mnemonic); return ( - - - - - - 􀆉 - - - - - {i18n.t(i18n.l.wallet.new.choose_wallet_group.title)} - - - {i18n.t(i18n.l.wallet.new.choose_wallet_group.description)} - - - - - - - - {groups.length > 0 && ( - - {groups.map(wallet => ( - - ))} - - )} + + + + + 􀆉 + + + + + {i18n.t(i18n.l.wallet.new.choose_wallet_group.title)} + + + {i18n.t(i18n.l.wallet.new.choose_wallet_group.description)} + + + + - + + + {groups.length > 0 && ( + + {groups.map(wallet => ( + + ))} + + )} + ); } diff --git a/src/navigation/Routes.android.tsx b/src/navigation/Routes.android.tsx index 3123532bbec..94dd462a754 100644 --- a/src/navigation/Routes.android.tsx +++ b/src/navigation/Routes.android.tsx @@ -94,7 +94,6 @@ import { RootStackParamList } from './types'; import WalletLoadingListener from '@/components/WalletLoadingListener'; import { Portal as CMPortal } from '@/react-native-cool-modals/Portal'; import { NetworkSelector } from '@/components/NetworkSwitcher'; -import { ChooseWalletGroup } from './ChooseWalletGroup'; const Stack = createStackNavigator(); const OuterStack = createStackNavigator(); @@ -163,7 +162,6 @@ function BSNavigator() { - - {profilesEnabled && ( <> From ddd8a7cf01c870446c46c8c5fd5617189513e760 Mon Sep 17 00:00:00 2001 From: gregs Date: Mon, 6 Jan 2025 16:37:14 -0300 Subject: [PATCH 10/14] better scroll --- src/navigation/ChooseWalletGroup.tsx | 52 ++++++++++++++++------------ 1 file changed, 29 insertions(+), 23 deletions(-) diff --git a/src/navigation/ChooseWalletGroup.tsx b/src/navigation/ChooseWalletGroup.tsx index f7c7a1a717a..c277eff7c50 100644 --- a/src/navigation/ChooseWalletGroup.tsx +++ b/src/navigation/ChooseWalletGroup.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { Separator, Text, useForegroundColor } from '@/design-system'; -import { View, Text as NativeText } from 'react-native'; +import { View, Text as NativeText, ViewStyle } from 'react-native'; import chroma from 'chroma-js'; import { useInitializeWallet, useWallets } from '@/hooks'; import { useDispatch } from 'react-redux'; @@ -38,7 +38,7 @@ function NewWalletGroup({ numWalletGroups }: { numWalletGroups: number }) { const { name, color } = args; await createWallet({ color, name }); await dispatch(walletsLoadState()); - // @ts-ignore + // @ts-expect-error - needs refactor to object params await initializeWallet(); navigate(Routes.WALLET_SCREEN, {}, true); } catch (error) { @@ -54,19 +54,22 @@ function NewWalletGroup({ numWalletGroups }: { numWalletGroups: number }) { @@ -188,8 +191,8 @@ export function ChooseWalletGroup() { const groups = Object.values(wallets).filter(wallet => wallet.type === WalletTypes.mnemonic); return ( - - + + 􀆉 @@ -203,18 +206,21 @@ export function ChooseWalletGroup() { {i18n.t(i18n.l.wallet.new.choose_wallet_group.description)} - + - - {groups.length > 0 && ( - + + + {groups.map(wallet => ( ))} - - )} + + ); } From 09865064291c70a02ebf87441215b3e43caef418 Mon Sep 17 00:00:00 2001 From: gregs Date: Mon, 6 Jan 2025 16:43:07 -0300 Subject: [PATCH 11/14] revert --- src/components/sheet/SlackSheet.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/sheet/SlackSheet.tsx b/src/components/sheet/SlackSheet.tsx index 0fc473c1835..27212d0527c 100644 --- a/src/components/sheet/SlackSheet.tsx +++ b/src/components/sheet/SlackSheet.tsx @@ -45,8 +45,7 @@ const Container = styled(Centered).attrs({ ? deviceHeight - contentHeight : 0, }), - borderTopLeftRadius: 30, - borderTopRightRadius: 30, + ...(IS_ANDROID ? { borderTopLeftRadius: 30, borderTopRightRadius: 30 } : {}), backgroundColor: backgroundColor, bottom: 0, left: 0, From 5d3cd118f3845ac56a079c33b977bf2558598afe Mon Sep 17 00:00:00 2001 From: gregs Date: Mon, 6 Jan 2025 18:56:03 -0300 Subject: [PATCH 12/14] fix styles --- src/navigation/ChooseWalletGroup.tsx | 63 ++++++++++++++-------------- 1 file changed, 31 insertions(+), 32 deletions(-) diff --git a/src/navigation/ChooseWalletGroup.tsx b/src/navigation/ChooseWalletGroup.tsx index c277eff7c50..3a35c951173 100644 --- a/src/navigation/ChooseWalletGroup.tsx +++ b/src/navigation/ChooseWalletGroup.tsx @@ -54,22 +54,19 @@ function NewWalletGroup({ numWalletGroups }: { numWalletGroups: number }) { @@ -192,22 +189,24 @@ export function ChooseWalletGroup() { return ( - - - - 􀆉 - - - - - {i18n.t(i18n.l.wallet.new.choose_wallet_group.title)} - - - {i18n.t(i18n.l.wallet.new.choose_wallet_group.description)} - - - - + + + + + 􀆉 + + + + + {i18n.t(i18n.l.wallet.new.choose_wallet_group.title)} + + + {i18n.t(i18n.l.wallet.new.choose_wallet_group.description)} + + + + + Date: Mon, 6 Jan 2025 19:18:00 -0300 Subject: [PATCH 13/14] fix dark mode --- src/navigation/ChooseWalletGroup.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/navigation/ChooseWalletGroup.tsx b/src/navigation/ChooseWalletGroup.tsx index 3a35c951173..0c2bbe16b7d 100644 --- a/src/navigation/ChooseWalletGroup.tsx +++ b/src/navigation/ChooseWalletGroup.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { Separator, Text, useForegroundColor } from '@/design-system'; +import { Box, Separator, Text, useForegroundColor } from '@/design-system'; import { View, Text as NativeText, ViewStyle } from 'react-native'; import chroma from 'chroma-js'; import { useInitializeWallet, useWallets } from '@/hooks'; @@ -188,7 +188,7 @@ export function ChooseWalletGroup() { const groups = Object.values(wallets).filter(wallet => wallet.type === WalletTypes.mnemonic); return ( - + @@ -220,6 +220,6 @@ export function ChooseWalletGroup() { ))} - + ); } From 4d7c5b224c8c519e96469282b30b10d42d58b0c9 Mon Sep 17 00:00:00 2001 From: gregs Date: Mon, 6 Jan 2025 20:35:47 -0300 Subject: [PATCH 14/14] =?UTF-8?q?=F0=9F=91=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/navigation/AddWalletNavigator.tsx | 2 +- src/navigation/Routes.android.tsx | 1 - src/navigation/Routes.ios.tsx | 1 - src/{navigation => screens}/ChooseWalletGroup.tsx | 6 +++--- 4 files changed, 4 insertions(+), 6 deletions(-) rename src/{navigation => screens}/ChooseWalletGroup.tsx (97%) diff --git a/src/navigation/AddWalletNavigator.tsx b/src/navigation/AddWalletNavigator.tsx index 13794dacb22..6d5a096d221 100644 --- a/src/navigation/AddWalletNavigator.tsx +++ b/src/navigation/AddWalletNavigator.tsx @@ -3,11 +3,11 @@ import React, { useState } from 'react'; import Routes from '@/navigation/routesNames'; import { deviceUtils } from '@/utils'; import { AddWalletSheet, AddWalletSheetParams } from '@/screens/AddWalletSheet'; +import { ChooseWalletGroup } from '@/screens/ChooseWalletGroup'; import { ImportOrWatchWalletSheet, ImportOrWatchWalletSheetParams } from '@/screens/ImportOrWatchWalletSheet'; import { BackgroundProvider } from '@/design-system'; import { RouteProp, useRoute } from '@react-navigation/native'; import { SimpleSheet } from '@/components/sheet/SimpleSheet'; -import { ChooseWalletGroup } from './ChooseWalletGroup'; const Swipe = createMaterialTopTabNavigator(); diff --git a/src/navigation/Routes.android.tsx b/src/navigation/Routes.android.tsx index 94dd462a754..1e03c2d96a3 100644 --- a/src/navigation/Routes.android.tsx +++ b/src/navigation/Routes.android.tsx @@ -37,7 +37,6 @@ import { stackNavigationConfig, learnWebViewScreenConfig, backupSheetSizes, - panelConfig, } from './config'; import { addWalletNavigatorPreset, diff --git a/src/navigation/Routes.ios.tsx b/src/navigation/Routes.ios.tsx index 89ad66e1e40..201eb3aa374 100644 --- a/src/navigation/Routes.ios.tsx +++ b/src/navigation/Routes.ios.tsx @@ -103,7 +103,6 @@ import { ControlPanel } from '@/components/DappBrowser/control-panel/ControlPane import { ClaimRewardsPanel } from '@/screens/points/claim-flow/ClaimRewardsPanel'; import { ClaimClaimablePanel } from '@/screens/claimables/ClaimPanel'; import { RootStackParamList } from './types'; -import { ChooseWalletGroup } from './ChooseWalletGroup'; import WalletLoadingListener from '@/components/WalletLoadingListener'; import { Portal as CMPortal } from '@/react-native-cool-modals/Portal'; import { NetworkSelector } from '@/components/NetworkSwitcher'; diff --git a/src/navigation/ChooseWalletGroup.tsx b/src/screens/ChooseWalletGroup.tsx similarity index 97% rename from src/navigation/ChooseWalletGroup.tsx rename to src/screens/ChooseWalletGroup.tsx index 0c2bbe16b7d..9323f1d381d 100644 --- a/src/navigation/ChooseWalletGroup.tsx +++ b/src/screens/ChooseWalletGroup.tsx @@ -5,7 +5,7 @@ import chroma from 'chroma-js'; import { useInitializeWallet, useWallets } from '@/hooks'; import { useDispatch } from 'react-redux'; import Routes from '@/navigation/routesNames'; -import { useNavigation } from './Navigation'; +import { useNavigation } from '../navigation/Navigation'; import WalletTypes from '@/helpers/walletTypes'; import { logger, RainbowError } from '@/logger'; import { createAccountForWallet, walletsLoadState } from '@/redux/wallets'; @@ -188,7 +188,7 @@ export function ChooseWalletGroup() { const groups = Object.values(wallets).filter(wallet => wallet.type === WalletTypes.mnemonic); return ( - + @@ -211,7 +211,7 @@ export function ChooseWalletGroup() {