wallet-stack 1.0.0-alpha.121
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +86 -0
- package/app.plugin.js +1 -0
- package/locales/base/translation.json +2998 -0
- package/locales/de/translation.json +2998 -0
- package/locales/en-US/translation.json +2998 -0
- package/locales/es-419/translation.json +2998 -0
- package/locales/fr-FR/translation.json +2998 -0
- package/locales/index.ts +163 -0
- package/locales/it-IT/translation.json +2998 -0
- package/locales/pl-PL/translation.json +3004 -0
- package/locales/pt-BR/translation.json +2998 -0
- package/locales/ru-RU/translation.json +3004 -0
- package/locales/th-TH/translation.json +2995 -0
- package/locales/tr-TR/translation.json +2998 -0
- package/locales/uk-UA/translation.json +3004 -0
- package/locales/vi-VN/translation.json +2995 -0
- package/locales/zh-CN/translation.json +2995 -0
- package/metro-config.js +40 -0
- package/package.json +227 -0
- package/plugin/build/consts.d.ts +2 -0
- package/plugin/build/consts.js +6 -0
- package/plugin/build/index.d.ts +8 -0
- package/plugin/build/index.js +21 -0
- package/plugin/build/withAndroidUserAgent.d.ts +8 -0
- package/plugin/build/withAndroidUserAgent.js +86 -0
- package/plugin/build/withAndroidWindowSoftInputModeAdjustNothing.d.ts +6 -0
- package/plugin/build/withAndroidWindowSoftInputModeAdjustNothing.js +16 -0
- package/plugin/build/withIosAppDelegateResetKeychain.d.ts +2 -0
- package/plugin/build/withIosAppDelegateResetKeychain.js +77 -0
- package/plugin/build/withIosUserAgent.d.ts +8 -0
- package/plugin/build/withIosUserAgent.js +56 -0
- package/plugin/tsconfig.json +13 -0
- package/src/RevokePhoneNumber.tsx +117 -0
- package/src/abis/IWalletJumpstart.ts +472 -0
- package/src/account/AccountErrorScreen.test.tsx +47 -0
- package/src/account/AccountErrorScreen.tsx +72 -0
- package/src/account/AccountKeyEducation.test.tsx +20 -0
- package/src/account/AccountKeyEducation.tsx +83 -0
- package/src/account/AccountSetupFailureScreen.test.tsx +59 -0
- package/src/account/AccountSetupFailureScreen.tsx +42 -0
- package/src/account/Education.test.tsx +48 -0
- package/src/account/Education.tsx +235 -0
- package/src/account/GoldEducation.test.tsx +35 -0
- package/src/account/GoldEducation.tsx +82 -0
- package/src/account/LegalSubmenu.test.tsx +84 -0
- package/src/account/LegalSubmenu.tsx +74 -0
- package/src/account/LicenseDisclaimer.txt +15310 -0
- package/src/account/Licenses.test.tsx +17 -0
- package/src/account/Licenses.tsx +43 -0
- package/src/account/PreferencesSubmenu.test.tsx +66 -0
- package/src/account/PreferencesSubmenu.tsx +87 -0
- package/src/account/PrivateKey.test.tsx +241 -0
- package/src/account/PrivateKey.tsx +169 -0
- package/src/account/Profile.test.tsx +77 -0
- package/src/account/Profile.tsx +153 -0
- package/src/account/ProfileSubmenu.test.tsx +105 -0
- package/src/account/ProfileSubmenu.tsx +89 -0
- package/src/account/SecuritySubmenu.test.tsx +305 -0
- package/src/account/SecuritySubmenu.tsx +435 -0
- package/src/account/ShakeForSupport.test.tsx +23 -0
- package/src/account/ShakeForSupport.tsx +112 -0
- package/src/account/StoreWipeRecoveryScreen.test.tsx +39 -0
- package/src/account/StoreWipeRecoveryScreen.tsx +50 -0
- package/src/account/Support.test.tsx +67 -0
- package/src/account/Support.tsx +69 -0
- package/src/account/SupportContact.test.tsx +95 -0
- package/src/account/SupportContact.tsx +265 -0
- package/src/account/__snapshots__/AccountKeyEducation.test.tsx.snap +579 -0
- package/src/account/__snapshots__/Education.test.tsx.snap +286 -0
- package/src/account/__snapshots__/GoldEducation.test.tsx.snap +579 -0
- package/src/account/__snapshots__/Licenses.test.tsx.snap +33 -0
- package/src/account/__snapshots__/ShakeForSupport.test.tsx.snap +3 -0
- package/src/account/actions.ts +270 -0
- package/src/account/reducer.test.ts +28 -0
- package/src/account/reducer.ts +296 -0
- package/src/account/saga.test.ts +209 -0
- package/src/account/saga.ts +249 -0
- package/src/account/selectors.test.ts +18 -0
- package/src/account/selectors.ts +60 -0
- package/src/account/updateAccountRegistration.ts +35 -0
- package/src/account/utils.ts +36 -0
- package/src/account/zendesk.test.ts +166 -0
- package/src/account/zendesk.ts +199 -0
- package/src/alert/AlertBanner.test.tsx +123 -0
- package/src/alert/AlertBanner.tsx +84 -0
- package/src/alert/actions.ts +127 -0
- package/src/alert/reducer.ts +52 -0
- package/src/analytics/AppAnalytics.test.ts +334 -0
- package/src/analytics/AppAnalytics.ts +369 -0
- package/src/analytics/AsyncStoragePersistor.ts +34 -0
- package/src/analytics/Events.test.tsx +49 -0
- package/src/analytics/Events.tsx +648 -0
- package/src/analytics/InjectTraits.ts +34 -0
- package/src/analytics/Properties.tsx +1645 -0
- package/src/analytics/README.md +24 -0
- package/src/analytics/docs.ts +675 -0
- package/src/analytics/saga.test.ts +57 -0
- package/src/analytics/saga.ts +21 -0
- package/src/analytics/selectors.test.ts +391 -0
- package/src/analytics/selectors.ts +200 -0
- package/src/analytics/types.ts +46 -0
- package/src/app/App.test.tsx +25 -0
- package/src/app/App.tsx +124 -0
- package/src/app/AppInitGate.test.tsx +100 -0
- package/src/app/AppInitGate.tsx +77 -0
- package/src/app/AppLoading.test.tsx +11 -0
- package/src/app/AppLoading.tsx +79 -0
- package/src/app/DebugImages.tsx +110 -0
- package/src/app/ErrorBoundary.test.tsx +19 -0
- package/src/app/ErrorBoundary.tsx +41 -0
- package/src/app/ErrorMessages.ts +40 -0
- package/src/app/ErrorScreen.test.tsx +26 -0
- package/src/app/ErrorScreen.tsx +57 -0
- package/src/app/SanctionedCountryErrorScreen.tsx +37 -0
- package/src/app/UpgradeScreen.tsx +28 -0
- package/src/app/__snapshots__/AppLoading.test.tsx.snap +35 -0
- package/src/app/__snapshots__/ErrorScreen.test.tsx.snap +365 -0
- package/src/app/actions.ts +301 -0
- package/src/app/crowd_mobile.png +0 -0
- package/src/app/reducers.ts +204 -0
- package/src/app/saga.test.ts +651 -0
- package/src/app/saga.ts +367 -0
- package/src/app/selectors.ts +53 -0
- package/src/app/useDeepLinks.test.tsx +43 -0
- package/src/app/useDeepLinks.ts +72 -0
- package/src/app/utils.ts +14 -0
- package/src/appConfig.test.ts +37 -0
- package/src/appConfig.ts +20 -0
- package/src/backup/BackupComplete.test.tsx +61 -0
- package/src/backup/BackupComplete.tsx +69 -0
- package/src/backup/BackupIntroduction.test.tsx +37 -0
- package/src/backup/BackupIntroduction.tsx +157 -0
- package/src/backup/BackupPhrase.test.tsx +71 -0
- package/src/backup/BackupPhrase.tsx +208 -0
- package/src/backup/BackupPhraseContainer.test.tsx +43 -0
- package/src/backup/BackupPhraseContainer.tsx +207 -0
- package/src/backup/BackupQuiz.test.tsx +130 -0
- package/src/backup/BackupQuiz.tsx +429 -0
- package/src/backup/CancelConfirm.tsx +60 -0
- package/src/backup/QuizzBottom.tsx +57 -0
- package/src/backup/__snapshots__/BackupComplete.test.tsx.snap +58 -0
- package/src/backup/__snapshots__/BackupPhrase.test.tsx.snap +906 -0
- package/src/backup/__snapshots__/BackupPhraseContainer.test.tsx.snap +719 -0
- package/src/backup/__snapshots__/BackupQuiz.test.tsx.snap +1313 -0
- package/src/backup/utils.test.ts +91 -0
- package/src/backup/utils.ts +103 -0
- package/src/celoNews/CeloNewsFeed.test.tsx +157 -0
- package/src/celoNews/CeloNewsFeed.tsx +161 -0
- package/src/celoNews/CeloNewsFeedItem.test.tsx +46 -0
- package/src/celoNews/CeloNewsFeedItem.tsx +104 -0
- package/src/celoNews/types.ts +14 -0
- package/src/components/AccountNumber.test.tsx +25 -0
- package/src/components/AccountNumber.tsx +78 -0
- package/src/components/AccountNumberCard.tsx +23 -0
- package/src/components/Avatar.test.tsx +67 -0
- package/src/components/Avatar.tsx +72 -0
- package/src/components/BackButton.tsx +44 -0
- package/src/components/BeatingHeartLoader.tsx +39 -0
- package/src/components/BorderlessButton.tsx +25 -0
- package/src/components/BottomSheet.tsx +84 -0
- package/src/components/BottomSheetBase.tsx +87 -0
- package/src/components/BottomSheetScrollView.tsx +54 -0
- package/src/components/Button.test.tsx +94 -0
- package/src/components/Button.tsx +259 -0
- package/src/components/CallToActionsBar.tsx +68 -0
- package/src/components/CancelButton.test.tsx +11 -0
- package/src/components/CancelButton.tsx +58 -0
- package/src/components/Card.tsx +34 -0
- package/src/components/CircleButton.test.tsx +35 -0
- package/src/components/CircleButton.tsx +64 -0
- package/src/components/ClipboardAwarePasteButton.tsx +65 -0
- package/src/components/CloseButton.tsx +41 -0
- package/src/components/CodeInput.test.tsx +26 -0
- package/src/components/CodeInput.tsx +124 -0
- package/src/components/CodeRow.test.tsx +27 -0
- package/src/components/CodeRow.tsx +163 -0
- package/src/components/ContactCircle.test.tsx +67 -0
- package/src/components/ContactCircle.tsx +133 -0
- package/src/components/ContactCircleSelf.tsx +28 -0
- package/src/components/CurrencyDisplay.tsx +242 -0
- package/src/components/DataFieldWithCopy.tsx +75 -0
- package/src/components/DevSkipButton.tsx +105 -0
- package/src/components/Dialog.test.tsx +14 -0
- package/src/components/Dialog.tsx +124 -0
- package/src/components/Dropdown.tsx +98 -0
- package/src/components/EmptyView.tsx +34 -0
- package/src/components/ErrorMessageInline.tsx +78 -0
- package/src/components/ExchangesBottomSheet.test.tsx +84 -0
- package/src/components/ExchangesBottomSheet.tsx +74 -0
- package/src/components/Expandable.tsx +57 -0
- package/src/components/FeeDrawer.test.tsx +150 -0
- package/src/components/FeeDrawer.tsx +127 -0
- package/src/components/FeeIcon.test.tsx +14 -0
- package/src/components/FeeIcon.tsx +95 -0
- package/src/components/FeeInfoBottomSheet.test.tsx +320 -0
- package/src/components/FeeInfoBottomSheet.tsx +219 -0
- package/src/components/FilterChipsCarousel.tsx +143 -0
- package/src/components/FormField.tsx +23 -0
- package/src/components/FormLabel.tsx +21 -0
- package/src/components/FormTextInput.tsx +16 -0
- package/src/components/FullscreenCTA.test.tsx +58 -0
- package/src/components/FullscreenCTA.tsx +60 -0
- package/src/components/GasFeeWarning.test.tsx +126 -0
- package/src/components/GasFeeWarning.tsx +124 -0
- package/src/components/GradientBlock.tsx +20 -0
- package/src/components/HorizontalLine.tsx +18 -0
- package/src/components/IconWithNetworkBadge.test.tsx +49 -0
- package/src/components/IconWithNetworkBadge.tsx +69 -0
- package/src/components/InLineNotification.test.tsx +74 -0
- package/src/components/InLineNotification.tsx +160 -0
- package/src/components/InfoBottomSheet.test.tsx +55 -0
- package/src/components/InfoBottomSheet.tsx +79 -0
- package/src/components/ItemSeparator.test.tsx +8 -0
- package/src/components/ItemSeparator.tsx +16 -0
- package/src/components/KeyboardAwareScrollView.tsx +104 -0
- package/src/components/KeyboardSpacer.tsx +168 -0
- package/src/components/LabelWithInfo.tsx +57 -0
- package/src/components/LegacyTokenDisplay.test.tsx +282 -0
- package/src/components/LegacyTokenDisplay.tsx +63 -0
- package/src/components/LegacyTokenTotalLineItem.test.tsx +90 -0
- package/src/components/LegacyTokenTotalLineItem.tsx +38 -0
- package/src/components/LineItemRow.tsx +74 -0
- package/src/components/ListItem.test.tsx +19 -0
- package/src/components/ListItem.tsx +44 -0
- package/src/components/MessagingCard.tsx +21 -0
- package/src/components/Modal.tsx +57 -0
- package/src/components/NumberKeypad.test.tsx +21 -0
- package/src/components/NumberKeypad.tsx +102 -0
- package/src/components/NumberTicker.tsx +115 -0
- package/src/components/OnboardingCard.tsx +61 -0
- package/src/components/Pagination.tsx +39 -0
- package/src/components/PercentageIndicator.test.tsx +118 -0
- package/src/components/PercentageIndicator.tsx +75 -0
- package/src/components/PhoneNumberInput.test.tsx +99 -0
- package/src/components/PhoneNumberInput.tsx +132 -0
- package/src/components/PhoneNumberWithFlag.tsx +54 -0
- package/src/components/QrScanButton.test.tsx +21 -0
- package/src/components/QrScanButton.tsx +30 -0
- package/src/components/RecoveryPhraseInput.test.tsx +26 -0
- package/src/components/RecoveryPhraseInput.tsx +188 -0
- package/src/components/ReviewHeader.test.tsx +21 -0
- package/src/components/ReviewHeader.tsx +36 -0
- package/src/components/ReviewTransaction.test.tsx +474 -0
- package/src/components/ReviewTransaction.tsx +526 -0
- package/src/components/RowDivider.tsx +36 -0
- package/src/components/SearchInput.tsx +40 -0
- package/src/components/SectionHead.test.tsx +9 -0
- package/src/components/SectionHead.tsx +33 -0
- package/src/components/SegmentedControl.test.tsx +28 -0
- package/src/components/SegmentedControl.tsx +156 -0
- package/src/components/SelectRecipientButton.tsx +89 -0
- package/src/components/SelectionOption.test.tsx +18 -0
- package/src/components/SelectionOption.tsx +62 -0
- package/src/components/SettingsGearButton.tsx +30 -0
- package/src/components/SettingsItem.test.tsx +80 -0
- package/src/components/SettingsItem.tsx +195 -0
- package/src/components/SimpleMessagingCard.test.tsx +54 -0
- package/src/components/SimpleMessagingCard.tsx +90 -0
- package/src/components/SingleDigitInput.tsx +53 -0
- package/src/components/SkeletonPlaceholder.tsx +33 -0
- package/src/components/SmallButton.test.tsx +41 -0
- package/src/components/SmallButton.tsx +74 -0
- package/src/components/SmartTopAlert.test.tsx +22 -0
- package/src/components/SmartTopAlert.tsx +183 -0
- package/src/components/Switch.tsx +19 -0
- package/src/components/TextButton.tsx +22 -0
- package/src/components/TextInput.tsx +133 -0
- package/src/components/TextInputWithButtons.test.tsx +24 -0
- package/src/components/TextInputWithButtons.tsx +54 -0
- package/src/components/Toast.test.tsx +62 -0
- package/src/components/Toast.tsx +180 -0
- package/src/components/TokenBalance.test.tsx +389 -0
- package/src/components/TokenBalance.tsx +321 -0
- package/src/components/TokenBottomSheet.test.tsx +356 -0
- package/src/components/TokenBottomSheet.tsx +413 -0
- package/src/components/TokenDisplay.test.tsx +274 -0
- package/src/components/TokenDisplay.tsx +104 -0
- package/src/components/TokenEnterAmount.test.tsx +461 -0
- package/src/components/TokenEnterAmount.tsx +591 -0
- package/src/components/TokenIcon.test.tsx +93 -0
- package/src/components/TokenIcon.tsx +142 -0
- package/src/components/TokenTotalLineItem.test.tsx +199 -0
- package/src/components/TokenTotalLineItem.tsx +103 -0
- package/src/components/Touchable.tsx +48 -0
- package/src/components/ValidatedTextInput.tsx +96 -0
- package/src/components/WebView.tsx +43 -0
- package/src/components/WithPasteAware.tsx +113 -0
- package/src/components/WithTextInputPasteAware.tsx +51 -0
- package/src/components/__snapshots__/AccountNumber.test.tsx.snap +87 -0
- package/src/components/__snapshots__/Avatar.test.tsx.snap +435 -0
- package/src/components/__snapshots__/Button.test.tsx.snap +292 -0
- package/src/components/__snapshots__/CircleButton.test.tsx.snap +211 -0
- package/src/components/__snapshots__/CodeRow.test.tsx.snap +211 -0
- package/src/components/__snapshots__/ContactCircle.test.tsx.snap +46 -0
- package/src/components/__snapshots__/Dialog.test.tsx.snap +248 -0
- package/src/components/__snapshots__/FeeIcon.test.tsx.snap +147 -0
- package/src/components/__snapshots__/FullscreenCTA.test.tsx.snap +183 -0
- package/src/components/__snapshots__/ItemSeparator.test.tsx.snap +13 -0
- package/src/components/__snapshots__/NumberKeypad.test.tsx.snap +1434 -0
- package/src/components/__snapshots__/PhoneNumberInput.test.tsx.snap +202 -0
- package/src/components/__snapshots__/SectionHead.test.tsx.snap +32 -0
- package/src/components/__snapshots__/SelectionOption.test.tsx.snap +197 -0
- package/src/components/__snapshots__/SettingsItem.test.tsx.snap +226 -0
- package/src/components/__snapshots__/SmartTopAlert.test.tsx.snap +103 -0
- package/src/components/__snapshots__/TextInputWithButtons.test.tsx.snap +78 -0
- package/src/components/header/CustomHeader.tsx +56 -0
- package/src/components/multiSelect/MultiSelectBottomSheet.test.tsx +175 -0
- package/src/components/multiSelect/MultiSelectBottomSheet.tsx +249 -0
- package/src/components/multiSelect/NetworkMultiSelectBottomSheet.test.tsx +77 -0
- package/src/components/multiSelect/NetworkMultiSelectBottomSheet.tsx +56 -0
- package/src/components/useShowOrHideAnimation.tsx +33 -0
- package/src/config.enc +0 -0
- package/src/config.ts +186 -0
- package/src/dapps/DappShortcutTransactionRequest.test.tsx +187 -0
- package/src/dapps/DappShortcutTransactionRequest.tsx +270 -0
- package/src/dapps/DappShortcutsRewards.test.tsx +292 -0
- package/src/dapps/DappShortcutsRewards.tsx +284 -0
- package/src/dapps/DappsScreen.test.tsx +716 -0
- package/src/dapps/DappsScreen.tsx +365 -0
- package/src/dapps/saga.test.ts +194 -0
- package/src/dapps/saga.ts +136 -0
- package/src/dapps/selectors.test.ts +127 -0
- package/src/dapps/selectors.ts +123 -0
- package/src/dapps/slice.ts +110 -0
- package/src/dapps/types.ts +30 -0
- package/src/dappsExplorer/DappCard.tsx +141 -0
- package/src/dappsExplorer/DappFeaturedActions.test.tsx +72 -0
- package/src/dappsExplorer/DappFeaturedActions.tsx +121 -0
- package/src/dappsExplorer/DiscoverDappsCard.tsx +186 -0
- package/src/dappsExplorer/NoResults.tsx +126 -0
- package/src/dappsExplorer/TabDiscover.test.tsx +397 -0
- package/src/dappsExplorer/TabDiscover.tsx +76 -0
- package/src/dappsExplorer/searchDappList.test.tsx +69 -0
- package/src/dappsExplorer/searchDappList.tsx +113 -0
- package/src/dappsExplorer/useDappFavoritedToast.tsx +56 -0
- package/src/dappsExplorer/useOpenDapp.tsx +31 -0
- package/src/divviProtocol/saga.test.ts +51 -0
- package/src/divviProtocol/saga.ts +44 -0
- package/src/earn/ActionCard.tsx +46 -0
- package/src/earn/EarnDepositConfirmationScreen.test.tsx +603 -0
- package/src/earn/EarnDepositConfirmationScreen.tsx +596 -0
- package/src/earn/EarnEnterAmount.test.tsx +1296 -0
- package/src/earn/EarnEnterAmount.tsx +815 -0
- package/src/earn/EarnEntrypoint.test.tsx +100 -0
- package/src/earn/EarnEntrypoint.tsx +127 -0
- package/src/earn/EarnHome.test.tsx +237 -0
- package/src/earn/EarnHome.tsx +411 -0
- package/src/earn/EarnInfoScreen.test.tsx +96 -0
- package/src/earn/EarnInfoScreen.tsx +174 -0
- package/src/earn/EarnTabBar.test.tsx +43 -0
- package/src/earn/EarnTabBar.tsx +73 -0
- package/src/earn/EarnWithdrawConfirmationScreen.test.tsx +1022 -0
- package/src/earn/EarnWithdrawConfirmationScreen.tsx +476 -0
- package/src/earn/PoolCard.test.tsx +68 -0
- package/src/earn/PoolCard.tsx +218 -0
- package/src/earn/PoolList.tsx +87 -0
- package/src/earn/TabEarn.test.tsx +159 -0
- package/src/earn/TabEarn.tsx +354 -0
- package/src/earn/hooks.test.tsx +328 -0
- package/src/earn/hooks.ts +178 -0
- package/src/earn/poolInfoScreen/BeforeDepositBottomSheet.test.tsx +411 -0
- package/src/earn/poolInfoScreen/BeforeDepositBottomSheet.tsx +448 -0
- package/src/earn/poolInfoScreen/Cards.tsx +383 -0
- package/src/earn/poolInfoScreen/EarnPoolInfoScreen.test.tsx +498 -0
- package/src/earn/poolInfoScreen/EarnPoolInfoScreen.tsx +595 -0
- package/src/earn/poolInfoScreen/SafetyCard.test.tsx +108 -0
- package/src/earn/poolInfoScreen/SafetyCard.tsx +165 -0
- package/src/earn/poolInfoScreen/TokenIcons.tsx +37 -0
- package/src/earn/poolInfoScreen/WithdrawBottomSheet.test.tsx +235 -0
- package/src/earn/poolInfoScreen/WithdrawBottomSheet.tsx +168 -0
- package/src/earn/prepareTransactions.test.ts +616 -0
- package/src/earn/prepareTransactions.ts +281 -0
- package/src/earn/saga.test.ts +1149 -0
- package/src/earn/saga.ts +456 -0
- package/src/earn/selectors.ts +5 -0
- package/src/earn/simulateTransactions.test.ts +121 -0
- package/src/earn/simulateTransactions.ts +58 -0
- package/src/earn/slice.test.ts +87 -0
- package/src/earn/slice.ts +73 -0
- package/src/earn/types.ts +70 -0
- package/src/earn/utils.test.ts +48 -0
- package/src/earn/utils.ts +54 -0
- package/src/fiatExchanges/BidaliScreen.test.tsx +163 -0
- package/src/fiatExchanges/BidaliScreen.tsx +189 -0
- package/src/fiatExchanges/CashInSuccess.test.tsx +54 -0
- package/src/fiatExchanges/CashInSuccess.tsx +104 -0
- package/src/fiatExchanges/ExchangeQR.test.tsx +100 -0
- package/src/fiatExchanges/ExchangeQR.tsx +94 -0
- package/src/fiatExchanges/ExternalExchanges.test.tsx +67 -0
- package/src/fiatExchanges/ExternalExchanges.tsx +104 -0
- package/src/fiatExchanges/FiatExchangeAmount.test.tsx +418 -0
- package/src/fiatExchanges/FiatExchangeAmount.tsx +305 -0
- package/src/fiatExchanges/FiatExchangeCurrencyBottomSheet.test.tsx +309 -0
- package/src/fiatExchanges/FiatExchangeCurrencyBottomSheet.tsx +139 -0
- package/src/fiatExchanges/PaymentMethodSection.test.tsx +259 -0
- package/src/fiatExchanges/PaymentMethodSection.tsx +378 -0
- package/src/fiatExchanges/ReviewFees.test.tsx +74 -0
- package/src/fiatExchanges/ReviewFees.tsx +202 -0
- package/src/fiatExchanges/SelectProvider.test.tsx +415 -0
- package/src/fiatExchanges/SelectProvider.tsx +649 -0
- package/src/fiatExchanges/SimplexScreen.test.tsx +109 -0
- package/src/fiatExchanges/SimplexScreen.tsx +185 -0
- package/src/fiatExchanges/Spend.tsx +104 -0
- package/src/fiatExchanges/WithdrawSpend.test.tsx +37 -0
- package/src/fiatExchanges/WithdrawSpend.tsx +139 -0
- package/src/fiatExchanges/__snapshots__/CashInSuccess.test.tsx.snap +351 -0
- package/src/fiatExchanges/__snapshots__/FiatExchangeAmount.test.tsx.snap +397 -0
- package/src/fiatExchanges/__snapshots__/ReviewFees.test.tsx.snap +844 -0
- package/src/fiatExchanges/__snapshots__/SimplexScreen.test.tsx.snap +1083 -0
- package/src/fiatExchanges/actions.ts +67 -0
- package/src/fiatExchanges/amount.test.tsx +48 -0
- package/src/fiatExchanges/amount.tsx +45 -0
- package/src/fiatExchanges/quotes/ExternalQuote.test.ts +172 -0
- package/src/fiatExchanges/quotes/ExternalQuote.ts +121 -0
- package/src/fiatExchanges/quotes/FiatConnectQuote.test.ts +718 -0
- package/src/fiatExchanges/quotes/FiatConnectQuote.ts +343 -0
- package/src/fiatExchanges/quotes/NormalizedQuote.ts +47 -0
- package/src/fiatExchanges/quotes/constants.ts +63 -0
- package/src/fiatExchanges/quotes/normalizeQuotes.test.ts +102 -0
- package/src/fiatExchanges/quotes/normalizeQuotes.ts +76 -0
- package/src/fiatExchanges/quotes/utils.ts +31 -0
- package/src/fiatExchanges/reducer.ts +65 -0
- package/src/fiatExchanges/saga.test.ts +281 -0
- package/src/fiatExchanges/saga.ts +195 -0
- package/src/fiatExchanges/types.ts +104 -0
- package/src/fiatExchanges/utils.test.ts +159 -0
- package/src/fiatExchanges/utils.tsx +287 -0
- package/src/fiatconnect/FiatDetailsScreen.test.tsx +371 -0
- package/src/fiatconnect/FiatDetailsScreen.tsx +441 -0
- package/src/fiatconnect/LinkAccountScreen.test.tsx +107 -0
- package/src/fiatconnect/LinkAccountScreen.tsx +180 -0
- package/src/fiatconnect/RefetchQuoteScreen.test.tsx +119 -0
- package/src/fiatconnect/RefetchQuoteScreen.tsx +68 -0
- package/src/fiatconnect/ReviewScreen.test.tsx +505 -0
- package/src/fiatconnect/ReviewScreen.tsx +708 -0
- package/src/fiatconnect/TransferStatusScreen.test.tsx +399 -0
- package/src/fiatconnect/TransferStatusScreen.tsx +351 -0
- package/src/fiatconnect/clients.test.tsx +83 -0
- package/src/fiatconnect/clients.ts +69 -0
- package/src/fiatconnect/consts.ts +41 -0
- package/src/fiatconnect/fiatAccountSchemas/accountNumber.test.ts +60 -0
- package/src/fiatconnect/fiatAccountSchemas/accountNumber.ts +55 -0
- package/src/fiatconnect/fiatAccountSchemas/ibanNumber.test.ts +53 -0
- package/src/fiatconnect/fiatAccountSchemas/ibanNumber.ts +56 -0
- package/src/fiatconnect/fiatAccountSchemas/ifscAccount.test.ts +45 -0
- package/src/fiatconnect/fiatAccountSchemas/ifscAccount.ts +58 -0
- package/src/fiatconnect/fiatAccountSchemas/index.test.ts +119 -0
- package/src/fiatconnect/fiatAccountSchemas/index.ts +89 -0
- package/src/fiatconnect/fiatAccountSchemas/mobileMoney.test.ts +29 -0
- package/src/fiatconnect/fiatAccountSchemas/mobileMoney.ts +61 -0
- package/src/fiatconnect/fiatAccountSchemas/pixAccount.test.ts +45 -0
- package/src/fiatconnect/fiatAccountSchemas/pixAccount.ts +62 -0
- package/src/fiatconnect/fiatAccountSchemas/types.ts +40 -0
- package/src/fiatconnect/index.test.ts +244 -0
- package/src/fiatconnect/index.ts +179 -0
- package/src/fiatconnect/kyc/KycDenied.test.tsx +139 -0
- package/src/fiatconnect/kyc/KycDenied.tsx +144 -0
- package/src/fiatconnect/kyc/KycExpired.test.tsx +128 -0
- package/src/fiatconnect/kyc/KycExpired.tsx +127 -0
- package/src/fiatconnect/kyc/KycInactive.test.tsx +139 -0
- package/src/fiatconnect/kyc/KycInactive.tsx +100 -0
- package/src/fiatconnect/kyc/KycPending.test.tsx +82 -0
- package/src/fiatconnect/kyc/KycPending.tsx +106 -0
- package/src/fiatconnect/kyc/getNavigationOptions.tsx +72 -0
- package/src/fiatconnect/saga.test.ts +2594 -0
- package/src/fiatconnect/saga.ts +1133 -0
- package/src/fiatconnect/selectors.ts +24 -0
- package/src/fiatconnect/slice.test.ts +79 -0
- package/src/fiatconnect/slice.ts +380 -0
- package/src/fiatconnect/types.ts +24 -0
- package/src/firebase/actions.ts +11 -0
- package/src/firebase/db-rules.json +129 -0
- package/src/firebase/firebase.test.ts +190 -0
- package/src/firebase/firebase.ts +315 -0
- package/src/firebase/notifications.test.ts +180 -0
- package/src/firebase/notifications.ts +106 -0
- package/src/firebase/saga.test.ts +23 -0
- package/src/firebase/saga.ts +81 -0
- package/src/flags.ts +76 -0
- package/src/home/ActionsCarousel.test.tsx +162 -0
- package/src/home/ActionsCarousel.tsx +161 -0
- package/src/home/DivviBottomSheet.test.tsx +59 -0
- package/src/home/DivviBottomSheet.tsx +197 -0
- package/src/home/GetStarted.test.tsx +47 -0
- package/src/home/GetStarted.tsx +115 -0
- package/src/home/NotificationBell.test.tsx +81 -0
- package/src/home/NotificationBell.tsx +42 -0
- package/src/home/NotificationBox.test.tsx +373 -0
- package/src/home/NotificationBox.tsx +362 -0
- package/src/home/NotificationCenter.test.tsx +466 -0
- package/src/home/NotificationCenter.tsx +185 -0
- package/src/home/SendBar.tsx +60 -0
- package/src/home/TabHome.test.tsx +336 -0
- package/src/home/TabHome.tsx +181 -0
- package/src/home/__snapshots__/NotificationBox.test.tsx.snap +933 -0
- package/src/home/actions.ts +154 -0
- package/src/home/celebration/ConfettiCelebration.tsx +170 -0
- package/src/home/celebration/NftCelebration.test.tsx +137 -0
- package/src/home/celebration/NftCelebration.tsx +207 -0
- package/src/home/celebration/NftReward.test.tsx +94 -0
- package/src/home/celebration/NftReward.tsx +172 -0
- package/src/home/celebration/confettiAnimation.json +5126 -0
- package/src/home/celebration/utils.test.ts +32 -0
- package/src/home/celebration/utils.ts +21 -0
- package/src/home/reducers.test.ts +245 -0
- package/src/home/reducers.ts +191 -0
- package/src/home/saga.test.ts +34 -0
- package/src/home/saga.ts +87 -0
- package/src/home/selectors.test.ts +302 -0
- package/src/home/selectors.ts +82 -0
- package/src/home/types.ts +31 -0
- package/src/i18n/i18n.test.ts +106 -0
- package/src/i18n/index.ts +88 -0
- package/src/i18n/otaTranslations.test.ts +34 -0
- package/src/i18n/otaTranslations.ts +15 -0
- package/src/i18n/saga.test.ts +106 -0
- package/src/i18n/saga.ts +92 -0
- package/src/i18n/selectors.ts +12 -0
- package/src/i18n/slice.ts +46 -0
- package/src/i18n/useChangeLanguage.test.tsx +53 -0
- package/src/i18n/useChangeLanguage.ts +19 -0
- package/src/icons/Activity.tsx +21 -0
- package/src/icons/Apple.tsx +14 -0
- package/src/icons/ArrowDown.tsx +19 -0
- package/src/icons/ArrowRightThick.tsx +16 -0
- package/src/icons/Attention.tsx +22 -0
- package/src/icons/BackChevron.tsx +24 -0
- package/src/icons/Backspace.tsx +31 -0
- package/src/icons/BankIcon.tsx +23 -0
- package/src/icons/Celebration.tsx +18 -0
- package/src/icons/CheckCircle.tsx +19 -0
- package/src/icons/Checkmark.tsx +26 -0
- package/src/icons/CircleArrowIcon.tsx +39 -0
- package/src/icons/CircledIcon.tsx +47 -0
- package/src/icons/Clipboard.tsx +17 -0
- package/src/icons/ClockIcon.tsx +23 -0
- package/src/icons/CloudCheck.tsx +19 -0
- package/src/icons/ComingSoon.tsx +18 -0
- package/src/icons/CopyIcon.tsx +14 -0
- package/src/icons/CrossChainIndicator.tsx +36 -0
- package/src/icons/DataDown.tsx +16 -0
- package/src/icons/DataUp.tsx +16 -0
- package/src/icons/DownArrowIcon.tsx +37 -0
- package/src/icons/EarnCoins.tsx +22 -0
- package/src/icons/Error.tsx +30 -0
- package/src/icons/Exit.tsx +18 -0
- package/src/icons/ExploreTokens.tsx +17 -0
- package/src/icons/EyeIcon.tsx +22 -0
- package/src/icons/ForwardChevron.tsx +30 -0
- package/src/icons/GearIcon.tsx +19 -0
- package/src/icons/Google.tsx +14 -0
- package/src/icons/GradientIcon.tsx +70 -0
- package/src/icons/GreenLoadingSpinner.tsx +16 -0
- package/src/icons/GreenLoadingSpinnerToCheck.tsx +16 -0
- package/src/icons/HamburgerCard.tsx +55 -0
- package/src/icons/Help.tsx +21 -0
- package/src/icons/HiddenEyeIcon.tsx +26 -0
- package/src/icons/ImageErrorIcon.tsx +26 -0
- package/src/icons/InfoIcon.tsx +33 -0
- package/src/icons/KeylessBackup.tsx +32 -0
- package/src/icons/LinkArrow.tsx +27 -0
- package/src/icons/LoadingSpinner.tsx +25 -0
- package/src/icons/Lock.tsx +19 -0
- package/src/icons/MagicWand.tsx +20 -0
- package/src/icons/Manage.tsx +22 -0
- package/src/icons/NotificationBellIcon.tsx +25 -0
- package/src/icons/OpenLinkIcon.tsx +18 -0
- package/src/icons/Paste.tsx +33 -0
- package/src/icons/Phone.tsx +20 -0
- package/src/icons/Preferences.tsx +21 -0
- package/src/icons/QRCode.tsx +14 -0
- package/src/icons/RadioButton.tsx +39 -0
- package/src/icons/RedLoadingSpinnerToInfo.tsx +16 -0
- package/src/icons/Refresh.tsx +30 -0
- package/src/icons/Reward.tsx +29 -0
- package/src/icons/ScanIcon.tsx +26 -0
- package/src/icons/Search.tsx +25 -0
- package/src/icons/Share.tsx +21 -0
- package/src/icons/Social.tsx +15 -0
- package/src/icons/Stack.tsx +21 -0
- package/src/icons/StarOutline.tsx +14 -0
- package/src/icons/SwapAndDeposit.tsx +20 -0
- package/src/icons/SwapArrows.tsx +20 -0
- package/src/icons/ThumbsUpIllustration.tsx +64 -0
- package/src/icons/Times.tsx +38 -0
- package/src/icons/TripleDotVertical.tsx +18 -0
- package/src/icons/Trophy.tsx +18 -0
- package/src/icons/User.tsx +19 -0
- package/src/icons/Warning.tsx +22 -0
- package/src/icons/biometry/Face.tsx +28 -0
- package/src/icons/biometry/FaceID.tsx +18 -0
- package/src/icons/biometry/Fingerprint.tsx +16 -0
- package/src/icons/biometry/Iris.tsx +22 -0
- package/src/icons/biometry/TouchID.tsx +44 -0
- package/src/icons/loadingSpinnerGreen.json +401 -0
- package/src/icons/lottie-json/greenLoadingSpinner.json +370 -0
- package/src/icons/lottie-json/greenLoadingSpinnerToCheck.json +666 -0
- package/src/icons/lottie-json/redLoadingSpinnerToInfo.json +950 -0
- package/src/icons/navigator/Discover.tsx +17 -0
- package/src/icons/navigator/Home.tsx +18 -0
- package/src/icons/navigator/Wallet.tsx +18 -0
- package/src/icons/quick-actions/Add.tsx +18 -0
- package/src/icons/quick-actions/More.tsx +19 -0
- package/src/icons/quick-actions/Receive.tsx +18 -0
- package/src/icons/quick-actions/Send.tsx +18 -0
- package/src/icons/quick-actions/Withdraw.tsx +18 -0
- package/src/identity/actions.ts +244 -0
- package/src/identity/contactMapping.test.ts +391 -0
- package/src/identity/contactMapping.ts +422 -0
- package/src/identity/reducer.ts +243 -0
- package/src/identity/saga.test.ts +103 -0
- package/src/identity/saga.ts +122 -0
- package/src/identity/secureSend.ts +171 -0
- package/src/identity/selectors.ts +16 -0
- package/src/identity/types.ts +14 -0
- package/src/images/Blob.tsx +20 -0
- package/src/images/Celebration.tsx +35 -0
- package/src/images/DivviLogo.tsx +22 -0
- package/src/images/GuideKeyIcon.tsx +51 -0
- package/src/images/Images.ts +22 -0
- package/src/images/Logo.tsx +66 -0
- package/src/images/LogoHeart.tsx +206 -0
- package/src/images/NftReceivedIcon.tsx +18 -0
- package/src/images/NftSentIcon.tsx +18 -0
- package/src/images/Palm.tsx +21 -0
- package/src/images/Star.tsx +20 -0
- package/src/images/WelcomeLogo.tsx +19 -0
- package/src/images/assets/account-key-1.png +0 -0
- package/src/images/assets/account-key-1@1.5x.png +0 -0
- package/src/images/assets/account-key-1@2x.png +0 -0
- package/src/images/assets/account-key-1@3x.png +0 -0
- package/src/images/assets/account-key-1@4x.png +0 -0
- package/src/images/assets/account-key-2.png +0 -0
- package/src/images/assets/account-key-2@1.5x.png +0 -0
- package/src/images/assets/account-key-2@2x.png +0 -0
- package/src/images/assets/account-key-2@3x.png +0 -0
- package/src/images/assets/account-key-2@4x.png +0 -0
- package/src/images/assets/account-key-3.png +0 -0
- package/src/images/assets/account-key-3@1.5x.png +0 -0
- package/src/images/assets/account-key-3@2x.png +0 -0
- package/src/images/assets/account-key-3@3x.png +0 -0
- package/src/images/assets/account-key-3@4x.png +0 -0
- package/src/images/assets/account-key-4.png +0 -0
- package/src/images/assets/account-key-4@1.5x.png +0 -0
- package/src/images/assets/account-key-4@2x.png +0 -0
- package/src/images/assets/account-key-4@3x.png +0 -0
- package/src/images/assets/account-key-4@4x.png +0 -0
- package/src/images/assets/biometry-face-id.png +0 -0
- package/src/images/assets/biometry-face-id@1.5x.png +0 -0
- package/src/images/assets/biometry-face-id@2x.png +0 -0
- package/src/images/assets/biometry-face-id@3x.png +0 -0
- package/src/images/assets/biometry-face-id@4x.png +0 -0
- package/src/images/assets/biometry-face.png +0 -0
- package/src/images/assets/biometry-face@1.5x.png +0 -0
- package/src/images/assets/biometry-face@2x.png +0 -0
- package/src/images/assets/biometry-face@3x.png +0 -0
- package/src/images/assets/biometry-face@4x.png +0 -0
- package/src/images/assets/biometry-fingerprint.png +0 -0
- package/src/images/assets/biometry-fingerprint@1.5x.png +0 -0
- package/src/images/assets/biometry-fingerprint@2x.png +0 -0
- package/src/images/assets/biometry-fingerprint@3x.png +0 -0
- package/src/images/assets/biometry-fingerprint@4x.png +0 -0
- package/src/images/assets/biometry-iris.png +0 -0
- package/src/images/assets/biometry-iris@1.5x.png +0 -0
- package/src/images/assets/biometry-iris@2x.png +0 -0
- package/src/images/assets/biometry-iris@3x.png +0 -0
- package/src/images/assets/biometry-iris@4x.png +0 -0
- package/src/images/assets/biometry-touch-id.png +0 -0
- package/src/images/assets/biometry-touch-id@1.5x.png +0 -0
- package/src/images/assets/biometry-touch-id@2x.png +0 -0
- package/src/images/assets/biometry-touch-id@3x.png +0 -0
- package/src/images/assets/biometry-touch-id@4x.png +0 -0
- package/src/images/assets/celo-education-1.png +0 -0
- package/src/images/assets/celo-education-1@1.5x.png +0 -0
- package/src/images/assets/celo-education-1@2x.png +0 -0
- package/src/images/assets/celo-education-1@3x.png +0 -0
- package/src/images/assets/celo-education-1@4x.png +0 -0
- package/src/images/assets/celo-education-2.png +0 -0
- package/src/images/assets/celo-education-2@1.5x.png +0 -0
- package/src/images/assets/celo-education-2@2x.png +0 -0
- package/src/images/assets/celo-education-2@3x.png +0 -0
- package/src/images/assets/celo-education-2@4x.png +0 -0
- package/src/images/assets/celo-education-3.png +0 -0
- package/src/images/assets/celo-education-3@1.5x.png +0 -0
- package/src/images/assets/celo-education-3@2x.png +0 -0
- package/src/images/assets/celo-education-3@3x.png +0 -0
- package/src/images/assets/celo-education-3@4x.png +0 -0
- package/src/images/assets/celo-education-4.png +0 -0
- package/src/images/assets/celo-education-4@1.5x.png +0 -0
- package/src/images/assets/celo-education-4@2x.png +0 -0
- package/src/images/assets/celo-education-4@3x.png +0 -0
- package/src/images/assets/celo-education-4@4x.png +0 -0
- package/src/images/assets/earn-card-background.png +0 -0
- package/src/images/assets/earn-card-background@1.5x.png +0 -0
- package/src/images/assets/earn-card-background@2x.png +0 -0
- package/src/images/assets/earn-card-background@3x.png +0 -0
- package/src/images/assets/earn-card-background@4x.png +0 -0
- package/src/images/assets/email.png +0 -0
- package/src/images/assets/email@1.5x.png +0 -0
- package/src/images/assets/email@2x.png +0 -0
- package/src/images/assets/email@3x.png +0 -0
- package/src/images/assets/email@4x.png +0 -0
- package/src/images/assets/fiat-exchange.png +0 -0
- package/src/images/assets/fiat-exchange@1.5x.png +0 -0
- package/src/images/assets/fiat-exchange@2x.png +0 -0
- package/src/images/assets/fiat-exchange@3x.png +0 -0
- package/src/images/assets/fiat-exchange@4x.png +0 -0
- package/src/images/assets/get-verified.png +0 -0
- package/src/images/assets/get-verified@1.5x.png +0 -0
- package/src/images/assets/get-verified@2x.png +0 -0
- package/src/images/assets/get-verified@3x.png +0 -0
- package/src/images/assets/get-verified@4x.png +0 -0
- package/src/images/assets/learn-celo.png +0 -0
- package/src/images/assets/learn-celo@1.5x.png +0 -0
- package/src/images/assets/learn-celo@2x.png +0 -0
- package/src/images/assets/learn-celo@3x.png +0 -0
- package/src/images/assets/learn-celo@4x.png +0 -0
- package/src/images/assets/pie.png +0 -0
- package/src/images/assets/pie@1.5x.png +0 -0
- package/src/images/assets/pie@2x.png +0 -0
- package/src/images/assets/pie@3x.png +0 -0
- package/src/images/assets/pie@4x.png +0 -0
- package/src/images/assets/points-card-background.png +0 -0
- package/src/images/assets/points-card-background@1.5x.png +0 -0
- package/src/images/assets/points-card-background@2x.png +0 -0
- package/src/images/assets/points-card-background@3x.png +0 -0
- package/src/images/assets/points-card-background@4x.png +0 -0
- package/src/images/assets/points-illustration.png +0 -0
- package/src/images/assets/points-illustration@1.5x.png +0 -0
- package/src/images/assets/points-illustration@2x.png +0 -0
- package/src/images/assets/points-illustration@3x.png +0 -0
- package/src/images/assets/points-illustration@4x.png +0 -0
- package/src/images/assets/wallet-safe.png +0 -0
- package/src/images/assets/wallet-safe@1.5x.png +0 -0
- package/src/images/assets/wallet-safe@2x.png +0 -0
- package/src/images/assets/wallet-safe@3x.png +0 -0
- package/src/images/assets/wallet-safe@4x.png +0 -0
- package/src/import/ImportWallet.test.tsx +102 -0
- package/src/import/ImportWallet.tsx +277 -0
- package/src/import/actions.ts +41 -0
- package/src/import/reducer.ts +28 -0
- package/src/import/saga.test.ts +165 -0
- package/src/import/saga.ts +250 -0
- package/src/in-house-liquidity/client.test.ts +34 -0
- package/src/in-house-liquidity/client.ts +38 -0
- package/src/in-house-liquidity/index.test.ts +258 -0
- package/src/in-house-liquidity/index.ts +187 -0
- package/src/index.d.ts +25 -0
- package/src/jumpstart/JumpstartTransactionDetailsScreen.test.tsx +329 -0
- package/src/jumpstart/JumpstartTransactionDetailsScreen.tsx +407 -0
- package/src/jumpstart/fetchClaimStatus.ts +46 -0
- package/src/jumpstart/saga.test.ts +117 -0
- package/src/jumpstart/saga.ts +82 -0
- package/src/jumpstart/selectors.ts +5 -0
- package/src/jumpstart/slice.test.ts +51 -0
- package/src/jumpstart/slice.ts +64 -0
- package/src/keylessBackup/EnvelopeIcon.tsx +19 -0
- package/src/keylessBackup/KeylessBackupCancelButton.test.tsx +55 -0
- package/src/keylessBackup/KeylessBackupCancelButton.tsx +26 -0
- package/src/keylessBackup/KeylessBackupIntro.test.tsx +76 -0
- package/src/keylessBackup/KeylessBackupIntro.tsx +175 -0
- package/src/keylessBackup/KeylessBackupPhoneCodeInput.test.tsx +256 -0
- package/src/keylessBackup/KeylessBackupPhoneCodeInput.tsx +257 -0
- package/src/keylessBackup/KeylessBackupPhoneInput.test.tsx +67 -0
- package/src/keylessBackup/KeylessBackupPhoneInput.tsx +203 -0
- package/src/keylessBackup/KeylessBackupProgress.test.tsx +371 -0
- package/src/keylessBackup/KeylessBackupProgress.tsx +495 -0
- package/src/keylessBackup/LinkPhoneNumber.test.tsx +57 -0
- package/src/keylessBackup/LinkPhoneNumber.tsx +107 -0
- package/src/keylessBackup/SignInWithEmail.test.tsx +271 -0
- package/src/keylessBackup/SignInWithEmail.tsx +348 -0
- package/src/keylessBackup/SmartphoneIcon.tsx +19 -0
- package/src/keylessBackup/WalletSecurityPrimer.test.tsx +31 -0
- package/src/keylessBackup/WalletSecurityPrimer.tsx +81 -0
- package/src/keylessBackup/encryption.test.ts +139 -0
- package/src/keylessBackup/encryption.ts +121 -0
- package/src/keylessBackup/hooks.ts +179 -0
- package/src/keylessBackup/index.test.ts +204 -0
- package/src/keylessBackup/index.ts +98 -0
- package/src/keylessBackup/keychain.test.ts +55 -0
- package/src/keylessBackup/keychain.ts +30 -0
- package/src/keylessBackup/saga.test.ts +427 -0
- package/src/keylessBackup/saga.ts +264 -0
- package/src/keylessBackup/selectors.ts +8 -0
- package/src/keylessBackup/slice.ts +108 -0
- package/src/keylessBackup/types.ts +25 -0
- package/src/keylessBackup/web3auth.test.ts +74 -0
- package/src/keylessBackup/web3auth.ts +54 -0
- package/src/language/Language.test.tsx +41 -0
- package/src/language/Language.tsx +99 -0
- package/src/localCurrency/SelectLocalCurrency.test.tsx +19 -0
- package/src/localCurrency/SelectLocalCurrency.tsx +83 -0
- package/src/localCurrency/actions.ts +49 -0
- package/src/localCurrency/consts.test.ts +9 -0
- package/src/localCurrency/consts.ts +97 -0
- package/src/localCurrency/convert.test.ts +30 -0
- package/src/localCurrency/convert.ts +66 -0
- package/src/localCurrency/hooks.test.tsx +146 -0
- package/src/localCurrency/hooks.ts +47 -0
- package/src/localCurrency/reducer.ts +59 -0
- package/src/localCurrency/saga.test.ts +34 -0
- package/src/localCurrency/saga.ts +61 -0
- package/src/localCurrency/selectors.test.ts +47 -0
- package/src/localCurrency/selectors.ts +66 -0
- package/src/localCurrency/types.ts +6 -0
- package/src/missingGlobals.ts +21 -0
- package/src/nameGenerator/index.test.ts +46 -0
- package/src/nameGenerator/index.ts +17 -0
- package/src/nameGenerator/names.ts +938 -0
- package/src/navigator/DemoModeAuthBlock.test.tsx +60 -0
- package/src/navigator/DemoModeAuthBlock.tsx +61 -0
- package/src/navigator/DemoModeChipIndicator.test.tsx +109 -0
- package/src/navigator/DemoModeChipIndicator.tsx +76 -0
- package/src/navigator/Headers.tsx +263 -0
- package/src/navigator/NavigationService.test.tsx +74 -0
- package/src/navigator/NavigationService.ts +244 -0
- package/src/navigator/Navigator.tsx +760 -0
- package/src/navigator/NavigatorWrapper.test.tsx +65 -0
- package/src/navigator/NavigatorWrapper.tsx +248 -0
- package/src/navigator/QRNavigator.test.tsx +61 -0
- package/src/navigator/QRNavigator.tsx +144 -0
- package/src/navigator/Screens.tsx +107 -0
- package/src/navigator/ScrollAwareHeader.tsx +57 -0
- package/src/navigator/SettingsMenu.test.tsx +253 -0
- package/src/navigator/SettingsMenu.tsx +353 -0
- package/src/navigator/TabNavigator.test.tsx +181 -0
- package/src/navigator/TabNavigator.tsx +142 -0
- package/src/navigator/TopBarButton.test.tsx +44 -0
- package/src/navigator/TopBarButton.tsx +88 -0
- package/src/navigator/TopBarIconButtonV2.test.tsx +17 -0
- package/src/navigator/TopBarIconButtonV2.tsx +85 -0
- package/src/navigator/initialRoute.test.tsx +32 -0
- package/src/navigator/initialRoute.tsx +29 -0
- package/src/navigator/types.tsx +346 -0
- package/src/networkInfo/actions.ts +28 -0
- package/src/networkInfo/reducer.ts +44 -0
- package/src/networkInfo/saga.test.ts +43 -0
- package/src/networkInfo/saga.ts +100 -0
- package/src/networkInfo/selectors.ts +4 -0
- package/src/nfts/NftMedia.test.tsx +114 -0
- package/src/nfts/NftMedia.tsx +205 -0
- package/src/nfts/NftsInfoCarousel.test.tsx +218 -0
- package/src/nfts/NftsInfoCarousel.tsx +344 -0
- package/src/nfts/NftsLoadError.test.tsx +37 -0
- package/src/nfts/NftsLoadError.tsx +111 -0
- package/src/nfts/saga.test.tsx +502 -0
- package/src/nfts/saga.ts +198 -0
- package/src/nfts/selectors.ts +13 -0
- package/src/nfts/slice.ts +45 -0
- package/src/nfts/types.ts +51 -0
- package/src/notifications/NotificationList.test.tsx +25 -0
- package/src/notifications/NotificationList.tsx +45 -0
- package/src/notifications/__snapshots__/NotificationList.test.tsx.snap +35 -0
- package/src/notifications/types.ts +31 -0
- package/src/onboarding/LanguageButton.tsx +26 -0
- package/src/onboarding/TopBarTextButtonOnboarding.test.tsx +22 -0
- package/src/onboarding/TopBarTextButtonOnboarding.tsx +17 -0
- package/src/onboarding/actions.ts +46 -0
- package/src/onboarding/registration/EnableBiometry.test.tsx +168 -0
- package/src/onboarding/registration/EnableBiometry.tsx +207 -0
- package/src/onboarding/registration/ImportSelect.test.tsx +54 -0
- package/src/onboarding/registration/ImportSelect.tsx +167 -0
- package/src/onboarding/registration/OnboardingRecoveryPhrase.test.tsx +83 -0
- package/src/onboarding/registration/OnboardingRecoveryPhrase.tsx +197 -0
- package/src/onboarding/registration/ProtectWallet.test.tsx +96 -0
- package/src/onboarding/registration/ProtectWallet.tsx +153 -0
- package/src/onboarding/registration/RegulatoryTerms.test.tsx +75 -0
- package/src/onboarding/registration/RegulatoryTerms.tsx +174 -0
- package/src/onboarding/registration/SelectCountry.test.tsx +51 -0
- package/src/onboarding/registration/SelectCountry.tsx +88 -0
- package/src/onboarding/registration/SelectCountryItem.tsx +59 -0
- package/src/onboarding/steps.test.ts +464 -0
- package/src/onboarding/steps.ts +303 -0
- package/src/onboarding/success/OnboardingSuccessScreen.tsx +64 -0
- package/src/onboarding/types.ts +14 -0
- package/src/onboarding/welcome/Welcome.test.tsx +234 -0
- package/src/onboarding/welcome/Welcome.tsx +182 -0
- package/src/pincode/PasswordCache.ts +71 -0
- package/src/pincode/Pincode.tsx +109 -0
- package/src/pincode/PincodeDisplay.tsx +92 -0
- package/src/pincode/PincodeEnter.test.tsx +85 -0
- package/src/pincode/PincodeEnter.tsx +103 -0
- package/src/pincode/PincodeLock.test.tsx +144 -0
- package/src/pincode/PincodeLock.tsx +121 -0
- package/src/pincode/PincodeSet.test.tsx +213 -0
- package/src/pincode/PincodeSet.tsx +263 -0
- package/src/pincode/authentication.test.ts +654 -0
- package/src/pincode/authentication.ts +425 -0
- package/src/points/ActivityCard.test.tsx +63 -0
- package/src/points/ActivityCard.tsx +101 -0
- package/src/points/ActivityCardSection.tsx +126 -0
- package/src/points/PointsDiscoverCard.test.tsx +106 -0
- package/src/points/PointsDiscoverCard.tsx +122 -0
- package/src/points/PointsHistoryBottomSheet.test.tsx +179 -0
- package/src/points/PointsHistoryBottomSheet.tsx +264 -0
- package/src/points/PointsHome.test.tsx +230 -0
- package/src/points/PointsHome.tsx +357 -0
- package/src/points/PointsIntro.test.tsx +67 -0
- package/src/points/PointsIntro.tsx +85 -0
- package/src/points/cardDefinitions.tsx +94 -0
- package/src/points/cardSort.test.ts +58 -0
- package/src/points/cardSort.ts +18 -0
- package/src/points/saga.test.ts +769 -0
- package/src/points/saga.ts +379 -0
- package/src/points/selectors.test.ts +73 -0
- package/src/points/selectors.ts +68 -0
- package/src/points/slice.test.ts +76 -0
- package/src/points/slice.ts +164 -0
- package/src/points/types.ts +94 -0
- package/src/positions/HooksPreviewModeBanner.test.tsx +56 -0
- package/src/positions/HooksPreviewModeBanner.tsx +69 -0
- package/src/positions/actions.ts +11 -0
- package/src/positions/getPositionBalanceUsd.ts +14 -0
- package/src/positions/saga.test.ts +468 -0
- package/src/positions/saga.ts +378 -0
- package/src/positions/selectors.test.ts +281 -0
- package/src/positions/selectors.ts +189 -0
- package/src/positions/slice.ts +219 -0
- package/src/positions/transactions.ts +21 -0
- package/src/positions/types.ts +137 -0
- package/src/priceHistory/PriceHistoryChart.test.tsx +200 -0
- package/src/priceHistory/PriceHistoryChart.tsx +345 -0
- package/src/priceHistory/__snapshots__/PriceHistoryChart.test.tsx.snap +419 -0
- package/src/priceHistory/saga.test.ts +120 -0
- package/src/priceHistory/saga.ts +62 -0
- package/src/priceHistory/selectors.test.ts +52 -0
- package/src/priceHistory/selectors.ts +17 -0
- package/src/priceHistory/slice.test.ts +94 -0
- package/src/priceHistory/slice.ts +68 -0
- package/src/public/components/Button.tsx +66 -0
- package/src/public/createApp.ts +67 -0
- package/src/public/getFees.test.ts +24 -0
- package/src/public/getFees.ts +8 -0
- package/src/public/getPublicClient.test.ts +19 -0
- package/src/public/getPublicClient.ts +25 -0
- package/src/public/getWalletClient.test.ts +30 -0
- package/src/public/getWalletClient.ts +32 -0
- package/src/public/hooks/toAsyncStatus.ts +19 -0
- package/src/public/hooks/usePrepareTransactions.test.ts +63 -0
- package/src/public/hooks/usePrepareTransactions.ts +15 -0
- package/src/public/hooks/usePublicClient.test.ts +24 -0
- package/src/public/hooks/usePublicClient.ts +7 -0
- package/src/public/hooks/useSendTransactions.test.ts +49 -0
- package/src/public/hooks/useSendTransactions.ts +15 -0
- package/src/public/hooks/useWallet.ts +52 -0
- package/src/public/hooks/useWalletClient.test.ts +35 -0
- package/src/public/hooks/useWalletClient.ts +24 -0
- package/src/public/index.ts +29 -0
- package/src/public/navigate.test.ts +168 -0
- package/src/public/navigate.ts +168 -0
- package/src/public/prepareTransactions.test.ts +76 -0
- package/src/public/prepareTransactions.ts +78 -0
- package/src/public/sendTransactions.test.ts +37 -0
- package/src/public/sendTransactions.ts +25 -0
- package/src/public/types.tsx +278 -0
- package/src/public/unlockAccount.test.ts +79 -0
- package/src/public/unlockAccount.ts +43 -0
- package/src/qrcode/NotAuthorizedView.test.tsx +11 -0
- package/src/qrcode/NotAuthorizedView.tsx +47 -0
- package/src/qrcode/QRCode.test.tsx +117 -0
- package/src/qrcode/QRCode.tsx +190 -0
- package/src/qrcode/QRScanner.tsx +249 -0
- package/src/qrcode/QRTabBar.tsx +137 -0
- package/src/qrcode/StyledQRCode.tsx +31 -0
- package/src/qrcode/StyledQRGen.tsx +26 -0
- package/src/qrcode/__snapshots__/NotAuthorizedView.test.tsx.snap +90 -0
- package/src/qrcode/schema.test.ts +121 -0
- package/src/qrcode/schema.ts +45 -0
- package/src/qrcode/utils.test.tsx +293 -0
- package/src/qrcode/utils.ts +230 -0
- package/src/recaptcha/RecaptchaService.ts +105 -0
- package/src/recaptcha/saga.ts +24 -0
- package/src/recipients/RecipientItemV2.test.tsx +153 -0
- package/src/recipients/RecipientItemV2.tsx +142 -0
- package/src/recipients/RecipientPickerV2.test.tsx +110 -0
- package/src/recipients/RecipientPickerV2.tsx +61 -0
- package/src/recipients/recipient.test.ts +113 -0
- package/src/recipients/recipient.ts +313 -0
- package/src/recipients/reducer.ts +107 -0
- package/src/recipients/resolve-id.ts +21 -0
- package/src/recipients/saga.ts +87 -0
- package/src/redux/apiReducersList.ts +11 -0
- package/src/redux/createMigrate.test.ts +113 -0
- package/src/redux/createMigrate.ts +46 -0
- package/src/redux/hooks.ts +7 -0
- package/src/redux/migrations.test.ts +1925 -0
- package/src/redux/migrations.ts +2069 -0
- package/src/redux/persist-helper.ts +14 -0
- package/src/redux/reducers.ts +29 -0
- package/src/redux/reducersForSchemaGeneration.ts +20 -0
- package/src/redux/reducersList.ts +57 -0
- package/src/redux/sagas-helpers.ts +29 -0
- package/src/redux/sagas.test.ts +19 -0
- package/src/redux/sagas.ts +155 -0
- package/src/redux/selectors.ts +3 -0
- package/src/redux/store.test.ts +391 -0
- package/src/redux/store.ts +151 -0
- package/src/send/EnterAmount.test.tsx +1030 -0
- package/src/send/EnterAmount.tsx +360 -0
- package/src/send/EnterAmountOptions.tsx +170 -0
- package/src/send/PasteAddressButton.tsx +81 -0
- package/src/send/SelectRecipientButtons.test.tsx +256 -0
- package/src/send/SelectRecipientButtons.tsx +202 -0
- package/src/send/SendConfirmation.test.tsx +233 -0
- package/src/send/SendConfirmation.tsx +317 -0
- package/src/send/SendEnterAmount.test.tsx +235 -0
- package/src/send/SendEnterAmount.tsx +123 -0
- package/src/send/SendSelectRecipient.test.tsx +765 -0
- package/src/send/SendSelectRecipient.tsx +504 -0
- package/src/send/SendSelectRecipientSearchInput.tsx +72 -0
- package/src/send/ValidateRecipientAccount.test.tsx +181 -0
- package/src/send/ValidateRecipientAccount.tsx +387 -0
- package/src/send/ValidateRecipientIntro.test.tsx +61 -0
- package/src/send/ValidateRecipientIntro.tsx +136 -0
- package/src/send/__snapshots__/ValidateRecipientAccount.test.tsx.snap +777 -0
- package/src/send/actions.ts +142 -0
- package/src/send/hooks.test.tsx +371 -0
- package/src/send/hooks.ts +445 -0
- package/src/send/reducers.ts +90 -0
- package/src/send/saga.test.ts +247 -0
- package/src/send/saga.ts +176 -0
- package/src/send/selectors.ts +22 -0
- package/src/send/types.ts +18 -0
- package/src/send/useFetchRecipientVerificationStatus.ts +67 -0
- package/src/send/usePrepareSendTransactions.test.ts +135 -0
- package/src/send/usePrepareSendTransactions.ts +69 -0
- package/src/send/utils.test.ts +361 -0
- package/src/send/utils.ts +116 -0
- package/src/sendCalls/constants.ts +11 -0
- package/src/sendCalls/saga.test.ts +31 -0
- package/src/sendCalls/saga.ts +15 -0
- package/src/sendCalls/selectors.test.ts +40 -0
- package/src/sendCalls/selectors.ts +8 -0
- package/src/sendCalls/slice.test.ts +85 -0
- package/src/sendCalls/slice.ts +72 -0
- package/src/sentry/Sentry.ts +75 -0
- package/src/sentry/SentrySpanHub.ts +27 -0
- package/src/sentry/SentrySpans.tsx +57 -0
- package/src/sentry/actions.ts +11 -0
- package/src/sentry/saga.ts +8 -0
- package/src/shared/DisconnectBanner.test.tsx +25 -0
- package/src/shared/DisconnectBanner.tsx +81 -0
- package/src/shared/__snapshots__/DisconnectBanner.test.tsx.snap +29 -0
- package/src/shared/conts.ts +16 -0
- package/src/statsig/client.test.ts +62 -0
- package/src/statsig/client.ts +97 -0
- package/src/statsig/constants.ts +177 -0
- package/src/statsig/index.test.ts +351 -0
- package/src/statsig/index.ts +186 -0
- package/src/statsig/selector.ts +17 -0
- package/src/statsig/types.ts +52 -0
- package/src/storage/keychain.tsx +92 -0
- package/src/styles/accessibility.ts +7 -0
- package/src/styles/appTheme.ts +13 -0
- package/src/styles/colors.tsx +78 -0
- package/src/styles/fonts.tsx +143 -0
- package/src/styles/hapticFeedback.ts +27 -0
- package/src/styles/progressDots.ts +23 -0
- package/src/styles/styles.ts +67 -0
- package/src/styles/variables.tsx +16 -0
- package/src/swap/SwapAmountInput.tsx +228 -0
- package/src/swap/SwapScreen.test.tsx +1927 -0
- package/src/swap/SwapScreen.tsx +1156 -0
- package/src/swap/SwapScreenV2.test.tsx +2180 -0
- package/src/swap/SwapScreenV2.tsx +1201 -0
- package/src/swap/SwapTransactionDetails.test.tsx +217 -0
- package/src/swap/SwapTransactionDetails.tsx +274 -0
- package/src/swap/UnfavorableRateBottomSheet.test.tsx +150 -0
- package/src/swap/UnfavorableRateBottomSheet.tsx +288 -0
- package/src/swap/getCrossChainFee.ts +64 -0
- package/src/swap/getSwapTxsAnalyticsProperties.tsx +49 -0
- package/src/swap/saga.test.ts +863 -0
- package/src/swap/saga.ts +324 -0
- package/src/swap/selectors.ts +5 -0
- package/src/swap/slice.test.ts +133 -0
- package/src/swap/slice.ts +93 -0
- package/src/swap/types.ts +98 -0
- package/src/swap/useFilterChips.ts +69 -0
- package/src/swap/useSwapQuote.ts +292 -0
- package/src/tokens/AssetList.test.tsx +270 -0
- package/src/tokens/AssetList.tsx +388 -0
- package/src/tokens/AssetTabBar.test.tsx +130 -0
- package/src/tokens/AssetTabBar.tsx +106 -0
- package/src/tokens/PasteButton.test.tsx +30 -0
- package/src/tokens/PasteButton.tsx +34 -0
- package/src/tokens/PositionIcon.tsx +22 -0
- package/src/tokens/PositionItem.test.tsx +132 -0
- package/src/tokens/PositionItem.tsx +131 -0
- package/src/tokens/TabWallet.test.tsx +386 -0
- package/src/tokens/TabWallet.tsx +237 -0
- package/src/tokens/TokenBalanceItem.test.tsx +119 -0
- package/src/tokens/TokenBalanceItem.tsx +143 -0
- package/src/tokens/TokenDetails.test.tsx +476 -0
- package/src/tokens/TokenDetails.tsx +391 -0
- package/src/tokens/TokenDetailsMoreActions.test.tsx +120 -0
- package/src/tokens/TokenDetailsMoreActions.tsx +87 -0
- package/src/tokens/TokenImport.test.tsx +376 -0
- package/src/tokens/TokenImport.tsx +381 -0
- package/src/tokens/hooks.test.tsx +419 -0
- package/src/tokens/hooks.ts +164 -0
- package/src/tokens/saga.test.ts +527 -0
- package/src/tokens/saga.ts +248 -0
- package/src/tokens/selectors.test.ts +888 -0
- package/src/tokens/selectors.ts +516 -0
- package/src/tokens/slice.ts +173 -0
- package/src/tokens/types.ts +29 -0
- package/src/tokens/utils.test.tsx +330 -0
- package/src/tokens/utils.ts +218 -0
- package/src/transactions/NoActivity.test.tsx +30 -0
- package/src/transactions/NoActivity.tsx +73 -0
- package/src/transactions/TransferAvatars.tsx +39 -0
- package/src/transactions/UserSection.tsx +133 -0
- package/src/transactions/api.ts +67 -0
- package/src/transactions/apiTestHelpers.ts +55 -0
- package/src/transactions/feed/ClaimRewardFeedItem.test.tsx +164 -0
- package/src/transactions/feed/ClaimRewardFeedItem.tsx +142 -0
- package/src/transactions/feed/DepositOrWithdrawFeedItem.test.tsx +138 -0
- package/src/transactions/feed/DepositOrWithdrawFeedItem.tsx +178 -0
- package/src/transactions/feed/EarnFeedItem.test.tsx +189 -0
- package/src/transactions/feed/EarnFeedItem.tsx +190 -0
- package/src/transactions/feed/NftFeedItem.test.tsx +102 -0
- package/src/transactions/feed/NftFeedItem.tsx +99 -0
- package/src/transactions/feed/SwapFeedItem.test.tsx +137 -0
- package/src/transactions/feed/SwapFeedItem.tsx +128 -0
- package/src/transactions/feed/TokenApprovalFeedItem.test.tsx +37 -0
- package/src/transactions/feed/TokenApprovalFeedItem.tsx +59 -0
- package/src/transactions/feed/TransactionDetails.tsx +160 -0
- package/src/transactions/feed/TransactionDetailsScreen.test.tsx +1228 -0
- package/src/transactions/feed/TransactionDetailsScreen.tsx +157 -0
- package/src/transactions/feed/TransactionFeed.test.tsx +474 -0
- package/src/transactions/feed/TransactionFeed.tsx +172 -0
- package/src/transactions/feed/TransactionFeedItemImage.test.tsx +66 -0
- package/src/transactions/feed/TransactionFeedItemImage.tsx +116 -0
- package/src/transactions/feed/TransactionFeedV2.test.tsx +576 -0
- package/src/transactions/feed/TransactionFeedV2.tsx +504 -0
- package/src/transactions/feed/TransactionPrimaryAction.test.tsx +62 -0
- package/src/transactions/feed/TransactionPrimaryAction.tsx +83 -0
- package/src/transactions/feed/TransactionStatusIndicator.test.tsx +15 -0
- package/src/transactions/feed/TransactionStatusIndicator.tsx +63 -0
- package/src/transactions/feed/TransferFeedItem.test.tsx +579 -0
- package/src/transactions/feed/TransferFeedItem.tsx +148 -0
- package/src/transactions/feed/detailContent/ClaimRewardContent.tsx +84 -0
- package/src/transactions/feed/detailContent/DepositOrWithdrawContent.tsx +169 -0
- package/src/transactions/feed/detailContent/EarnContent.tsx +259 -0
- package/src/transactions/feed/detailContent/FeeRowItem.tsx +90 -0
- package/src/transactions/feed/detailContent/RewardReceivedContent.tsx +46 -0
- package/src/transactions/feed/detailContent/SwapContent.tsx +127 -0
- package/src/transactions/feed/detailContent/TokenApprovalDetails.tsx +59 -0
- package/src/transactions/feed/detailContent/TransferReceivedContent.tsx +73 -0
- package/src/transactions/feed/detailContent/TransferSentContent.tsx +117 -0
- package/src/transactions/feed/queryHelper.test.ts +229 -0
- package/src/transactions/feed/queryHelper.ts +941 -0
- package/src/transactions/saga.test.ts +482 -0
- package/src/transactions/saga.ts +322 -0
- package/src/transactions/selectors.ts +120 -0
- package/src/transactions/send.test.ts +29 -0
- package/src/transactions/send.ts +51 -0
- package/src/transactions/slice.test.ts +372 -0
- package/src/transactions/slice.ts +262 -0
- package/src/transactions/transferFeedUtils.ts +225 -0
- package/src/transactions/types.ts +355 -0
- package/src/transactions/utils.test.ts +98 -0
- package/src/transactions/utils.ts +122 -0
- package/src/utils/AppRestart.ts +12 -0
- package/src/utils/Countries.test.ts +180 -0
- package/src/utils/Countries.ts +121 -0
- package/src/utils/IosVersionUtils.ts +6 -0
- package/src/utils/Logger.test.ts +113 -0
- package/src/utils/Logger.ts +304 -0
- package/src/utils/LoggerLevels.ts +6 -0
- package/src/utils/account.test.ts +390 -0
- package/src/utils/account.ts +497 -0
- package/src/utils/accountChecker.test.ts +75 -0
- package/src/utils/accountChecker.ts +77 -0
- package/src/utils/address.test.ts +62 -0
- package/src/utils/address.ts +34 -0
- package/src/utils/aes.test.ts +36 -0
- package/src/utils/aes.ts +46 -0
- package/src/utils/contacts.ts +78 -0
- package/src/utils/contentTranslations.ts +18 -0
- package/src/utils/country.json +257 -0
- package/src/utils/countryFeatures.ts +21 -0
- package/src/utils/currencies.ts +72 -0
- package/src/utils/displayFormatting.ts +11 -0
- package/src/utils/ensureError.test.ts +32 -0
- package/src/utils/ensureError.ts +13 -0
- package/src/utils/fetchWithTimeout.test.ts +55 -0
- package/src/utils/fetchWithTimeout.ts +15 -0
- package/src/utils/formatting.test.ts +93 -0
- package/src/utils/formatting.ts +107 -0
- package/src/utils/getCountryEmoji.ts +28 -0
- package/src/utils/getPhoneHash.ts +29 -0
- package/src/utils/gql.ts +8 -0
- package/src/utils/identifier.ts +81 -0
- package/src/utils/inputValidation.test.ts +53 -0
- package/src/utils/inputValidation.ts +76 -0
- package/src/utils/io.ts +39 -0
- package/src/utils/linking.ts +42 -0
- package/src/utils/moneyAmount.ts +16 -0
- package/src/utils/parsing.test.ts +30 -0
- package/src/utils/parsing.ts +20 -0
- package/src/utils/phoneNumber.test.ts +236 -0
- package/src/utils/phoneNumbers.ts +240 -0
- package/src/utils/random.test.ts +53 -0
- package/src/utils/random.ts +48 -0
- package/src/utils/safely.test.ts +101 -0
- package/src/utils/safely.ts +30 -0
- package/src/utils/sleep.ts +3 -0
- package/src/utils/string.ts +8 -0
- package/src/utils/stylize.ts +30 -0
- package/src/utils/time.test.ts +76 -0
- package/src/utils/time.ts +99 -0
- package/src/utils/typescript.ts +38 -0
- package/src/utils/useBackHandler.ts +10 -0
- package/src/utils/useClipboard.ts +56 -0
- package/src/utils/versionCheck.test.ts +47 -0
- package/src/utils/versionCheck.ts +35 -0
- package/src/verify/ResendButtonWithDelay.tsx +56 -0
- package/src/verify/VerificationCodeInput.test.tsx +87 -0
- package/src/verify/VerificationCodeInput.tsx +103 -0
- package/src/verify/VerificationCodeInputScreen.test.tsx +364 -0
- package/src/verify/VerificationCodeInputScreen.tsx +138 -0
- package/src/verify/VerificationStartScreen.test.tsx +218 -0
- package/src/verify/VerificationStartScreen.tsx +311 -0
- package/src/verify/hooks.test.tsx +85 -0
- package/src/verify/hooks.ts +261 -0
- package/src/viem/estimateFeesPerGas.test.ts +129 -0
- package/src/viem/estimateFeesPerGas.ts +70 -0
- package/src/viem/getLockableWallet.test.ts +263 -0
- package/src/viem/getLockableWallet.ts +120 -0
- package/src/viem/index.ts +86 -0
- package/src/viem/keychainAccountToAccount.test.ts +55 -0
- package/src/viem/keychainAccountToAccount.ts +58 -0
- package/src/viem/prepareTransactions.test.ts +1668 -0
- package/src/viem/prepareTransactions.ts +741 -0
- package/src/viem/preparedTransactionSerialization.test.ts +192 -0
- package/src/viem/preparedTransactionSerialization.ts +100 -0
- package/src/viem/saga.test.ts +227 -0
- package/src/viem/saga.ts +118 -0
- package/src/walletConnect/actions.test.ts +94 -0
- package/src/walletConnect/actions.ts +232 -0
- package/src/walletConnect/analytics.ts +58 -0
- package/src/walletConnect/capabilities.ts +175 -0
- package/src/walletConnect/constants.ts +157 -0
- package/src/walletConnect/reducer.ts +105 -0
- package/src/walletConnect/request.test.ts +698 -0
- package/src/walletConnect/request.ts +225 -0
- package/src/walletConnect/saga.test.ts +1875 -0
- package/src/walletConnect/saga.ts +1159 -0
- package/src/walletConnect/screens/ActionRequest.test.tsx +727 -0
- package/src/walletConnect/screens/ActionRequest.tsx +227 -0
- package/src/walletConnect/screens/ActionRequestPayload.tsx +84 -0
- package/src/walletConnect/screens/ConnectionTimedOut.tsx +34 -0
- package/src/walletConnect/screens/DappsDisclaimer.tsx +31 -0
- package/src/walletConnect/screens/EstimatedNetworkFee.test.tsx +88 -0
- package/src/walletConnect/screens/EstimatedNetworkFee.tsx +134 -0
- package/src/walletConnect/screens/Logos.tsx +89 -0
- package/src/walletConnect/screens/RequestContent.tsx +224 -0
- package/src/walletConnect/screens/SessionRequest.test.tsx +274 -0
- package/src/walletConnect/screens/SessionRequest.tsx +221 -0
- package/src/walletConnect/screens/Sessions.tsx +142 -0
- package/src/walletConnect/screens/WalletConnectRequest.tsx +63 -0
- package/src/walletConnect/screens/useIsDappListed.test.tsx +51 -0
- package/src/walletConnect/screens/useIsDappListed.ts +20 -0
- package/src/walletConnect/selectors.ts +25 -0
- package/src/walletConnect/types.ts +99 -0
- package/src/walletConnect/walletConnect.ts +87 -0
- package/src/web3/KeychainAccounts.test.ts +326 -0
- package/src/web3/KeychainAccounts.ts +309 -0
- package/src/web3/actions.ts +30 -0
- package/src/web3/consts.ts +8 -0
- package/src/web3/contracts.test.ts +115 -0
- package/src/web3/contracts.ts +74 -0
- package/src/web3/networkConfig.test.ts +18 -0
- package/src/web3/networkConfig.ts +621 -0
- package/src/web3/reducer.ts +39 -0
- package/src/web3/saga.test.ts +200 -0
- package/src/web3/saga.ts +229 -0
- package/src/web3/selectors.ts +47 -0
- package/src/web3/utils.test.ts +12 -0
- package/src/web3/utils.ts +11 -0
- package/src/webview/WebViewAndroidBottomSheet.test.tsx +58 -0
- package/src/webview/WebViewAndroidBottomSheet.tsx +83 -0
- package/src/webview/WebViewScreen.test.tsx +84 -0
- package/src/webview/WebViewScreen.tsx +296 -0
- package/src/webview/__snapshots__/WebViewAndroidBottomSheet.test.tsx.snap +249 -0
- package/tsconfig.base.json +5 -0
- package/tsconfig.json +30 -0
|
@@ -0,0 +1,2069 @@
|
|
|
1
|
+
import _ from 'lodash'
|
|
2
|
+
import {
|
|
3
|
+
FinclusiveKycStatus,
|
|
4
|
+
PincodeType,
|
|
5
|
+
RecoveryPhraseInOnboardingStatus,
|
|
6
|
+
} from 'src/account/reducer'
|
|
7
|
+
import {
|
|
8
|
+
DEFAULT_SENTRY_NETWORK_ERRORS,
|
|
9
|
+
DEFAULT_SENTRY_TRACES_SAMPLE_RATE,
|
|
10
|
+
ONBOARDING_FEATURES_ENABLED,
|
|
11
|
+
} from 'src/config'
|
|
12
|
+
import { Dapp } from 'src/dapps/types'
|
|
13
|
+
import { CachedQuoteParams, SendingFiatAccountStatus } from 'src/fiatconnect/slice'
|
|
14
|
+
import { AddressToDisplayNameType } from 'src/identity/reducer'
|
|
15
|
+
import { LocalCurrencyCode } from 'src/localCurrency/consts'
|
|
16
|
+
import { Screens } from 'src/navigator/Screens'
|
|
17
|
+
import { ToggleableOnboardingFeatures } from 'src/onboarding/types'
|
|
18
|
+
import { Position } from 'src/positions/types'
|
|
19
|
+
import { Recipient } from 'src/recipients/recipient'
|
|
20
|
+
import { Network, NetworkId, StandbyTransaction, TokenTransaction } from 'src/transactions/types'
|
|
21
|
+
import { CiCoCurrency, Currency } from 'src/utils/currencies'
|
|
22
|
+
import networkConfig from 'src/web3/networkConfig'
|
|
23
|
+
|
|
24
|
+
export function updateCachedQuoteParams(cachedQuoteParams: {
|
|
25
|
+
[providerId: string]: {
|
|
26
|
+
[kycSchema: string]: any
|
|
27
|
+
}
|
|
28
|
+
}) {
|
|
29
|
+
const newCachedQuoteParams: {
|
|
30
|
+
[providerId: string]: {
|
|
31
|
+
[kycSchema: string]: CachedQuoteParams
|
|
32
|
+
}
|
|
33
|
+
} = {}
|
|
34
|
+
|
|
35
|
+
Object.entries(cachedQuoteParams).forEach(([providerId, kycSchemas]) => {
|
|
36
|
+
newCachedQuoteParams[providerId] = {}
|
|
37
|
+
Object.entries(kycSchemas).forEach(([kycSchema, cachedParams]) => {
|
|
38
|
+
newCachedQuoteParams[providerId][kycSchema] = {
|
|
39
|
+
...cachedParams,
|
|
40
|
+
cryptoType:
|
|
41
|
+
cachedParams.cryptoType === Currency.Celo ? CiCoCurrency.CELO : cachedParams.cryptoType,
|
|
42
|
+
}
|
|
43
|
+
})
|
|
44
|
+
})
|
|
45
|
+
return newCachedQuoteParams
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const DEFAULT_DAILY_PAYMENT_LIMIT_CUSD_LEGACY = 1000
|
|
49
|
+
|
|
50
|
+
export const exchangeInitialState = {
|
|
51
|
+
history: {
|
|
52
|
+
celoGoldExchangeRates: [],
|
|
53
|
+
aggregatedExchangeRates: [],
|
|
54
|
+
granularity: 60,
|
|
55
|
+
range: 30 * 24 * 60 * 60 * 1000, // 30 days
|
|
56
|
+
lastTimeUpdated: 0,
|
|
57
|
+
},
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export const migrations = {
|
|
61
|
+
0: (state: any) => {
|
|
62
|
+
const e164NumberToAddressOld = state.identity.e164NumberToAddress
|
|
63
|
+
const e164NumberToAddress: any = {}
|
|
64
|
+
Object.keys(e164NumberToAddressOld).map((e164) => {
|
|
65
|
+
e164NumberToAddress[e164] = [e164NumberToAddressOld[e164]]
|
|
66
|
+
})
|
|
67
|
+
return {
|
|
68
|
+
...state,
|
|
69
|
+
identity: {
|
|
70
|
+
...state.identity,
|
|
71
|
+
e164NumberToAddress,
|
|
72
|
+
},
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
1: (state: any) => {
|
|
76
|
+
const invitees = Object.entries(state.invite.invitees).map(([address, e164Number]) => ({
|
|
77
|
+
timestamp: Date.now(),
|
|
78
|
+
e164Number,
|
|
79
|
+
tempWalletAddress: address,
|
|
80
|
+
tempWalletPrivateKey: 'fakePrivateKey',
|
|
81
|
+
tempWalletRedeemed: false,
|
|
82
|
+
inviteCode: 'fakeInviteCode',
|
|
83
|
+
inviteLink: 'fakeInviteLink',
|
|
84
|
+
}))
|
|
85
|
+
|
|
86
|
+
return {
|
|
87
|
+
...state,
|
|
88
|
+
invite: {
|
|
89
|
+
...state.invite,
|
|
90
|
+
invitees,
|
|
91
|
+
},
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
2: (state: any) => {
|
|
95
|
+
return {
|
|
96
|
+
...state,
|
|
97
|
+
app: {
|
|
98
|
+
...state.app,
|
|
99
|
+
numberVerified: false,
|
|
100
|
+
},
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
3: (state: any) => {
|
|
104
|
+
return {
|
|
105
|
+
...state,
|
|
106
|
+
send: {
|
|
107
|
+
...state.send,
|
|
108
|
+
recentPayments: [],
|
|
109
|
+
},
|
|
110
|
+
account: {
|
|
111
|
+
...state.account,
|
|
112
|
+
hasMigratedToNewBip39: false,
|
|
113
|
+
},
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
4: (state: any) => {
|
|
117
|
+
return {
|
|
118
|
+
...state,
|
|
119
|
+
identity: {
|
|
120
|
+
...state.identity,
|
|
121
|
+
acceptedAttestationCodes: [],
|
|
122
|
+
},
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
5: (state: any) => {
|
|
126
|
+
return {
|
|
127
|
+
...state,
|
|
128
|
+
paymentRequest: {
|
|
129
|
+
incomingPaymentRequests: state.account.incomingPaymentRequests || [],
|
|
130
|
+
outgoingPaymentRequests: state.account.outgoingPaymentRequests || [],
|
|
131
|
+
},
|
|
132
|
+
account: {
|
|
133
|
+
...state.account,
|
|
134
|
+
incomingPaymentRequests: undefined,
|
|
135
|
+
outgoingPaymentRequests: undefined,
|
|
136
|
+
},
|
|
137
|
+
web3: {
|
|
138
|
+
...state.web3,
|
|
139
|
+
dataEncryptionKey: state.web3.commentKey,
|
|
140
|
+
commentKey: undefined,
|
|
141
|
+
},
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
6: (state: any) => {
|
|
145
|
+
return {
|
|
146
|
+
...state,
|
|
147
|
+
invite: {
|
|
148
|
+
...state.invite,
|
|
149
|
+
redeemComplete: !!state.web3.account,
|
|
150
|
+
},
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
7: (state: any) => {
|
|
154
|
+
const newAddressToDisplayName = Object.keys(state.identity.addressToDisplayName || {}).reduce(
|
|
155
|
+
(newMapping: AddressToDisplayNameType, address: string) => {
|
|
156
|
+
newMapping[address] = {
|
|
157
|
+
name: state.identity.addressToDisplayName[address],
|
|
158
|
+
imageUrl: null,
|
|
159
|
+
}
|
|
160
|
+
return newMapping
|
|
161
|
+
},
|
|
162
|
+
{}
|
|
163
|
+
)
|
|
164
|
+
return {
|
|
165
|
+
...state,
|
|
166
|
+
identity: {
|
|
167
|
+
...state.identity,
|
|
168
|
+
addressToDisplayName: newAddressToDisplayName,
|
|
169
|
+
},
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
8: (state: any) => {
|
|
173
|
+
const lastUsedProvider = state.fiatExchanges?.lastUsedProvider
|
|
174
|
+
if (!lastUsedProvider || !lastUsedProvider.name) {
|
|
175
|
+
return state
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
const providerDisplayInfo = {
|
|
179
|
+
Moonpay: {
|
|
180
|
+
name: 'Moonpay',
|
|
181
|
+
icon: 'https://firebasestorage.googleapis.com/v0/b/celo-mobile-mainnet.appspot.com/o/images%2Fmoonpay.png?alt=media',
|
|
182
|
+
},
|
|
183
|
+
Ramp: {
|
|
184
|
+
name: 'Ramp',
|
|
185
|
+
icon: 'https://firebasestorage.googleapis.com/v0/b/celo-mobile-mainnet.appspot.com/o/images%2Framp.png?alt=media',
|
|
186
|
+
},
|
|
187
|
+
Simplex: {
|
|
188
|
+
name: 'Simplex',
|
|
189
|
+
icon: 'https://firebasestorage.googleapis.com/v0/b/celo-mobile-mainnet.appspot.com/o/images%2Fsimplex.jpg?alt=media',
|
|
190
|
+
},
|
|
191
|
+
Transak: {
|
|
192
|
+
name: 'Transak',
|
|
193
|
+
icon: 'https://firebasestorage.googleapis.com/v0/b/celo-mobile-mainnet.appspot.com/o/images%2Ftransak.png?alt=media',
|
|
194
|
+
},
|
|
195
|
+
Xanpool: {
|
|
196
|
+
name: 'Xanpool',
|
|
197
|
+
icon: 'https://firebasestorage.googleapis.com/v0/b/celo-mobile-mainnet.appspot.com/o/images%2Fxanpool.png?alt=media',
|
|
198
|
+
},
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
const lastProvider = Object.entries(providerDisplayInfo).find(
|
|
202
|
+
([, providerInfo]) => providerInfo.name.toLowerCase() === lastUsedProvider.name.toLowerCase()
|
|
203
|
+
)
|
|
204
|
+
return {
|
|
205
|
+
...state,
|
|
206
|
+
fiatExchanges: {
|
|
207
|
+
...state.fiatExchanges,
|
|
208
|
+
lastUsedProvider: lastProvider?.[0] ?? null,
|
|
209
|
+
},
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
9: (state: any) => {
|
|
213
|
+
if (state.account.dailyLimitCusd >= DEFAULT_DAILY_PAYMENT_LIMIT_CUSD_LEGACY) {
|
|
214
|
+
return state
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
return {
|
|
218
|
+
...state,
|
|
219
|
+
account: {
|
|
220
|
+
...state.account,
|
|
221
|
+
dailyLimitCusd: DEFAULT_DAILY_PAYMENT_LIMIT_CUSD_LEGACY,
|
|
222
|
+
},
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
10: (state: any) => {
|
|
226
|
+
return {
|
|
227
|
+
...state,
|
|
228
|
+
identity: _.omit(
|
|
229
|
+
state.identity,
|
|
230
|
+
'feelessAttestationCodes',
|
|
231
|
+
'feelessProcessingInputCode',
|
|
232
|
+
'feelessAcceptedAttestationCodes',
|
|
233
|
+
'feelessNumCompleteAttestations',
|
|
234
|
+
'feelessVerificationStatus',
|
|
235
|
+
'verificationState',
|
|
236
|
+
'feelessVerificationState',
|
|
237
|
+
'feelessLastRevealAttempt'
|
|
238
|
+
),
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
11: (state: any) => {
|
|
242
|
+
return {
|
|
243
|
+
...state,
|
|
244
|
+
app: _.omit(state.app, 'pontoEnabled', 'kotaniEnabled', 'bitfyUrl', 'flowBtcUrl'),
|
|
245
|
+
}
|
|
246
|
+
},
|
|
247
|
+
12: (state: any) => {
|
|
248
|
+
// Removing the exchange rate history because it's very likely that it's repeated a bunch of times.
|
|
249
|
+
return {
|
|
250
|
+
...state,
|
|
251
|
+
exchange: {
|
|
252
|
+
...state.exchange,
|
|
253
|
+
history: { ...exchangeInitialState.history },
|
|
254
|
+
},
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
13: (state: any) => {
|
|
258
|
+
return {
|
|
259
|
+
...state,
|
|
260
|
+
identity: {
|
|
261
|
+
..._.omit(
|
|
262
|
+
state.identity,
|
|
263
|
+
'attestationCodes',
|
|
264
|
+
'acceptedAttestationCodes',
|
|
265
|
+
'attestationInputStatus',
|
|
266
|
+
'numCompleteAttestations',
|
|
267
|
+
'verificationStatus',
|
|
268
|
+
'hasSeenVerificationNux',
|
|
269
|
+
'lastRevealAttempt'
|
|
270
|
+
),
|
|
271
|
+
},
|
|
272
|
+
verify: {
|
|
273
|
+
..._.omit(
|
|
274
|
+
state.verify,
|
|
275
|
+
'TEMPORARY_override_withoutVerification',
|
|
276
|
+
'withoutRevealing',
|
|
277
|
+
'retries'
|
|
278
|
+
),
|
|
279
|
+
seenVerificationNux: state.identity.hasSeenVerificationNux ?? false,
|
|
280
|
+
},
|
|
281
|
+
}
|
|
282
|
+
},
|
|
283
|
+
14: (state: any) => ({
|
|
284
|
+
...state,
|
|
285
|
+
networkInfo: {
|
|
286
|
+
...state.networkInfo,
|
|
287
|
+
userLocationData: {
|
|
288
|
+
countryCodeAlpha2: null,
|
|
289
|
+
region: null,
|
|
290
|
+
ipAddress: null,
|
|
291
|
+
},
|
|
292
|
+
},
|
|
293
|
+
}),
|
|
294
|
+
15: (state: any) => {
|
|
295
|
+
return {
|
|
296
|
+
...state,
|
|
297
|
+
identity: {
|
|
298
|
+
...state.identity,
|
|
299
|
+
attestationsCode: [],
|
|
300
|
+
acceptedAttestationCodes: [],
|
|
301
|
+
attestationInputStatus: ['Inputting', 'Disabled', 'Disabled'],
|
|
302
|
+
numCompleteAttestations: 0,
|
|
303
|
+
verificationStatus: 0,
|
|
304
|
+
hasSeenVerificationNux: state.verify.seenVerificationNux,
|
|
305
|
+
lastRevealAttempt: null,
|
|
306
|
+
},
|
|
307
|
+
verify: {
|
|
308
|
+
..._.omit(
|
|
309
|
+
state.verify,
|
|
310
|
+
'seenVerificationNux',
|
|
311
|
+
'revealStatuses',
|
|
312
|
+
'attestationCodes',
|
|
313
|
+
'lastRevealAttempt',
|
|
314
|
+
'acceptedAttestationCodes',
|
|
315
|
+
'attestationInputStatus'
|
|
316
|
+
),
|
|
317
|
+
TEMPORARY_override_withoutVerification: undefined,
|
|
318
|
+
withoutRevealing: false,
|
|
319
|
+
retries: 0,
|
|
320
|
+
},
|
|
321
|
+
}
|
|
322
|
+
},
|
|
323
|
+
16: (state: any) => ({
|
|
324
|
+
...state,
|
|
325
|
+
localCurrency: {
|
|
326
|
+
...state.localCurrency,
|
|
327
|
+
exchangeRate: undefined,
|
|
328
|
+
exchangeRates: {
|
|
329
|
+
[Currency.Dollar]: state.localCurrency.exchangeRate,
|
|
330
|
+
[Currency.Euro]: null,
|
|
331
|
+
[Currency.Celo]: null,
|
|
332
|
+
},
|
|
333
|
+
},
|
|
334
|
+
stableToken: {
|
|
335
|
+
...state.stableToken,
|
|
336
|
+
balance: undefined,
|
|
337
|
+
balances: {
|
|
338
|
+
[Currency.Dollar]: state.stableToken.balance,
|
|
339
|
+
[Currency.Euro]: null,
|
|
340
|
+
},
|
|
341
|
+
},
|
|
342
|
+
escrow: {
|
|
343
|
+
isReclaiming: false,
|
|
344
|
+
sentEscrowedPayments: [],
|
|
345
|
+
},
|
|
346
|
+
}),
|
|
347
|
+
17: (state: any) => ({
|
|
348
|
+
...state,
|
|
349
|
+
fiatExchanges: _.omit(state.fiatExchanges, 'lastUsedProvider'),
|
|
350
|
+
}),
|
|
351
|
+
18: (state: any) => ({
|
|
352
|
+
...state,
|
|
353
|
+
walletConnect: {
|
|
354
|
+
v2: _.omit(state.walletConnect, 'pairings'),
|
|
355
|
+
},
|
|
356
|
+
}),
|
|
357
|
+
19: (state: any) => {
|
|
358
|
+
// Fixes migration 18 when state.walletConnect is undefined and results
|
|
359
|
+
// in state.walletConnect.v2 to be an empty object and hence not using the reducer initial state
|
|
360
|
+
// See https://github.com/valora-xyz/wallet/issues/1270
|
|
361
|
+
if (state.walletConnect?.v2?.sessions === undefined) {
|
|
362
|
+
return {
|
|
363
|
+
...state,
|
|
364
|
+
walletConnect: {
|
|
365
|
+
...state.walletConnect,
|
|
366
|
+
v2: undefined,
|
|
367
|
+
},
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
return state
|
|
371
|
+
},
|
|
372
|
+
20: (state: any) => state,
|
|
373
|
+
21: (state: any) => state,
|
|
374
|
+
22: (state: any) => ({
|
|
375
|
+
...state,
|
|
376
|
+
app: {
|
|
377
|
+
...state.app,
|
|
378
|
+
language: undefined,
|
|
379
|
+
},
|
|
380
|
+
i18n: {
|
|
381
|
+
language: state.app.language,
|
|
382
|
+
allowOtaTranslations: false,
|
|
383
|
+
otaTranslationsLastUpdate: 0,
|
|
384
|
+
otaTranslationsAppVersion: '0',
|
|
385
|
+
otaTranslationsLanguage: '',
|
|
386
|
+
},
|
|
387
|
+
}),
|
|
388
|
+
23: (state: any) => state,
|
|
389
|
+
24: (state: any) => ({
|
|
390
|
+
...state,
|
|
391
|
+
invite: undefined,
|
|
392
|
+
}),
|
|
393
|
+
25: (state: any) => ({
|
|
394
|
+
...state,
|
|
395
|
+
app: {
|
|
396
|
+
...state.app,
|
|
397
|
+
sentryTracesSampleRate: DEFAULT_SENTRY_TRACES_SAMPLE_RATE,
|
|
398
|
+
},
|
|
399
|
+
}),
|
|
400
|
+
26: (state: any) => ({
|
|
401
|
+
...state,
|
|
402
|
+
app: {
|
|
403
|
+
...state.app,
|
|
404
|
+
rampCashInButtonExpEnabled: false,
|
|
405
|
+
},
|
|
406
|
+
}),
|
|
407
|
+
27: (state: any) => ({
|
|
408
|
+
...state,
|
|
409
|
+
app: {
|
|
410
|
+
...state.app,
|
|
411
|
+
superchargeButtonType: 'PILL_REWARDS',
|
|
412
|
+
},
|
|
413
|
+
}),
|
|
414
|
+
28: (state: any) => ({
|
|
415
|
+
...state,
|
|
416
|
+
app: {
|
|
417
|
+
...state.app,
|
|
418
|
+
dappListApiUrl: null,
|
|
419
|
+
},
|
|
420
|
+
}),
|
|
421
|
+
29: (state: any) => ({
|
|
422
|
+
...state,
|
|
423
|
+
web3: {
|
|
424
|
+
...state.web3,
|
|
425
|
+
// Move everybody to forno, i.e. disables the light client
|
|
426
|
+
fornoMode: true,
|
|
427
|
+
hadFornoDisabled: state.web3.fornoMode === false,
|
|
428
|
+
},
|
|
429
|
+
}),
|
|
430
|
+
30: (state: any) => ({
|
|
431
|
+
...state,
|
|
432
|
+
app: {
|
|
433
|
+
...state.app,
|
|
434
|
+
sentryNetworkErrors: DEFAULT_SENTRY_NETWORK_ERRORS,
|
|
435
|
+
},
|
|
436
|
+
}),
|
|
437
|
+
31: (state: any) => ({
|
|
438
|
+
...state,
|
|
439
|
+
app: {
|
|
440
|
+
...state.app,
|
|
441
|
+
biometryEnabled: false,
|
|
442
|
+
supportedBiometryType: null,
|
|
443
|
+
},
|
|
444
|
+
account: {
|
|
445
|
+
...state.account,
|
|
446
|
+
isSettingPin: undefined,
|
|
447
|
+
},
|
|
448
|
+
}),
|
|
449
|
+
32: (state: any) => ({
|
|
450
|
+
...state,
|
|
451
|
+
account: {
|
|
452
|
+
...state.account,
|
|
453
|
+
hasLinkedBankAccount: false,
|
|
454
|
+
},
|
|
455
|
+
}),
|
|
456
|
+
33: (state: any) => ({
|
|
457
|
+
...state,
|
|
458
|
+
app: {
|
|
459
|
+
...state.app,
|
|
460
|
+
ranVerificationMigrationAt: null,
|
|
461
|
+
},
|
|
462
|
+
}),
|
|
463
|
+
34: (state: any) => ({
|
|
464
|
+
...state,
|
|
465
|
+
app: {
|
|
466
|
+
...state.app,
|
|
467
|
+
superchargeApy: 12,
|
|
468
|
+
superchargeTokens: [],
|
|
469
|
+
rewardsPercent: undefined,
|
|
470
|
+
rewardsStartDate: undefined,
|
|
471
|
+
rewardsMax: undefined,
|
|
472
|
+
rewardsMin: undefined,
|
|
473
|
+
rewardsABTestThreshold: undefined,
|
|
474
|
+
},
|
|
475
|
+
}),
|
|
476
|
+
35: (state: any) => state,
|
|
477
|
+
36: (state: any) => ({
|
|
478
|
+
...state,
|
|
479
|
+
account: {
|
|
480
|
+
...state.account,
|
|
481
|
+
finclusiveKycStatus: FinclusiveKycStatus.NotSubmitted,
|
|
482
|
+
},
|
|
483
|
+
app: {
|
|
484
|
+
...state.app,
|
|
485
|
+
maxNumRecentDapps: 0,
|
|
486
|
+
recentDapps: [],
|
|
487
|
+
},
|
|
488
|
+
}),
|
|
489
|
+
37: (state: any) => ({
|
|
490
|
+
...state,
|
|
491
|
+
app: {
|
|
492
|
+
...state.app,
|
|
493
|
+
showPriceChangeIndicatorInBalances: false,
|
|
494
|
+
},
|
|
495
|
+
}),
|
|
496
|
+
38: (state: any) => ({
|
|
497
|
+
...state,
|
|
498
|
+
app: {
|
|
499
|
+
...state.app,
|
|
500
|
+
skipVerification: false,
|
|
501
|
+
},
|
|
502
|
+
}),
|
|
503
|
+
39: (state: any) => ({
|
|
504
|
+
...state,
|
|
505
|
+
app: {
|
|
506
|
+
...state.app,
|
|
507
|
+
paymentDeepLinkHandler: '',
|
|
508
|
+
},
|
|
509
|
+
}),
|
|
510
|
+
40: (state: any) => {
|
|
511
|
+
return {
|
|
512
|
+
...(_.omit(state, ['medianator', 'invite']) as any),
|
|
513
|
+
account: {
|
|
514
|
+
..._.omit(state.account, [
|
|
515
|
+
'pincodeSet',
|
|
516
|
+
'isSettingPin',
|
|
517
|
+
'backupDelayedTime',
|
|
518
|
+
'socialBackupCompleted',
|
|
519
|
+
'incomingPaymentRequests',
|
|
520
|
+
'outgoingPaymentRequests',
|
|
521
|
+
'dismissedInviteFriends',
|
|
522
|
+
'dismissedEarnRewards',
|
|
523
|
+
]),
|
|
524
|
+
},
|
|
525
|
+
app: {
|
|
526
|
+
..._.omit(state.app, [
|
|
527
|
+
'loading',
|
|
528
|
+
'inviteCodeEntered',
|
|
529
|
+
'error',
|
|
530
|
+
'dismissErrorAfter',
|
|
531
|
+
'language',
|
|
532
|
+
'doingBackupFlow',
|
|
533
|
+
'message',
|
|
534
|
+
'dismissMessageAfter',
|
|
535
|
+
'lockWithPinEnabled',
|
|
536
|
+
'rewardsPercent',
|
|
537
|
+
'rewardsStartDate',
|
|
538
|
+
'rewardsMax',
|
|
539
|
+
'rewardsMin',
|
|
540
|
+
'rewardsABTestThreshold',
|
|
541
|
+
'shortVerificationCodesEnabled',
|
|
542
|
+
'walletConnectEnabled',
|
|
543
|
+
]),
|
|
544
|
+
},
|
|
545
|
+
escrow: {
|
|
546
|
+
..._.omit(state.escrow, ['suggestedFee']),
|
|
547
|
+
},
|
|
548
|
+
exchange: {
|
|
549
|
+
..._.omit(state.exchange, ['exchangeRatePair']),
|
|
550
|
+
history: {
|
|
551
|
+
..._.omit(state.exchange.history, ['isLoading']),
|
|
552
|
+
},
|
|
553
|
+
},
|
|
554
|
+
home: {
|
|
555
|
+
...state.home,
|
|
556
|
+
...(Array.isArray(state.home.notifications) ? { notifications: {} } : undefined),
|
|
557
|
+
},
|
|
558
|
+
identity: {
|
|
559
|
+
..._.omit(state.identity, [
|
|
560
|
+
'verificationFailed',
|
|
561
|
+
'startedVerification',
|
|
562
|
+
'isLoadingImportContacts',
|
|
563
|
+
'contactMappingProgress',
|
|
564
|
+
'attestationsCode',
|
|
565
|
+
]),
|
|
566
|
+
},
|
|
567
|
+
localCurrency: {
|
|
568
|
+
..._.omit(state.localCurrency, ['exchangeRate', 'fetchRateFailed']),
|
|
569
|
+
},
|
|
570
|
+
recipients: {
|
|
571
|
+
..._.omit(state.recipients, ['recipientCache']),
|
|
572
|
+
},
|
|
573
|
+
send: {
|
|
574
|
+
..._.omit(state.send, ['recipientCache']),
|
|
575
|
+
},
|
|
576
|
+
stableToken: {
|
|
577
|
+
..._.omit(state.stableToken, ['balance']),
|
|
578
|
+
},
|
|
579
|
+
tokens: {
|
|
580
|
+
..._.omit(state.tokens, ['lastSuccessfulFetch']),
|
|
581
|
+
},
|
|
582
|
+
walletConnect: {
|
|
583
|
+
...(state.walletConnect?.v2?.sessions === undefined
|
|
584
|
+
? _.omit(state.walletConnect, 'v2')
|
|
585
|
+
: state.walletConnect),
|
|
586
|
+
},
|
|
587
|
+
web3: {
|
|
588
|
+
..._.omit(state.web3, ['commentKey', 'gasPriceLastUpdated', 'contractKitReady']),
|
|
589
|
+
},
|
|
590
|
+
}
|
|
591
|
+
},
|
|
592
|
+
41: (state: any) => state,
|
|
593
|
+
42: (state: any) => ({
|
|
594
|
+
...state,
|
|
595
|
+
app: {
|
|
596
|
+
...state.app,
|
|
597
|
+
skipProfilePicture: false,
|
|
598
|
+
},
|
|
599
|
+
}),
|
|
600
|
+
43: (state: any) => state,
|
|
601
|
+
44: (state: any) => ({
|
|
602
|
+
...state,
|
|
603
|
+
account: {
|
|
604
|
+
...state.account,
|
|
605
|
+
finclusiveRegionSupported: false,
|
|
606
|
+
},
|
|
607
|
+
app: {
|
|
608
|
+
...state.app,
|
|
609
|
+
finclusiveUnsupportedStates: ['NY', 'TX'],
|
|
610
|
+
},
|
|
611
|
+
}),
|
|
612
|
+
45: (state: any) => state,
|
|
613
|
+
46: (state: any) => ({
|
|
614
|
+
...state,
|
|
615
|
+
cloudFunctionsApi: undefined,
|
|
616
|
+
}),
|
|
617
|
+
47: (state: any) => {
|
|
618
|
+
return {
|
|
619
|
+
...state,
|
|
620
|
+
app: _.omit(
|
|
621
|
+
state.app,
|
|
622
|
+
'multiTokenUseSendFlow',
|
|
623
|
+
'multiTokenUseUpdatedFeed',
|
|
624
|
+
'multiTokenShowHomeBalances'
|
|
625
|
+
),
|
|
626
|
+
}
|
|
627
|
+
},
|
|
628
|
+
48: (state: any) => {
|
|
629
|
+
return {
|
|
630
|
+
...(_.omit(state, ['cloudFunctionsApi']) as any),
|
|
631
|
+
supercharge: {
|
|
632
|
+
...state.supercharge,
|
|
633
|
+
fetchAvailableRewardsLoading: false,
|
|
634
|
+
fetchAvailableRewardsError: false,
|
|
635
|
+
availableRewards: [],
|
|
636
|
+
},
|
|
637
|
+
}
|
|
638
|
+
},
|
|
639
|
+
49: (state: any) => {
|
|
640
|
+
return {
|
|
641
|
+
...state,
|
|
642
|
+
account: {
|
|
643
|
+
...state.account,
|
|
644
|
+
dismissedKeepSupercharging: false,
|
|
645
|
+
dismissedStartSupercharging: false,
|
|
646
|
+
},
|
|
647
|
+
}
|
|
648
|
+
},
|
|
649
|
+
50: (state: any) => ({
|
|
650
|
+
...state,
|
|
651
|
+
walletConnect: {
|
|
652
|
+
..._.omit(state.walletConnect, ['v2']),
|
|
653
|
+
},
|
|
654
|
+
}),
|
|
655
|
+
51: (state: any) => ({
|
|
656
|
+
...state,
|
|
657
|
+
app: {
|
|
658
|
+
...state.app,
|
|
659
|
+
celoWithdrawalEnabledInExchange: true,
|
|
660
|
+
},
|
|
661
|
+
}),
|
|
662
|
+
52: (state: any) => ({
|
|
663
|
+
...state,
|
|
664
|
+
app: {
|
|
665
|
+
...state.app,
|
|
666
|
+
fiatConnectCashInEnabled: false,
|
|
667
|
+
fiatConnectCashOutEnabled: false,
|
|
668
|
+
},
|
|
669
|
+
}),
|
|
670
|
+
53: (state: any) => ({
|
|
671
|
+
...(_.omit(state, 'geth') as any),
|
|
672
|
+
account: _.omit(state.account, 'promptFornoIfNeeded', 'retryVerificationWithForno'),
|
|
673
|
+
web3: _.omit(state.web3, 'syncProgress', 'latestBlockNumber', 'fornoMode', 'hadFornoDisabled'),
|
|
674
|
+
}),
|
|
675
|
+
54: (state: any) => ({
|
|
676
|
+
...state,
|
|
677
|
+
dapps: {
|
|
678
|
+
dappsWebViewEnabled: state.app.dappsWebViewEnabled ?? false,
|
|
679
|
+
activeDapp: state.app.activeDapp ?? null,
|
|
680
|
+
maxNumRecentDapps: state.app.maxNumRecentDapps,
|
|
681
|
+
recentDapps: state.app.recentDapps,
|
|
682
|
+
dappListApiUrl: state.app.dappListApiUrl,
|
|
683
|
+
},
|
|
684
|
+
app: _.omit(
|
|
685
|
+
state.app,
|
|
686
|
+
'dappsWebViewEnabled',
|
|
687
|
+
'maxNumRecentDapps',
|
|
688
|
+
'recentDapps',
|
|
689
|
+
'dappListApiUrl',
|
|
690
|
+
'activeDapp'
|
|
691
|
+
),
|
|
692
|
+
}),
|
|
693
|
+
55: (state: any) => ({
|
|
694
|
+
...state,
|
|
695
|
+
dapps: {
|
|
696
|
+
...state.dapps,
|
|
697
|
+
dappsList: [],
|
|
698
|
+
dappsListLoading: false,
|
|
699
|
+
dappsListError: null,
|
|
700
|
+
dappsCategories: [],
|
|
701
|
+
},
|
|
702
|
+
}),
|
|
703
|
+
56: (state: any) => ({
|
|
704
|
+
...state,
|
|
705
|
+
dapps: {
|
|
706
|
+
...state.dapps,
|
|
707
|
+
dappConnectInfo: 'default',
|
|
708
|
+
},
|
|
709
|
+
}),
|
|
710
|
+
57: (state: any) => ({
|
|
711
|
+
...state,
|
|
712
|
+
app: {
|
|
713
|
+
...state.app,
|
|
714
|
+
visualizeNFTsEnabledInHomeAssetsPage: false,
|
|
715
|
+
},
|
|
716
|
+
}),
|
|
717
|
+
58: (state: any) => ({
|
|
718
|
+
...state,
|
|
719
|
+
app: {
|
|
720
|
+
...state.app,
|
|
721
|
+
coinbasePayEnabled: false,
|
|
722
|
+
},
|
|
723
|
+
}),
|
|
724
|
+
59: (state: any) => ({
|
|
725
|
+
...state,
|
|
726
|
+
transactions: {
|
|
727
|
+
...state.transactions,
|
|
728
|
+
transactions: (state.transactions.transactions || []).filter(
|
|
729
|
+
(transaction: TokenTransaction) => Object.keys(transaction).length > 0
|
|
730
|
+
),
|
|
731
|
+
},
|
|
732
|
+
}),
|
|
733
|
+
60: (state: any) => ({
|
|
734
|
+
...state,
|
|
735
|
+
fiatConnect: {
|
|
736
|
+
quotes: [],
|
|
737
|
+
quotesLoading: false,
|
|
738
|
+
quotesError: null,
|
|
739
|
+
},
|
|
740
|
+
}),
|
|
741
|
+
61: (state: any) => ({
|
|
742
|
+
...state,
|
|
743
|
+
app: {
|
|
744
|
+
...state.app,
|
|
745
|
+
showSwapMenuInDrawerMenu: false,
|
|
746
|
+
},
|
|
747
|
+
}),
|
|
748
|
+
62: (state: any) => ({
|
|
749
|
+
...state,
|
|
750
|
+
fiatConnect: {
|
|
751
|
+
...state.fiatConnect,
|
|
752
|
+
transfer: null,
|
|
753
|
+
},
|
|
754
|
+
}),
|
|
755
|
+
63: (state: any) => ({
|
|
756
|
+
...state,
|
|
757
|
+
app: {
|
|
758
|
+
..._.omit(state.app, 'superchargeTokens'),
|
|
759
|
+
superchargeTokenConfigByToken: {},
|
|
760
|
+
},
|
|
761
|
+
}),
|
|
762
|
+
64: (state: any) => ({
|
|
763
|
+
...state,
|
|
764
|
+
fiatConnect: {
|
|
765
|
+
...state.fiatConnect,
|
|
766
|
+
providers: null,
|
|
767
|
+
},
|
|
768
|
+
}),
|
|
769
|
+
65: (state: any) => state,
|
|
770
|
+
66: (state: any) => ({
|
|
771
|
+
...state,
|
|
772
|
+
fiatConnect: {
|
|
773
|
+
...state.fiatConnect,
|
|
774
|
+
cachedFiatAccountUses: [],
|
|
775
|
+
attemptReturnUserFlowLoading: false,
|
|
776
|
+
},
|
|
777
|
+
}),
|
|
778
|
+
67: (state: any) => ({
|
|
779
|
+
...state,
|
|
780
|
+
fiatConnect: {
|
|
781
|
+
...state.fiatConnect,
|
|
782
|
+
selectFiatConnectQuoteLoading: false,
|
|
783
|
+
},
|
|
784
|
+
}),
|
|
785
|
+
68: (state: any) => ({
|
|
786
|
+
...state,
|
|
787
|
+
app: _.omit(
|
|
788
|
+
state.app,
|
|
789
|
+
'linkBankAccountEnabled',
|
|
790
|
+
'linkBankAccountStepTwoEnabled',
|
|
791
|
+
'finclusiveUnsupportedStates'
|
|
792
|
+
),
|
|
793
|
+
account: _.omit(
|
|
794
|
+
state.account,
|
|
795
|
+
'hasLinkedBankAccount',
|
|
796
|
+
'finclusiveRegionSupported',
|
|
797
|
+
'finclusiveKycStatus',
|
|
798
|
+
'kycStatus'
|
|
799
|
+
),
|
|
800
|
+
}),
|
|
801
|
+
69: (state: any) => ({
|
|
802
|
+
...state,
|
|
803
|
+
recipients: {
|
|
804
|
+
...state.recipients,
|
|
805
|
+
coinbasePaySenders: [],
|
|
806
|
+
},
|
|
807
|
+
}),
|
|
808
|
+
70: (state: any) => ({
|
|
809
|
+
...state,
|
|
810
|
+
app: {
|
|
811
|
+
...state.app,
|
|
812
|
+
createAccountCopyTestType: 'ACCOUNT',
|
|
813
|
+
},
|
|
814
|
+
}),
|
|
815
|
+
71: (state: any) => ({
|
|
816
|
+
...state,
|
|
817
|
+
app: {
|
|
818
|
+
...state.app,
|
|
819
|
+
maxSwapSlippagePercentage: 0.3,
|
|
820
|
+
swapFeeEnabled: false,
|
|
821
|
+
swapFeePercentage: false,
|
|
822
|
+
},
|
|
823
|
+
}),
|
|
824
|
+
72: (state: any) => ({
|
|
825
|
+
...state,
|
|
826
|
+
app: {
|
|
827
|
+
...state.app,
|
|
828
|
+
shouldShowRecoveryPhraseInSettings: false,
|
|
829
|
+
},
|
|
830
|
+
}),
|
|
831
|
+
73: (state: any) => state,
|
|
832
|
+
74: (state: any) => ({
|
|
833
|
+
...state,
|
|
834
|
+
identity: _.omit(state.identity, 'matchedContacts'),
|
|
835
|
+
}),
|
|
836
|
+
75: (state: any) => ({
|
|
837
|
+
...state,
|
|
838
|
+
app: _.omit(state.app, 'showRaiseDailyLimitTarget'),
|
|
839
|
+
account: _.omit(state.account, 'dailyLimitRequestStatus', 'dailyLimitCusd'),
|
|
840
|
+
}),
|
|
841
|
+
76: (state: any) => ({
|
|
842
|
+
...state,
|
|
843
|
+
app: {
|
|
844
|
+
...state.app,
|
|
845
|
+
showGuidedOnboardingCopy: false,
|
|
846
|
+
},
|
|
847
|
+
}),
|
|
848
|
+
77: (state: any) => state,
|
|
849
|
+
78: (state: any) => ({
|
|
850
|
+
...state,
|
|
851
|
+
fiatConnect: {
|
|
852
|
+
...state.fiatConnect,
|
|
853
|
+
sendingFiatAccount: false,
|
|
854
|
+
},
|
|
855
|
+
}),
|
|
856
|
+
79: (state: any) => ({
|
|
857
|
+
...state,
|
|
858
|
+
fiatConnect: {
|
|
859
|
+
..._.omit(state.fiatConnect, 'sendingFiatAccount'),
|
|
860
|
+
sendingFiatAccountStatus: SendingFiatAccountStatus.NotSending,
|
|
861
|
+
},
|
|
862
|
+
}),
|
|
863
|
+
80: (state: any) => ({
|
|
864
|
+
...state,
|
|
865
|
+
fiatConnect: {
|
|
866
|
+
...state.fiatConnect,
|
|
867
|
+
kycTryAgainLoading: false,
|
|
868
|
+
},
|
|
869
|
+
}),
|
|
870
|
+
81: (state: any) => state,
|
|
871
|
+
82: (state: any) => ({
|
|
872
|
+
...state,
|
|
873
|
+
swap: {
|
|
874
|
+
swapState: 'quote',
|
|
875
|
+
swapInfo: null,
|
|
876
|
+
swapUserInput: null,
|
|
877
|
+
},
|
|
878
|
+
}),
|
|
879
|
+
83: (state: any) => ({
|
|
880
|
+
...state,
|
|
881
|
+
fiatConnect: {
|
|
882
|
+
...state.fiatConnect,
|
|
883
|
+
cachedQuoteParams: {},
|
|
884
|
+
},
|
|
885
|
+
}),
|
|
886
|
+
84: (state: any) => ({
|
|
887
|
+
...state,
|
|
888
|
+
fiatConnect: {
|
|
889
|
+
...state.fiatConnect,
|
|
890
|
+
schemaCountryOverrides: {},
|
|
891
|
+
},
|
|
892
|
+
}),
|
|
893
|
+
85: (state: any) => ({
|
|
894
|
+
...state,
|
|
895
|
+
app: _.omit(state.app, 'swapFeeEnabled', 'swapFeePercentage'),
|
|
896
|
+
}),
|
|
897
|
+
86: (state: any) => ({
|
|
898
|
+
...state,
|
|
899
|
+
fiatConnect: {
|
|
900
|
+
...state.fiatConnect,
|
|
901
|
+
cachedFiatAccountUses: [],
|
|
902
|
+
},
|
|
903
|
+
}),
|
|
904
|
+
87: (state: any) => state,
|
|
905
|
+
88: (state: any) => ({
|
|
906
|
+
...state,
|
|
907
|
+
app: {
|
|
908
|
+
...state.app,
|
|
909
|
+
networkTimeoutSeconds: 30,
|
|
910
|
+
},
|
|
911
|
+
}),
|
|
912
|
+
89: (state: any) => ({
|
|
913
|
+
...state,
|
|
914
|
+
app: _.omit(state.app, 'superchargeButtonType'),
|
|
915
|
+
}),
|
|
916
|
+
90: (state: any) => ({
|
|
917
|
+
...state,
|
|
918
|
+
app: _.omit(state.app, 'biometryEnabled'),
|
|
919
|
+
}),
|
|
920
|
+
91: (state: any) => ({
|
|
921
|
+
...state,
|
|
922
|
+
fiatConnect: {
|
|
923
|
+
...state.fiatConnect,
|
|
924
|
+
personaInProgress: false,
|
|
925
|
+
},
|
|
926
|
+
}),
|
|
927
|
+
92: (state: any) => ({
|
|
928
|
+
...state,
|
|
929
|
+
app: _.omit(state.app, 'celoWithdrawalEnabledInExchange'),
|
|
930
|
+
}),
|
|
931
|
+
93: (state: any) => ({
|
|
932
|
+
...state,
|
|
933
|
+
fiatConnect: {
|
|
934
|
+
...state.fiatConnect,
|
|
935
|
+
transfer: null,
|
|
936
|
+
},
|
|
937
|
+
}),
|
|
938
|
+
94: (state: any) => ({
|
|
939
|
+
...state,
|
|
940
|
+
walletConnect: {
|
|
941
|
+
...state.walletConnect,
|
|
942
|
+
v2: {
|
|
943
|
+
sessions: [],
|
|
944
|
+
pendingSessions: [],
|
|
945
|
+
pendingActions: [],
|
|
946
|
+
},
|
|
947
|
+
},
|
|
948
|
+
app: {
|
|
949
|
+
...state.app,
|
|
950
|
+
walletConnectV2Enabled: true,
|
|
951
|
+
},
|
|
952
|
+
}),
|
|
953
|
+
95: (state: any) => ({
|
|
954
|
+
...state,
|
|
955
|
+
fiatConnect: {
|
|
956
|
+
...state.fiatConnect,
|
|
957
|
+
providers: null,
|
|
958
|
+
},
|
|
959
|
+
}),
|
|
960
|
+
96: (state: any) => ({
|
|
961
|
+
...state,
|
|
962
|
+
app: _.omit(state.app, 'paymentDeepLinkHandler'),
|
|
963
|
+
}),
|
|
964
|
+
97: (state: any) => ({
|
|
965
|
+
...state,
|
|
966
|
+
dapps: {
|
|
967
|
+
...state.dapps,
|
|
968
|
+
dappFavoritesEnabled: false,
|
|
969
|
+
favoriteDapps: [],
|
|
970
|
+
},
|
|
971
|
+
}),
|
|
972
|
+
98: (state: any) => state,
|
|
973
|
+
99: (state: any) => ({
|
|
974
|
+
...state,
|
|
975
|
+
dapps: {
|
|
976
|
+
..._.omit(state.dapps, 'recentDapps', 'favoriteDapps'),
|
|
977
|
+
recentDappIds: state.dapps.recentDapps.map((dapp: Dapp) => dapp.id),
|
|
978
|
+
favoriteDappIds: state.dapps.favoriteDapps.map((dapp: Dapp) => dapp.id),
|
|
979
|
+
},
|
|
980
|
+
}),
|
|
981
|
+
100: (state: any) => ({
|
|
982
|
+
...state,
|
|
983
|
+
app: _.omit(state.app, 'celoNewsEnabled'),
|
|
984
|
+
}),
|
|
985
|
+
101: (state: any) => ({
|
|
986
|
+
...state,
|
|
987
|
+
app: _.omit(state.app, 'inviteMethod', 'inviteModalVisible'),
|
|
988
|
+
}),
|
|
989
|
+
102: (state: any) => ({
|
|
990
|
+
...state,
|
|
991
|
+
app: _.omit(state.app, 'centralPhoneVerificationEnabled', 'hideVerification'),
|
|
992
|
+
}),
|
|
993
|
+
103: (state: any) => ({
|
|
994
|
+
..._.omit(state, 'verify'),
|
|
995
|
+
_persist: state._persist,
|
|
996
|
+
identity: _.omit(
|
|
997
|
+
state.identity,
|
|
998
|
+
'attestationCodes',
|
|
999
|
+
'acceptedAttestationCodes',
|
|
1000
|
+
'attestationInputStatus',
|
|
1001
|
+
'numCompleteAttestations',
|
|
1002
|
+
'verificationStatus',
|
|
1003
|
+
'lastRevealAttempt'
|
|
1004
|
+
),
|
|
1005
|
+
app: _.omit(
|
|
1006
|
+
state.app,
|
|
1007
|
+
'komenciAllowedDeployers',
|
|
1008
|
+
'komenciUseLightProxy',
|
|
1009
|
+
'ranVerificationMigrationAt'
|
|
1010
|
+
),
|
|
1011
|
+
}),
|
|
1012
|
+
104: (state: any) => ({
|
|
1013
|
+
...(_.omit(state, ['goldToken', 'stableToken']) as any),
|
|
1014
|
+
account: {
|
|
1015
|
+
...state.account,
|
|
1016
|
+
celoEducationCompleted: state.goldToken.educationCompleted,
|
|
1017
|
+
},
|
|
1018
|
+
}),
|
|
1019
|
+
105: (state: any) => ({
|
|
1020
|
+
...state,
|
|
1021
|
+
web3: {
|
|
1022
|
+
...state.web3,
|
|
1023
|
+
twelveWordMnemonicEnabled: false,
|
|
1024
|
+
},
|
|
1025
|
+
}),
|
|
1026
|
+
106: (state: any) => state,
|
|
1027
|
+
107: (state: any) => ({
|
|
1028
|
+
...state,
|
|
1029
|
+
fiatConnect: {
|
|
1030
|
+
...state.fiatConnect,
|
|
1031
|
+
cachedFiatAccountUses: state.fiatConnect.cachedFiatAccountUses.map(
|
|
1032
|
+
(use: { cryptoType: Currency }) => ({
|
|
1033
|
+
...use,
|
|
1034
|
+
cryptoType: use.cryptoType === Currency.Celo ? CiCoCurrency.CELO : use.cryptoType,
|
|
1035
|
+
})
|
|
1036
|
+
),
|
|
1037
|
+
cachedQuoteParams: updateCachedQuoteParams(state.fiatConnect.cachedQuoteParams),
|
|
1038
|
+
},
|
|
1039
|
+
}),
|
|
1040
|
+
108: (state: any) => ({
|
|
1041
|
+
...state,
|
|
1042
|
+
fiatConnect: {
|
|
1043
|
+
...state.fiatConnect,
|
|
1044
|
+
cachedTransfers: {},
|
|
1045
|
+
},
|
|
1046
|
+
}),
|
|
1047
|
+
109: (state: any) => ({
|
|
1048
|
+
...state,
|
|
1049
|
+
app: {
|
|
1050
|
+
...state.app,
|
|
1051
|
+
paymentDeepLinkHandler: '',
|
|
1052
|
+
},
|
|
1053
|
+
}),
|
|
1054
|
+
110: (state: any) => ({
|
|
1055
|
+
...state,
|
|
1056
|
+
swap: {
|
|
1057
|
+
...state.swap,
|
|
1058
|
+
guaranteedSwapPriceEnabled: false,
|
|
1059
|
+
},
|
|
1060
|
+
}),
|
|
1061
|
+
111: (state: any) => state,
|
|
1062
|
+
112: (state: any) => ({
|
|
1063
|
+
...state,
|
|
1064
|
+
dapps: {
|
|
1065
|
+
...state.dapps,
|
|
1066
|
+
dappsFilterEnabled: false,
|
|
1067
|
+
dappsSearchEnabled: false,
|
|
1068
|
+
},
|
|
1069
|
+
}),
|
|
1070
|
+
113: (state: any) => ({
|
|
1071
|
+
...state,
|
|
1072
|
+
app: _.omit(
|
|
1073
|
+
state.app,
|
|
1074
|
+
'skipProfilePicture',
|
|
1075
|
+
'showGuidedOnboardingCopy',
|
|
1076
|
+
'createAccountCopyTestType'
|
|
1077
|
+
),
|
|
1078
|
+
}),
|
|
1079
|
+
114: (state: any) => state,
|
|
1080
|
+
115: (state: any) => ({
|
|
1081
|
+
...state,
|
|
1082
|
+
account: {
|
|
1083
|
+
...state.account,
|
|
1084
|
+
dismissedGetVerified:
|
|
1085
|
+
state.app.numberVerified && !state.app.phoneNumberVerified
|
|
1086
|
+
? false
|
|
1087
|
+
: state.account.dismissedGetVerified,
|
|
1088
|
+
},
|
|
1089
|
+
app: {
|
|
1090
|
+
...state.app,
|
|
1091
|
+
requireCPV: false,
|
|
1092
|
+
},
|
|
1093
|
+
}),
|
|
1094
|
+
116: (state: any) => ({
|
|
1095
|
+
...state,
|
|
1096
|
+
account: {
|
|
1097
|
+
...state.account,
|
|
1098
|
+
startOnboardingTime: undefined,
|
|
1099
|
+
},
|
|
1100
|
+
}),
|
|
1101
|
+
117: (state: any) => ({
|
|
1102
|
+
...state,
|
|
1103
|
+
app: _.omit(state.app, 'cashInButtonExpEnabled'),
|
|
1104
|
+
}),
|
|
1105
|
+
118: (state: any) => ({
|
|
1106
|
+
...state,
|
|
1107
|
+
send: {
|
|
1108
|
+
..._.omit(state.send, 'inviteRewardsEnabled'),
|
|
1109
|
+
inviteRewardsVersion: 'none',
|
|
1110
|
+
},
|
|
1111
|
+
}),
|
|
1112
|
+
119: (state: any) => state,
|
|
1113
|
+
120: (state: any) => state,
|
|
1114
|
+
121: (state: any) => state,
|
|
1115
|
+
122: (state: any) => ({
|
|
1116
|
+
...state,
|
|
1117
|
+
account: {
|
|
1118
|
+
...state.account,
|
|
1119
|
+
recoveryPhraseInOnboardingStatus: RecoveryPhraseInOnboardingStatus.NotStarted,
|
|
1120
|
+
},
|
|
1121
|
+
}),
|
|
1122
|
+
123: (state: any) => ({
|
|
1123
|
+
...state,
|
|
1124
|
+
dapps: _.omit(state.dapps, 'dappsFilterEnabled', 'dappsSearchEnabled'),
|
|
1125
|
+
}),
|
|
1126
|
+
124: (state: any) => state,
|
|
1127
|
+
125: (state: any) => ({
|
|
1128
|
+
...state,
|
|
1129
|
+
app: {
|
|
1130
|
+
...state.app,
|
|
1131
|
+
celoNews: _.omit(state.app.celoNews, 'enabled'),
|
|
1132
|
+
},
|
|
1133
|
+
}),
|
|
1134
|
+
126: (state: any) => ({
|
|
1135
|
+
...state,
|
|
1136
|
+
app: {
|
|
1137
|
+
...state.app,
|
|
1138
|
+
inAppReviewLastInteractionTimestamp: null,
|
|
1139
|
+
},
|
|
1140
|
+
}),
|
|
1141
|
+
127: (state: any) => state,
|
|
1142
|
+
128: (state: any) => ({
|
|
1143
|
+
...state,
|
|
1144
|
+
positions: {
|
|
1145
|
+
...state.positions,
|
|
1146
|
+
positions: [],
|
|
1147
|
+
},
|
|
1148
|
+
}),
|
|
1149
|
+
129: (state: any) => state,
|
|
1150
|
+
130: (state: any) => state,
|
|
1151
|
+
131: (state: any) => ({
|
|
1152
|
+
...state,
|
|
1153
|
+
dapps: {
|
|
1154
|
+
...state.dapps,
|
|
1155
|
+
dappsList: state.dapps.dappsList.map(
|
|
1156
|
+
(dapp: Dapp | (Omit<Dapp, 'categories'> & { categoryId: string })) => ({
|
|
1157
|
+
...dapp,
|
|
1158
|
+
categories: 'categories' in dapp ? dapp.categories : [dapp.categoryId],
|
|
1159
|
+
})
|
|
1160
|
+
),
|
|
1161
|
+
activeDapp: state.dapps.activeDapp
|
|
1162
|
+
? {
|
|
1163
|
+
...state.dapps.activeDapp,
|
|
1164
|
+
categories: state.dapps.activeDapp.categories ?? [state.dapps.activeDapp.categoryId],
|
|
1165
|
+
}
|
|
1166
|
+
: null,
|
|
1167
|
+
},
|
|
1168
|
+
}),
|
|
1169
|
+
132: (state: any) => ({
|
|
1170
|
+
...state,
|
|
1171
|
+
positions: {
|
|
1172
|
+
...state.positions,
|
|
1173
|
+
positions: state.positions.positions.map((position: Position) => ({
|
|
1174
|
+
...position,
|
|
1175
|
+
availableShortcutIds: [],
|
|
1176
|
+
})),
|
|
1177
|
+
shortcuts: [],
|
|
1178
|
+
shortcutsStatus: 'idle',
|
|
1179
|
+
},
|
|
1180
|
+
}),
|
|
1181
|
+
133: (state: any) => ({
|
|
1182
|
+
...state,
|
|
1183
|
+
nfts: {
|
|
1184
|
+
nfts: [],
|
|
1185
|
+
nftsLoading: false,
|
|
1186
|
+
nftsError: null,
|
|
1187
|
+
},
|
|
1188
|
+
}),
|
|
1189
|
+
134: (state: any) => ({
|
|
1190
|
+
...state,
|
|
1191
|
+
positions: {
|
|
1192
|
+
...state.positions,
|
|
1193
|
+
previewApiUrl: null,
|
|
1194
|
+
},
|
|
1195
|
+
}),
|
|
1196
|
+
135: (state: any) => state,
|
|
1197
|
+
136: (state: any) => ({
|
|
1198
|
+
...state,
|
|
1199
|
+
account: _.omit(state.account, 'backupRequiredTime'),
|
|
1200
|
+
}),
|
|
1201
|
+
137: (state: any) => ({
|
|
1202
|
+
...state,
|
|
1203
|
+
walletConnect: {
|
|
1204
|
+
..._.omit(state.walletConnect, 'v1', 'v2'),
|
|
1205
|
+
sessions: state.walletConnect.v2.sessions,
|
|
1206
|
+
pendingActions: state.walletConnect.v2.pendingActions,
|
|
1207
|
+
pendingSessions: state.walletConnect.v2.pendingSessions,
|
|
1208
|
+
},
|
|
1209
|
+
}),
|
|
1210
|
+
138: (state: any) => state,
|
|
1211
|
+
139: (state: any) => state,
|
|
1212
|
+
140: (state: any) => state,
|
|
1213
|
+
141: (state: any) => state,
|
|
1214
|
+
142: (state: any) => ({
|
|
1215
|
+
...state,
|
|
1216
|
+
app: _.omit(state.app, 'shouldShowRecoveryPhraseInSettings'),
|
|
1217
|
+
}),
|
|
1218
|
+
143: (state: any) => ({
|
|
1219
|
+
...state,
|
|
1220
|
+
account: {
|
|
1221
|
+
...state.account,
|
|
1222
|
+
cloudBackupCompleted: false,
|
|
1223
|
+
},
|
|
1224
|
+
}),
|
|
1225
|
+
144: (state: any) => ({
|
|
1226
|
+
...state,
|
|
1227
|
+
app: {
|
|
1228
|
+
...state.app,
|
|
1229
|
+
// set this to a non null value for existing users so that they do not get
|
|
1230
|
+
// prompted for push notification permissions again
|
|
1231
|
+
pushNotificationRequestedUnixTime: 1692878055000,
|
|
1232
|
+
},
|
|
1233
|
+
}),
|
|
1234
|
+
145: (state: any) => ({
|
|
1235
|
+
...state,
|
|
1236
|
+
transactions: {
|
|
1237
|
+
...state.transactions,
|
|
1238
|
+
standbyTransactions: (state.transactions.standbyTransactions as StandbyTransaction[]).map(
|
|
1239
|
+
(tx) => {
|
|
1240
|
+
return { ...tx, network: Network.Celo }
|
|
1241
|
+
}
|
|
1242
|
+
),
|
|
1243
|
+
transactions: (state.transactions.transactions as TokenTransaction[]).map((tx) => {
|
|
1244
|
+
const __typename = // @ts-ignore
|
|
1245
|
+
tx.__typename === 'TokenTransferV2'
|
|
1246
|
+
? 'TokenTransferV3' // @ts-ignore
|
|
1247
|
+
: tx.__typename === 'NftTransferV2'
|
|
1248
|
+
? 'NftTransferV3'
|
|
1249
|
+
: 'TokenExchangeV3'
|
|
1250
|
+
return {
|
|
1251
|
+
...tx,
|
|
1252
|
+
__typename,
|
|
1253
|
+
network: Network.Celo,
|
|
1254
|
+
}
|
|
1255
|
+
}),
|
|
1256
|
+
},
|
|
1257
|
+
}),
|
|
1258
|
+
146: (state: any) => ({
|
|
1259
|
+
...state,
|
|
1260
|
+
localCurrency: {
|
|
1261
|
+
..._.omit(state.localCurrency, 'exchangeRates'),
|
|
1262
|
+
// We were previously fetching cUSD to local, but blockchain-api was returning USD to local
|
|
1263
|
+
// assuming cUSD == USD, so it's correct to keep this rate here
|
|
1264
|
+
usdToLocalRate: state.localCurrency.exchangeRates[Currency.Dollar],
|
|
1265
|
+
},
|
|
1266
|
+
}),
|
|
1267
|
+
147: (state: any) => ({
|
|
1268
|
+
...state,
|
|
1269
|
+
transactions: {
|
|
1270
|
+
...state.transactions,
|
|
1271
|
+
standbyTransactions: (
|
|
1272
|
+
state.transactions.standbyTransactions as (StandbyTransaction & { network: Network })[]
|
|
1273
|
+
).map((tx) => {
|
|
1274
|
+
return {
|
|
1275
|
+
..._.omit(tx, 'network'),
|
|
1276
|
+
networkId: networkConfig.networkToNetworkId[tx.network],
|
|
1277
|
+
}
|
|
1278
|
+
}),
|
|
1279
|
+
transactions: (
|
|
1280
|
+
state.transactions.transactions as (TokenTransaction & { network: Network })[]
|
|
1281
|
+
).map((tx) => {
|
|
1282
|
+
return {
|
|
1283
|
+
..._.omit(tx, 'network'),
|
|
1284
|
+
networkId: networkConfig.networkToNetworkId[tx.network],
|
|
1285
|
+
}
|
|
1286
|
+
}),
|
|
1287
|
+
},
|
|
1288
|
+
}),
|
|
1289
|
+
148: (state: any) => ({
|
|
1290
|
+
...state,
|
|
1291
|
+
app: {
|
|
1292
|
+
...state.app,
|
|
1293
|
+
showNotificationSpotlight: true, // true for all upgrading users
|
|
1294
|
+
},
|
|
1295
|
+
}),
|
|
1296
|
+
149: (state: any) => ({
|
|
1297
|
+
...state,
|
|
1298
|
+
app: {
|
|
1299
|
+
...state.app,
|
|
1300
|
+
activeScreen: Object.values(Screens).includes(state.app.activeScreen)
|
|
1301
|
+
? state.app.activeScreen
|
|
1302
|
+
: 'Main', // same as initial state. should be very rare, since removed screens were not present in prev app version.
|
|
1303
|
+
},
|
|
1304
|
+
}),
|
|
1305
|
+
150: (state: any) => ({
|
|
1306
|
+
...state,
|
|
1307
|
+
tokens: {
|
|
1308
|
+
...state.tokens,
|
|
1309
|
+
tokenBalances: {},
|
|
1310
|
+
},
|
|
1311
|
+
}),
|
|
1312
|
+
151: (state: any) => ({
|
|
1313
|
+
...state,
|
|
1314
|
+
tokens: {
|
|
1315
|
+
...state.tokens,
|
|
1316
|
+
tokenBalances: {},
|
|
1317
|
+
},
|
|
1318
|
+
}),
|
|
1319
|
+
152: (state: any) => state,
|
|
1320
|
+
153: (state: any) => ({
|
|
1321
|
+
...state,
|
|
1322
|
+
exchange: _.omit(state.exchange, 'isLoading'),
|
|
1323
|
+
}),
|
|
1324
|
+
154: (state: any) => ({
|
|
1325
|
+
...state,
|
|
1326
|
+
exchange: {
|
|
1327
|
+
..._.omit(state.exchange, 'exchangeRates', 'tobinTax'),
|
|
1328
|
+
},
|
|
1329
|
+
}),
|
|
1330
|
+
155: (state: any) => ({
|
|
1331
|
+
...state,
|
|
1332
|
+
app: _.omit(state.app, 'paymentDeepLinkHandler'),
|
|
1333
|
+
}),
|
|
1334
|
+
156: (state: any) => ({
|
|
1335
|
+
...state,
|
|
1336
|
+
app: _.omit(state.app, 'requireCPV'),
|
|
1337
|
+
}),
|
|
1338
|
+
157: (state: any) => ({
|
|
1339
|
+
...state,
|
|
1340
|
+
transactions: {
|
|
1341
|
+
...state.transactions,
|
|
1342
|
+
standbyTransactions: [],
|
|
1343
|
+
transactions: [],
|
|
1344
|
+
},
|
|
1345
|
+
}),
|
|
1346
|
+
158: (state: any) => ({
|
|
1347
|
+
...state,
|
|
1348
|
+
app: _.omit(state.app, 'decentralizedVerificationEnabled'),
|
|
1349
|
+
}),
|
|
1350
|
+
159: (state: any) => ({
|
|
1351
|
+
...state,
|
|
1352
|
+
transactions: _.omit(state.transactions, 'standbyTransactionsLegacy'),
|
|
1353
|
+
}),
|
|
1354
|
+
160: (state: any) => {
|
|
1355
|
+
const output = {
|
|
1356
|
+
...state,
|
|
1357
|
+
app: {
|
|
1358
|
+
...state.app,
|
|
1359
|
+
activeScreen: Object.values(Screens).includes(state.app.activeScreen)
|
|
1360
|
+
? state.app.activeScreen
|
|
1361
|
+
: 'Main', // since PaymentRequestConfirmation screen was deleted
|
|
1362
|
+
},
|
|
1363
|
+
}
|
|
1364
|
+
delete output.paymentRequest // doing this instead of output = {..._.omit(state, 'paymentRequest')} because _.omit removes underscore-prefixed properties too, like the required _persist key
|
|
1365
|
+
return output
|
|
1366
|
+
},
|
|
1367
|
+
161: (state: any) => ({
|
|
1368
|
+
...state,
|
|
1369
|
+
transactions: {
|
|
1370
|
+
...state.transactions,
|
|
1371
|
+
standbyTransactions: state.transactions.standbyTransactions.map((tx: any) => {
|
|
1372
|
+
const { value, tokenId, tokenAddress, comment, hash, ...rest } = tx
|
|
1373
|
+
return {
|
|
1374
|
+
...rest,
|
|
1375
|
+
__typename: 'TokenTransferV3', // only transfers were previously supported
|
|
1376
|
+
transactionHash: hash,
|
|
1377
|
+
amount: {
|
|
1378
|
+
value,
|
|
1379
|
+
tokenId,
|
|
1380
|
+
tokenAddress,
|
|
1381
|
+
},
|
|
1382
|
+
metadata: {
|
|
1383
|
+
comment,
|
|
1384
|
+
},
|
|
1385
|
+
}
|
|
1386
|
+
}),
|
|
1387
|
+
transactions: state.transactions.transactions.map((tx: any) => {
|
|
1388
|
+
return {
|
|
1389
|
+
...tx,
|
|
1390
|
+
status: 'Complete',
|
|
1391
|
+
}
|
|
1392
|
+
}),
|
|
1393
|
+
},
|
|
1394
|
+
}),
|
|
1395
|
+
162: (state: any) => ({
|
|
1396
|
+
...state,
|
|
1397
|
+
transactions: {
|
|
1398
|
+
...state.transactions,
|
|
1399
|
+
standbyTransactions: state.transactions.standbyTransactions.filter((tx: any) => {
|
|
1400
|
+
// this migration requires extra data on completed standby transactions
|
|
1401
|
+
// that we cannot recover, so we remove these from the store. this is
|
|
1402
|
+
// low risk since completed tx's will be returned by blockchain-api
|
|
1403
|
+
// eventually.
|
|
1404
|
+
return tx.status !== 'Complete'
|
|
1405
|
+
}),
|
|
1406
|
+
},
|
|
1407
|
+
}),
|
|
1408
|
+
163: (state: any) => ({
|
|
1409
|
+
...state,
|
|
1410
|
+
send: { ..._.omit(state.send, 'lastUsedCurrency'), lastUsedTokenId: undefined },
|
|
1411
|
+
}),
|
|
1412
|
+
164: (state: any) => ({
|
|
1413
|
+
...state,
|
|
1414
|
+
app: _.omit(state.app, 'rampCashInButtonExpEnabled'),
|
|
1415
|
+
}),
|
|
1416
|
+
165: (state: any) => {
|
|
1417
|
+
const transactionsByNetworkId: any = {}
|
|
1418
|
+
for (const tx of state.transactions.transactions) {
|
|
1419
|
+
const txNetworkId = tx.networkId ?? networkConfig.defaultNetworkId
|
|
1420
|
+
transactionsByNetworkId[txNetworkId] = [...(transactionsByNetworkId[txNetworkId] ?? []), tx]
|
|
1421
|
+
}
|
|
1422
|
+
|
|
1423
|
+
return {
|
|
1424
|
+
...state,
|
|
1425
|
+
transactions: {
|
|
1426
|
+
..._.omit(state.transactions, 'transactions'),
|
|
1427
|
+
transactionsByNetworkId,
|
|
1428
|
+
},
|
|
1429
|
+
}
|
|
1430
|
+
},
|
|
1431
|
+
166: (state: any) => ({ ...state, app: { ...state.app, hideHomeBalances: false } }),
|
|
1432
|
+
167: (state: any) => ({
|
|
1433
|
+
...state,
|
|
1434
|
+
app: {
|
|
1435
|
+
...state.app,
|
|
1436
|
+
rampCashInButtonExpEnabled: false,
|
|
1437
|
+
},
|
|
1438
|
+
}),
|
|
1439
|
+
168: (state: any) => ({
|
|
1440
|
+
...state,
|
|
1441
|
+
swap: _.omit(state.swap, 'swapUserInput'),
|
|
1442
|
+
}),
|
|
1443
|
+
169: (state: any) => state,
|
|
1444
|
+
170: (state: any) => ({
|
|
1445
|
+
...state,
|
|
1446
|
+
supercharge: _.omit(state.supercharge, 'superchargeV2Enabled', 'superchargeV1Addresses'),
|
|
1447
|
+
}),
|
|
1448
|
+
171: (state: any) => ({
|
|
1449
|
+
...state,
|
|
1450
|
+
app: {
|
|
1451
|
+
...state.app,
|
|
1452
|
+
multichainBetaStatus: 'NotSeen',
|
|
1453
|
+
},
|
|
1454
|
+
}),
|
|
1455
|
+
172: (state: any) => ({
|
|
1456
|
+
...state,
|
|
1457
|
+
swap: {
|
|
1458
|
+
..._.omit(state.swap, 'swapInfo'),
|
|
1459
|
+
currentSwap: null,
|
|
1460
|
+
},
|
|
1461
|
+
}),
|
|
1462
|
+
173: (state: any) => ({
|
|
1463
|
+
...state,
|
|
1464
|
+
swap: _.omit(state.swap, 'swapState'),
|
|
1465
|
+
}),
|
|
1466
|
+
174: (state: any) => ({
|
|
1467
|
+
...state,
|
|
1468
|
+
identity: {
|
|
1469
|
+
...state.identity,
|
|
1470
|
+
addressToVerificationStatus: {},
|
|
1471
|
+
},
|
|
1472
|
+
}),
|
|
1473
|
+
175: (state: any) => ({
|
|
1474
|
+
...state,
|
|
1475
|
+
tokens: {
|
|
1476
|
+
...state.tokens,
|
|
1477
|
+
tokenBalances: _.mapValues(state.tokens.tokenBalances, (item: any) => {
|
|
1478
|
+
const newItem = _.omit(item, 'isCoreToken')
|
|
1479
|
+
if (item.isCoreToken !== undefined) {
|
|
1480
|
+
newItem.isFeeCurrency = item.isCoreToken
|
|
1481
|
+
newItem.canTransferWithComment = item.isCoreToken
|
|
1482
|
+
}
|
|
1483
|
+
return newItem
|
|
1484
|
+
}),
|
|
1485
|
+
},
|
|
1486
|
+
}),
|
|
1487
|
+
176: (state: any) => ({
|
|
1488
|
+
...state,
|
|
1489
|
+
identity: {
|
|
1490
|
+
...state.identity,
|
|
1491
|
+
lastSavedContactsHash: null,
|
|
1492
|
+
},
|
|
1493
|
+
}),
|
|
1494
|
+
177: (state: any) => ({
|
|
1495
|
+
...state,
|
|
1496
|
+
swap: {
|
|
1497
|
+
...state.swap,
|
|
1498
|
+
...(state.swap.priceImpactWarningThreshold && {
|
|
1499
|
+
priceImpactWarningThreshold: state.swap.priceImpactWarningThreshold * 100,
|
|
1500
|
+
}),
|
|
1501
|
+
},
|
|
1502
|
+
}),
|
|
1503
|
+
178: (state: any) => ({
|
|
1504
|
+
...state,
|
|
1505
|
+
swap: _.omit(state.swap, 'guaranteedSwapPriceEnabled'),
|
|
1506
|
+
}),
|
|
1507
|
+
179: (state: any) => ({
|
|
1508
|
+
...state,
|
|
1509
|
+
priceHistory: {},
|
|
1510
|
+
}),
|
|
1511
|
+
180: (state: any) => ({
|
|
1512
|
+
...state,
|
|
1513
|
+
send: {
|
|
1514
|
+
...state.send,
|
|
1515
|
+
recentRecipients: state.send.recentRecipients.filter(
|
|
1516
|
+
(recentRecipient: Recipient) => !!recentRecipient.address
|
|
1517
|
+
),
|
|
1518
|
+
},
|
|
1519
|
+
}),
|
|
1520
|
+
181: (state: any) => ({
|
|
1521
|
+
...state,
|
|
1522
|
+
nfts: {
|
|
1523
|
+
...state.nfts,
|
|
1524
|
+
nfts: [],
|
|
1525
|
+
},
|
|
1526
|
+
}),
|
|
1527
|
+
182: (state: any) => ({
|
|
1528
|
+
...state,
|
|
1529
|
+
tokens: {
|
|
1530
|
+
...state.tokens,
|
|
1531
|
+
importedTokens: {},
|
|
1532
|
+
},
|
|
1533
|
+
}),
|
|
1534
|
+
183: (state: any) => ({
|
|
1535
|
+
...state,
|
|
1536
|
+
home: { ...state.home, cleverTapInboxMessages: [] },
|
|
1537
|
+
}),
|
|
1538
|
+
184: (state: any) => ({
|
|
1539
|
+
...state,
|
|
1540
|
+
swap: { ...state.swap, lastSwapped: [] },
|
|
1541
|
+
}),
|
|
1542
|
+
185: (state: any) => ({
|
|
1543
|
+
...state,
|
|
1544
|
+
tokens: _.omit(state.tokens, 'importedTokens'),
|
|
1545
|
+
}),
|
|
1546
|
+
186: (state: any) => ({
|
|
1547
|
+
...state,
|
|
1548
|
+
home: { ...state.home, hasVisitedHome: !!state.web3.account },
|
|
1549
|
+
app: { ...state.app, pendingDeepLinks: [] },
|
|
1550
|
+
}),
|
|
1551
|
+
187: (state: any) => ({
|
|
1552
|
+
...state,
|
|
1553
|
+
dapps: _.omit(
|
|
1554
|
+
state.dapps,
|
|
1555
|
+
'dappConnectInfo',
|
|
1556
|
+
'dappFavoritesEnabled',
|
|
1557
|
+
'dappsMinimalDisclaimerEnabled'
|
|
1558
|
+
),
|
|
1559
|
+
}),
|
|
1560
|
+
188: (state: any) => ({
|
|
1561
|
+
...state,
|
|
1562
|
+
app: _.omit(state.app, 'celoEuroEnabled', 'rewardPillText'),
|
|
1563
|
+
send: _.omit(state.send, 'inviteRewardWeeklyLimit', 'inviteRewardCusd'),
|
|
1564
|
+
}),
|
|
1565
|
+
189: (state: any) => ({
|
|
1566
|
+
...state,
|
|
1567
|
+
home: { ...state.home, nftCelebration: null },
|
|
1568
|
+
}),
|
|
1569
|
+
190: (state: any) => {
|
|
1570
|
+
const currencyMapping: Record<string, LocalCurrencyCode> = {
|
|
1571
|
+
MYS: LocalCurrencyCode.MYR,
|
|
1572
|
+
SGP: LocalCurrencyCode.SGD,
|
|
1573
|
+
THI: LocalCurrencyCode.THB,
|
|
1574
|
+
TWN: LocalCurrencyCode.TWD,
|
|
1575
|
+
VNM: LocalCurrencyCode.VND,
|
|
1576
|
+
}
|
|
1577
|
+
const preferredCurrencyCode =
|
|
1578
|
+
currencyMapping[state.localCurrency.preferredCurrencyCode] ??
|
|
1579
|
+
state.localCurrency.preferredCurrencyCode
|
|
1580
|
+
const fetchedCurrencyCode =
|
|
1581
|
+
currencyMapping[state.localCurrency.fetchedCurrencyCode] ??
|
|
1582
|
+
state.localCurrency.fetchedCurrencyCode
|
|
1583
|
+
|
|
1584
|
+
return {
|
|
1585
|
+
...state,
|
|
1586
|
+
localCurrency: {
|
|
1587
|
+
...state.localCurrency,
|
|
1588
|
+
preferredCurrencyCode,
|
|
1589
|
+
fetchedCurrencyCode,
|
|
1590
|
+
},
|
|
1591
|
+
}
|
|
1592
|
+
},
|
|
1593
|
+
191: (state: any) => ({
|
|
1594
|
+
...state,
|
|
1595
|
+
app: _.omit(state.app, 'walletConnectV1Enabled'),
|
|
1596
|
+
}),
|
|
1597
|
+
192: (state: any) => ({
|
|
1598
|
+
...state,
|
|
1599
|
+
app: _.omit(state.app, [
|
|
1600
|
+
'showPriceChangeIndicatorInBalances',
|
|
1601
|
+
'visualizeNFTsEnabledInHomeAssetsPage',
|
|
1602
|
+
]),
|
|
1603
|
+
}),
|
|
1604
|
+
193: (state: any) => state,
|
|
1605
|
+
194: (state: any) => ({
|
|
1606
|
+
...state,
|
|
1607
|
+
send: {
|
|
1608
|
+
..._.omit(state.send, 'showSendToAddressWarning'),
|
|
1609
|
+
encryptedComment: null,
|
|
1610
|
+
isEncryptingComment: false,
|
|
1611
|
+
},
|
|
1612
|
+
}),
|
|
1613
|
+
195: (state: any) => state,
|
|
1614
|
+
196: (state: any) => ({
|
|
1615
|
+
...state,
|
|
1616
|
+
jumpstart: {
|
|
1617
|
+
claimStatus: 'idle',
|
|
1618
|
+
},
|
|
1619
|
+
}),
|
|
1620
|
+
197: (state: any) => ({
|
|
1621
|
+
...state,
|
|
1622
|
+
web3: _.omit(state.web3, 'twelveWordMnemonicEnabled'),
|
|
1623
|
+
}),
|
|
1624
|
+
198: (state: any) => ({
|
|
1625
|
+
...state,
|
|
1626
|
+
home: {
|
|
1627
|
+
...state.home,
|
|
1628
|
+
nftCelebration: null,
|
|
1629
|
+
},
|
|
1630
|
+
}),
|
|
1631
|
+
199: (state: any) => ({
|
|
1632
|
+
...state,
|
|
1633
|
+
app: _.omit(state.app, 'rampCashInButtonExpEnabled'),
|
|
1634
|
+
}),
|
|
1635
|
+
200: (state: any) => ({
|
|
1636
|
+
...state,
|
|
1637
|
+
jumpstart: {
|
|
1638
|
+
...state.jumpstart,
|
|
1639
|
+
depositStatus: 'idle',
|
|
1640
|
+
},
|
|
1641
|
+
}),
|
|
1642
|
+
201: (state: any) => ({
|
|
1643
|
+
...state,
|
|
1644
|
+
app: {
|
|
1645
|
+
..._.omit(state.app, 'hideHomeBalances'),
|
|
1646
|
+
hideBalances: state.app.hideHomeBalances,
|
|
1647
|
+
},
|
|
1648
|
+
}),
|
|
1649
|
+
202: (state: any) => ({
|
|
1650
|
+
...state,
|
|
1651
|
+
walletConnect: {
|
|
1652
|
+
...state.walletConnect,
|
|
1653
|
+
pendingSessions: [],
|
|
1654
|
+
},
|
|
1655
|
+
}),
|
|
1656
|
+
203: (state: any) => ({
|
|
1657
|
+
...state,
|
|
1658
|
+
jumpstart: {
|
|
1659
|
+
...state.jumpstart,
|
|
1660
|
+
reclaimStatus: 'idle',
|
|
1661
|
+
},
|
|
1662
|
+
}),
|
|
1663
|
+
204: (state: any) => {
|
|
1664
|
+
function chooseNetworkId({
|
|
1665
|
+
networkId,
|
|
1666
|
+
network,
|
|
1667
|
+
}: {
|
|
1668
|
+
networkId?: NetworkId
|
|
1669
|
+
network?: 'celo' | 'celoAlfajores'
|
|
1670
|
+
}) {
|
|
1671
|
+
// hooks API has been returning 'networkId' since 4/2/2024, so users who have been active since then already have networkId in state
|
|
1672
|
+
if (networkId) {
|
|
1673
|
+
return networkId
|
|
1674
|
+
}
|
|
1675
|
+
// users inactive since before 4/2 have 'network' in their state
|
|
1676
|
+
if (network) {
|
|
1677
|
+
return network === 'celo' ? NetworkId['celo-mainnet'] : NetworkId['celo-alfajores']
|
|
1678
|
+
}
|
|
1679
|
+
// should never happen, but only celo mainnet has been released so far
|
|
1680
|
+
return NetworkId['celo-mainnet']
|
|
1681
|
+
}
|
|
1682
|
+
|
|
1683
|
+
function chooseNetworkIds({
|
|
1684
|
+
networkIds,
|
|
1685
|
+
networks,
|
|
1686
|
+
}: {
|
|
1687
|
+
networkIds?: NetworkId[]
|
|
1688
|
+
networks?: ('celo' | 'celoAlfajores')[]
|
|
1689
|
+
}) {
|
|
1690
|
+
if (networkIds) {
|
|
1691
|
+
return networkIds
|
|
1692
|
+
}
|
|
1693
|
+
if (networks) {
|
|
1694
|
+
return networks.map((network) =>
|
|
1695
|
+
network === 'celo' ? NetworkId['celo-mainnet'] : NetworkId['celo-alfajores']
|
|
1696
|
+
)
|
|
1697
|
+
}
|
|
1698
|
+
// should never happen, but only celo mainnet has been released so far
|
|
1699
|
+
return [NetworkId['celo-mainnet']]
|
|
1700
|
+
}
|
|
1701
|
+
|
|
1702
|
+
return {
|
|
1703
|
+
...state,
|
|
1704
|
+
positions: {
|
|
1705
|
+
...state.positions,
|
|
1706
|
+
shortcuts: state.positions.shortcuts.map(
|
|
1707
|
+
(shortcut: { networks?: ('celo' | 'celoAlfajores')[]; networkIds?: NetworkId[] }) => {
|
|
1708
|
+
return {
|
|
1709
|
+
..._.omit(shortcut, 'networks'),
|
|
1710
|
+
networkIds: chooseNetworkIds(shortcut),
|
|
1711
|
+
}
|
|
1712
|
+
}
|
|
1713
|
+
),
|
|
1714
|
+
positions: state.positions.positions.map(
|
|
1715
|
+
(position: {
|
|
1716
|
+
network?: 'celo' | 'celoAlfajores'
|
|
1717
|
+
networkId?: NetworkId
|
|
1718
|
+
tokens: { network: 'celo' | 'celoAlfajores' }[]
|
|
1719
|
+
}) => {
|
|
1720
|
+
// deliberately using types specific to this migration since they are frozen, whereas types used in the app
|
|
1721
|
+
// can have breaking changes relevant to this migration
|
|
1722
|
+
type LegacyToken = {
|
|
1723
|
+
network?: 'celo' | 'celoAlfajores'
|
|
1724
|
+
networkId?: NetworkId
|
|
1725
|
+
tokens?: LegacyToken[]
|
|
1726
|
+
}
|
|
1727
|
+
type UpdatedToken = { networkId: NetworkId; tokens?: UpdatedToken[] }
|
|
1728
|
+
|
|
1729
|
+
function recursivelyUpdateToken(token: LegacyToken): UpdatedToken {
|
|
1730
|
+
const output: UpdatedToken = {
|
|
1731
|
+
..._.omit(token, 'network', 'tokens'),
|
|
1732
|
+
networkId: chooseNetworkId(token),
|
|
1733
|
+
}
|
|
1734
|
+
if (token.tokens) {
|
|
1735
|
+
output.tokens = token.tokens.map(recursivelyUpdateToken)
|
|
1736
|
+
}
|
|
1737
|
+
return output
|
|
1738
|
+
}
|
|
1739
|
+
|
|
1740
|
+
return {
|
|
1741
|
+
..._.omit(position, 'network'),
|
|
1742
|
+
networkId: chooseNetworkId(position),
|
|
1743
|
+
tokens: position.tokens.map(recursivelyUpdateToken),
|
|
1744
|
+
}
|
|
1745
|
+
}
|
|
1746
|
+
),
|
|
1747
|
+
},
|
|
1748
|
+
}
|
|
1749
|
+
},
|
|
1750
|
+
205: (state: any) => state,
|
|
1751
|
+
206: (state: any) => ({
|
|
1752
|
+
...state,
|
|
1753
|
+
app: _.omit(state.app, 'skipVerification'),
|
|
1754
|
+
}),
|
|
1755
|
+
207: (state: any) => ({
|
|
1756
|
+
...state,
|
|
1757
|
+
points: {
|
|
1758
|
+
...state.points,
|
|
1759
|
+
pointsConfig: { activitiesById: {} },
|
|
1760
|
+
pointsConfigStatus: 'idle',
|
|
1761
|
+
},
|
|
1762
|
+
}),
|
|
1763
|
+
208: (state: any) => ({
|
|
1764
|
+
...state,
|
|
1765
|
+
identity: {
|
|
1766
|
+
...state.identity,
|
|
1767
|
+
shouldRefreshStoredPasswordHash: true,
|
|
1768
|
+
},
|
|
1769
|
+
}),
|
|
1770
|
+
209: (state: any) => ({
|
|
1771
|
+
...state,
|
|
1772
|
+
points: {
|
|
1773
|
+
...state.points,
|
|
1774
|
+
pendingPointsEvents: [],
|
|
1775
|
+
},
|
|
1776
|
+
}),
|
|
1777
|
+
210: (state: any) => ({
|
|
1778
|
+
...state,
|
|
1779
|
+
points: {
|
|
1780
|
+
...state.points,
|
|
1781
|
+
pointsHistory: [],
|
|
1782
|
+
},
|
|
1783
|
+
}),
|
|
1784
|
+
211: (state: any) => ({
|
|
1785
|
+
...(_.omit(state, 'exchange') as any),
|
|
1786
|
+
}),
|
|
1787
|
+
212: (state: any) => state,
|
|
1788
|
+
213: (state: any) => ({
|
|
1789
|
+
...state,
|
|
1790
|
+
earn: {
|
|
1791
|
+
depositStatus: 'idle',
|
|
1792
|
+
},
|
|
1793
|
+
}),
|
|
1794
|
+
214: (state: any) => state,
|
|
1795
|
+
215: (state: any) => ({
|
|
1796
|
+
...state,
|
|
1797
|
+
points: {
|
|
1798
|
+
...state.points,
|
|
1799
|
+
introHasBeenDismissed: false,
|
|
1800
|
+
},
|
|
1801
|
+
}),
|
|
1802
|
+
216: (state: any) => ({
|
|
1803
|
+
...state,
|
|
1804
|
+
earn: {
|
|
1805
|
+
depositStatus: 'idle',
|
|
1806
|
+
withdrawStatus: 'idle',
|
|
1807
|
+
},
|
|
1808
|
+
}),
|
|
1809
|
+
217: (state: any) => ({
|
|
1810
|
+
...state,
|
|
1811
|
+
points: {
|
|
1812
|
+
...state.points,
|
|
1813
|
+
trackOnceActivities: {
|
|
1814
|
+
'create-wallet': false,
|
|
1815
|
+
},
|
|
1816
|
+
},
|
|
1817
|
+
}),
|
|
1818
|
+
218: (state: any) => ({
|
|
1819
|
+
...state,
|
|
1820
|
+
earn: {
|
|
1821
|
+
...state.earn,
|
|
1822
|
+
poolInfoFetchStatus: 'idle',
|
|
1823
|
+
},
|
|
1824
|
+
}),
|
|
1825
|
+
219: (state: any) => ({
|
|
1826
|
+
...state,
|
|
1827
|
+
positions: {
|
|
1828
|
+
...state.positions,
|
|
1829
|
+
positions: [], // clear positions, they will be fetched again
|
|
1830
|
+
},
|
|
1831
|
+
}),
|
|
1832
|
+
220: (state: any) => state,
|
|
1833
|
+
221: (state: any) => state,
|
|
1834
|
+
222: (state: any) => ({
|
|
1835
|
+
...state,
|
|
1836
|
+
positions: {
|
|
1837
|
+
...state.positions,
|
|
1838
|
+
// Note: we're not clearing positions again here, even if we added positionId
|
|
1839
|
+
// because migration 219 already cleared positions, and positionIds were already returned by the hooks API
|
|
1840
|
+
earnPositionIds: [],
|
|
1841
|
+
},
|
|
1842
|
+
}),
|
|
1843
|
+
223: (state: any) => ({
|
|
1844
|
+
...state,
|
|
1845
|
+
recipients: {
|
|
1846
|
+
..._.omit(state.recipients, 'valoraRecipientCache'),
|
|
1847
|
+
appRecipientCache: state.recipients.valoraRecipientCache || {},
|
|
1848
|
+
},
|
|
1849
|
+
}),
|
|
1850
|
+
224: (state: any) => ({
|
|
1851
|
+
...(_.omit(state, 'supercharge') as any),
|
|
1852
|
+
app: _.omit(state.app, 'superchargeApy', 'superchargeTokenConfigByToken'),
|
|
1853
|
+
account: _.omit(state.account, 'dismissedKeepSupercharging', 'dismissedStartSupercharging'),
|
|
1854
|
+
}),
|
|
1855
|
+
225: (state: any) => ({
|
|
1856
|
+
...(_.omit(state, 'escrow') as any),
|
|
1857
|
+
transactions: _.omit(
|
|
1858
|
+
state.transactions,
|
|
1859
|
+
'recentTxRecipientsCache',
|
|
1860
|
+
'inviteTransactions',
|
|
1861
|
+
'knownFeedTransactions'
|
|
1862
|
+
),
|
|
1863
|
+
}),
|
|
1864
|
+
226: (state: any) => ({
|
|
1865
|
+
...(_.omit(state, 'fees') as any),
|
|
1866
|
+
}),
|
|
1867
|
+
227: (state: any) => ({
|
|
1868
|
+
...state,
|
|
1869
|
+
account: _.omit(state.account, 'pictureUri'),
|
|
1870
|
+
}),
|
|
1871
|
+
228: (state: any) => ({
|
|
1872
|
+
...state,
|
|
1873
|
+
identity: _.omit(
|
|
1874
|
+
state.identity,
|
|
1875
|
+
'walletToAccountAddress',
|
|
1876
|
+
'e164NumberToSalt',
|
|
1877
|
+
'addressToDataEncryptionKey'
|
|
1878
|
+
),
|
|
1879
|
+
web3: _.omit(
|
|
1880
|
+
state.web3,
|
|
1881
|
+
'accountInWeb3Keystore',
|
|
1882
|
+
'dataEncryptionKey',
|
|
1883
|
+
'isDekRegistered',
|
|
1884
|
+
'mtwAddress'
|
|
1885
|
+
),
|
|
1886
|
+
}),
|
|
1887
|
+
229: (state: any) => {
|
|
1888
|
+
const transactionsByNetworkId: any = {}
|
|
1889
|
+
for (const networkId of Object.keys(state.transactions.transactionsByNetworkId)) {
|
|
1890
|
+
const transactions = []
|
|
1891
|
+
for (const tx of state.transactions.transactionsByNetworkId[networkId]) {
|
|
1892
|
+
;(networkId === NetworkId['arbitrum-one'] || networkId === NetworkId['arbitrum-sepolia']) &&
|
|
1893
|
+
tx.providerId &&
|
|
1894
|
+
tx.providerId === 'aave-v3'
|
|
1895
|
+
? transactions.push({ ...tx, providerId: 'aave' })
|
|
1896
|
+
: transactions.push(tx)
|
|
1897
|
+
}
|
|
1898
|
+
transactionsByNetworkId[networkId] = transactions
|
|
1899
|
+
}
|
|
1900
|
+
return {
|
|
1901
|
+
...state,
|
|
1902
|
+
transactions: {
|
|
1903
|
+
...state.transactions,
|
|
1904
|
+
transactionsByNetworkId,
|
|
1905
|
+
standbyTransactions: state.transactions.standbyTransactions.map((tx: any) => {
|
|
1906
|
+
return tx.providerId && tx.providerId === 'aave-v3' ? { ...tx, providerId: 'aave' } : tx
|
|
1907
|
+
}),
|
|
1908
|
+
},
|
|
1909
|
+
}
|
|
1910
|
+
},
|
|
1911
|
+
230: (state: any) => ({
|
|
1912
|
+
...state,
|
|
1913
|
+
app: _.omit(state.app, 'minVersion'),
|
|
1914
|
+
}),
|
|
1915
|
+
231: (state: any) => ({
|
|
1916
|
+
...state,
|
|
1917
|
+
jumpstart: {
|
|
1918
|
+
...state.jumpstart,
|
|
1919
|
+
introHasBeenSeen: false,
|
|
1920
|
+
},
|
|
1921
|
+
}),
|
|
1922
|
+
232: (state: any) => ({
|
|
1923
|
+
...state,
|
|
1924
|
+
app: _.omit(state.app, 'numberVerified'),
|
|
1925
|
+
}),
|
|
1926
|
+
233: (state: any) => state,
|
|
1927
|
+
234: (state: any) => ({
|
|
1928
|
+
...state,
|
|
1929
|
+
transactions: {
|
|
1930
|
+
...state.transactions,
|
|
1931
|
+
feedFirstPage: [],
|
|
1932
|
+
},
|
|
1933
|
+
}),
|
|
1934
|
+
235: (state: any) => state,
|
|
1935
|
+
236: (state: any) => ({
|
|
1936
|
+
...state,
|
|
1937
|
+
tokens: _.omit(state.tokens, 'loading'),
|
|
1938
|
+
}),
|
|
1939
|
+
237: (state: any) => {
|
|
1940
|
+
// This migration is taken directly from the old initial route logic. The
|
|
1941
|
+
// only difference is that the multi-chain beta screen has been removed, since
|
|
1942
|
+
// it required fetching a feature gate.
|
|
1943
|
+
const lastOnboardingStepScreen = (() => {
|
|
1944
|
+
if (!state.i18n.language) {
|
|
1945
|
+
return Screens.Language
|
|
1946
|
+
} else if (!state.account.acceptedTerms || state.account.pincodeType === PincodeType.Unset) {
|
|
1947
|
+
return Screens.Welcome
|
|
1948
|
+
} else if (!state.web3.account) {
|
|
1949
|
+
return state.account.choseToRestoreAccount
|
|
1950
|
+
? ONBOARDING_FEATURES_ENABLED[ToggleableOnboardingFeatures.CloudBackup]
|
|
1951
|
+
? Screens.ImportSelect
|
|
1952
|
+
: Screens.ImportWallet
|
|
1953
|
+
: Screens.Welcome
|
|
1954
|
+
} else if (
|
|
1955
|
+
state.account.recoveryPhraseInOnboardingStatus ===
|
|
1956
|
+
RecoveryPhraseInOnboardingStatus.InProgress
|
|
1957
|
+
) {
|
|
1958
|
+
return Screens.ProtectWallet
|
|
1959
|
+
} else if (
|
|
1960
|
+
!state.identity.hasSeenVerificationNux &&
|
|
1961
|
+
ONBOARDING_FEATURES_ENABLED[ToggleableOnboardingFeatures.PhoneVerification]
|
|
1962
|
+
) {
|
|
1963
|
+
return Screens.VerificationStartScreen
|
|
1964
|
+
} else {
|
|
1965
|
+
return Screens.TabNavigator
|
|
1966
|
+
}
|
|
1967
|
+
})()
|
|
1968
|
+
const onboardingCompleted = lastOnboardingStepScreen === Screens.TabNavigator
|
|
1969
|
+
|
|
1970
|
+
return {
|
|
1971
|
+
...state,
|
|
1972
|
+
account: {
|
|
1973
|
+
...state.account,
|
|
1974
|
+
onboardingCompleted,
|
|
1975
|
+
lastOnboardingStepScreen,
|
|
1976
|
+
},
|
|
1977
|
+
identity: _.omit(state.identity, 'hasSeenVerificationNux'),
|
|
1978
|
+
}
|
|
1979
|
+
},
|
|
1980
|
+
238: (state: any) => ({
|
|
1981
|
+
...state,
|
|
1982
|
+
app: _.omit(state.app, 'multichainBetaStatus'),
|
|
1983
|
+
}),
|
|
1984
|
+
239: (state: any) => ({
|
|
1985
|
+
...state,
|
|
1986
|
+
app: _.omit(state.app, 'showSwapMenuInDrawerMenu'),
|
|
1987
|
+
}),
|
|
1988
|
+
240: (state: any) => ({
|
|
1989
|
+
...state,
|
|
1990
|
+
web3: {
|
|
1991
|
+
...state.web3,
|
|
1992
|
+
demoModeEnabled: false,
|
|
1993
|
+
},
|
|
1994
|
+
}),
|
|
1995
|
+
241: (state: any) => ({
|
|
1996
|
+
...state,
|
|
1997
|
+
app: _.omit(
|
|
1998
|
+
state.app,
|
|
1999
|
+
'walletConnectV2Enabled',
|
|
2000
|
+
'logPhoneNumberTypeEnabled',
|
|
2001
|
+
'coinbasePayEnabled',
|
|
2002
|
+
'maxSwapSlippagePercentage',
|
|
2003
|
+
'networkTimeoutSeconds',
|
|
2004
|
+
'celoEducationUri',
|
|
2005
|
+
'pincodeUseExpandedBlocklist'
|
|
2006
|
+
),
|
|
2007
|
+
}),
|
|
2008
|
+
242: (state: any) => ({
|
|
2009
|
+
...state,
|
|
2010
|
+
app: _.omit(state.app, 'celoNews'),
|
|
2011
|
+
dapps: _.omit(state.dapps, 'dappListApiUrl', 'maxNumRecentDapps', 'dappsWebViewEnabled'),
|
|
2012
|
+
swap: _.omit(state.swap, 'priceImpactWarningThreshold'),
|
|
2013
|
+
}),
|
|
2014
|
+
243: (state: any) => ({
|
|
2015
|
+
...state,
|
|
2016
|
+
app: _.omit(state.app, 'sentryTracesSampleRate', 'sentryNetworkErrors'),
|
|
2017
|
+
i18n: _.omit(state.i18n, 'allowOtaTranslations'),
|
|
2018
|
+
}),
|
|
2019
|
+
244: (state: any) => ({
|
|
2020
|
+
...state,
|
|
2021
|
+
app: {
|
|
2022
|
+
..._.omit(state.app, 'loggedIn'),
|
|
2023
|
+
divviRegistrations: {},
|
|
2024
|
+
},
|
|
2025
|
+
}),
|
|
2026
|
+
245: (state: any) => ({
|
|
2027
|
+
...state,
|
|
2028
|
+
app: _.omit(state.app, 'fiatConnectCashInEnabled', 'fiatConnectCashOutEnabled'),
|
|
2029
|
+
}),
|
|
2030
|
+
246: (state: any) => ({
|
|
2031
|
+
...state,
|
|
2032
|
+
send: _.omit(state.send, 'inviteRewardsVersion'),
|
|
2033
|
+
fiatConnect: _.omit(state.fiatConnect, 'schemaCountryOverrides'),
|
|
2034
|
+
}),
|
|
2035
|
+
247: (state: any) => ({
|
|
2036
|
+
...state,
|
|
2037
|
+
home: _.omit(state.home, 'cleverTapInboxMessages'),
|
|
2038
|
+
}),
|
|
2039
|
+
248: (state: any) => ({
|
|
2040
|
+
...state,
|
|
2041
|
+
divviProtocol: {
|
|
2042
|
+
referrals: {},
|
|
2043
|
+
},
|
|
2044
|
+
app: _.omit(state.app, 'divviRegistrations'),
|
|
2045
|
+
}),
|
|
2046
|
+
249: (state: any) => ({
|
|
2047
|
+
...state,
|
|
2048
|
+
home: {
|
|
2049
|
+
...state.home,
|
|
2050
|
+
hasSeenDivviBottomSheet: false,
|
|
2051
|
+
},
|
|
2052
|
+
}),
|
|
2053
|
+
250: (state: any) => ({
|
|
2054
|
+
...(_.omit(state, 'divviProtocol') as any),
|
|
2055
|
+
}),
|
|
2056
|
+
251: (state: any) => ({
|
|
2057
|
+
...state,
|
|
2058
|
+
fiatConnect: _.omit(state.fiatConnect, 'personaInProgress'),
|
|
2059
|
+
}),
|
|
2060
|
+
252: (state: any) => ({
|
|
2061
|
+
...state,
|
|
2062
|
+
jumpstart: _.pick(state.jumpstart, 'reclaimStatus'),
|
|
2063
|
+
app: _.omit(state.app, 'inviterAddress'),
|
|
2064
|
+
}),
|
|
2065
|
+
253: (state: any) => ({
|
|
2066
|
+
...state,
|
|
2067
|
+
sendCalls: { batchById: {} },
|
|
2068
|
+
}),
|
|
2069
|
+
}
|