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,106 @@
|
|
|
1
|
+
import i18n from 'i18next'
|
|
2
|
+
import DeviceInfo from 'react-native-device-info'
|
|
3
|
+
import { expectSaga } from 'redux-saga-test-plan'
|
|
4
|
+
import { EffectProviders, StaticProvider } from 'redux-saga-test-plan/providers'
|
|
5
|
+
import { call, select } from 'redux-saga/effects'
|
|
6
|
+
import { getAppConfig } from 'src/appConfig'
|
|
7
|
+
import { saveOtaTranslations } from 'src/i18n/otaTranslations'
|
|
8
|
+
import { handleFetchOtaTranslations } from 'src/i18n/saga'
|
|
9
|
+
import {
|
|
10
|
+
currentLanguageSelector,
|
|
11
|
+
otaTranslationsAppVersionSelector,
|
|
12
|
+
otaTranslationsLanguageSelector,
|
|
13
|
+
otaTranslationsLastUpdateSelector,
|
|
14
|
+
} from 'src/i18n/selectors'
|
|
15
|
+
import { otaTranslationsUpdated } from 'src/i18n/slice'
|
|
16
|
+
|
|
17
|
+
jest.mock('@crowdin/ota-client', () => {
|
|
18
|
+
return function () {
|
|
19
|
+
return {
|
|
20
|
+
getManifestTimestamp: jest.fn(() => 123456),
|
|
21
|
+
getStringsByLocale: jest.fn((langCode: string) => {
|
|
22
|
+
if (langCode === 'en' || langCode === 'de') {
|
|
23
|
+
return { someNamespace: { someKey: 'someValue ' } }
|
|
24
|
+
}
|
|
25
|
+
throw new Error('Unsupported language')
|
|
26
|
+
}),
|
|
27
|
+
getContent: jest.fn(() => ({
|
|
28
|
+
en: ['main/locales/en-US/translation.json'],
|
|
29
|
+
de: ['main/locales/de/translation.json'],
|
|
30
|
+
})),
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
})
|
|
34
|
+
|
|
35
|
+
jest.mock('i18next', () => ({
|
|
36
|
+
addResourceBundle: jest.fn(),
|
|
37
|
+
}))
|
|
38
|
+
|
|
39
|
+
const MockedI18n = jest.mocked(i18n)
|
|
40
|
+
|
|
41
|
+
describe('i18n sagas', () => {
|
|
42
|
+
afterEach(() => {
|
|
43
|
+
jest.clearAllMocks()
|
|
44
|
+
})
|
|
45
|
+
|
|
46
|
+
it('handles fetching over the air translations', async () => {
|
|
47
|
+
const translations = { someNamespace: { someKey: 'someValue ' } }
|
|
48
|
+
const timestamp = 123456
|
|
49
|
+
const appVersion = '1.0.0'
|
|
50
|
+
const mockedVersion = DeviceInfo.getVersion as jest.MockedFunction<typeof DeviceInfo.getVersion>
|
|
51
|
+
mockedVersion.mockImplementation(() => appVersion)
|
|
52
|
+
const defaultProviders: (EffectProviders | StaticProvider)[] = [
|
|
53
|
+
[
|
|
54
|
+
call(getAppConfig),
|
|
55
|
+
{ experimental: { otaTranslations: { crowdinDistributionHash: 'hash' } } },
|
|
56
|
+
],
|
|
57
|
+
[select(otaTranslationsAppVersionSelector), appVersion],
|
|
58
|
+
[select(otaTranslationsLanguageSelector), 'en-US'],
|
|
59
|
+
[select(currentLanguageSelector), 'en-US'],
|
|
60
|
+
[select(otaTranslationsLastUpdateSelector), timestamp],
|
|
61
|
+
[call(saveOtaTranslations, { 'en-US': translations }), null],
|
|
62
|
+
]
|
|
63
|
+
|
|
64
|
+
// last fetched translations are outdated
|
|
65
|
+
await expectSaga(handleFetchOtaTranslations)
|
|
66
|
+
.provide([[select(otaTranslationsLastUpdateSelector), 0], ...defaultProviders])
|
|
67
|
+
.put(
|
|
68
|
+
otaTranslationsUpdated({
|
|
69
|
+
otaTranslationsLastUpdate: timestamp,
|
|
70
|
+
otaTranslationsAppVersion: appVersion,
|
|
71
|
+
otaTranslationsLanguage: 'en-US',
|
|
72
|
+
})
|
|
73
|
+
)
|
|
74
|
+
.run()
|
|
75
|
+
|
|
76
|
+
// last fetched translations are for a different language
|
|
77
|
+
await expectSaga(handleFetchOtaTranslations)
|
|
78
|
+
.provide([
|
|
79
|
+
[select(currentLanguageSelector), 'de'],
|
|
80
|
+
[call(saveOtaTranslations, { de: translations }), null],
|
|
81
|
+
...defaultProviders,
|
|
82
|
+
])
|
|
83
|
+
.put(
|
|
84
|
+
otaTranslationsUpdated({
|
|
85
|
+
otaTranslationsLastUpdate: timestamp,
|
|
86
|
+
otaTranslationsAppVersion: appVersion,
|
|
87
|
+
otaTranslationsLanguage: 'de',
|
|
88
|
+
})
|
|
89
|
+
)
|
|
90
|
+
.run()
|
|
91
|
+
|
|
92
|
+
// last fetched translations are for a previous app version
|
|
93
|
+
await expectSaga(handleFetchOtaTranslations)
|
|
94
|
+
.provide([[select(otaTranslationsAppVersionSelector), '0.9.0'], ...defaultProviders])
|
|
95
|
+
.put(
|
|
96
|
+
otaTranslationsUpdated({
|
|
97
|
+
otaTranslationsLastUpdate: timestamp,
|
|
98
|
+
otaTranslationsAppVersion: appVersion,
|
|
99
|
+
otaTranslationsLanguage: 'en-US',
|
|
100
|
+
})
|
|
101
|
+
)
|
|
102
|
+
.run()
|
|
103
|
+
|
|
104
|
+
expect(MockedI18n.addResourceBundle).toHaveBeenCalledTimes(3)
|
|
105
|
+
})
|
|
106
|
+
})
|
package/src/i18n/saga.ts
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import OtaClient from '@crowdin/ota-client'
|
|
2
|
+
import i18n from 'i18next'
|
|
3
|
+
import DeviceInfo from 'react-native-device-info'
|
|
4
|
+
import { getAppConfig } from 'src/appConfig'
|
|
5
|
+
import { saveOtaTranslations } from 'src/i18n/otaTranslations'
|
|
6
|
+
import {
|
|
7
|
+
currentLanguageSelector,
|
|
8
|
+
otaTranslationsAppVersionSelector,
|
|
9
|
+
otaTranslationsLanguageSelector,
|
|
10
|
+
otaTranslationsLastUpdateSelector,
|
|
11
|
+
} from 'src/i18n/selectors'
|
|
12
|
+
import { otaTranslationsUpdated, setLanguage } from 'src/i18n/slice'
|
|
13
|
+
import Logger from 'src/utils/Logger'
|
|
14
|
+
import { safely } from 'src/utils/safely'
|
|
15
|
+
import { call, put, select, spawn, takeLatest } from 'typed-redux-saga'
|
|
16
|
+
|
|
17
|
+
const TAG = 'i18n/saga'
|
|
18
|
+
|
|
19
|
+
export function* handleFetchOtaTranslations() {
|
|
20
|
+
const appConfig = yield* call(getAppConfig)
|
|
21
|
+
const otaTranslationsConfig = appConfig.experimental?.otaTranslations
|
|
22
|
+
if (otaTranslationsConfig === undefined) {
|
|
23
|
+
Logger.debug(`${TAG}@handleFetchOtaTranslations`, 'OTA translations disabled')
|
|
24
|
+
return
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
try {
|
|
28
|
+
const currentLanguage = yield* select(currentLanguageSelector)
|
|
29
|
+
if (!currentLanguage) {
|
|
30
|
+
// this is true on first app install if the language cannot be
|
|
31
|
+
// automatically detected, we should not proceed without a language
|
|
32
|
+
return
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const otaClient = new OtaClient(otaTranslationsConfig.crowdinDistributionHash)
|
|
36
|
+
const crowdinContent = yield* call([otaClient, otaClient.getContent])
|
|
37
|
+
|
|
38
|
+
// note that the Crowdin language codes are different from the app
|
|
39
|
+
// language codes so we need to map them. unfortunately the mapping is not
|
|
40
|
+
// publically exposed so it is a little cumbersome, and we derive it from
|
|
41
|
+
// getContent
|
|
42
|
+
const translationPathRegex = new RegExp(`main/locales/${currentLanguage}/translation\\.json`)
|
|
43
|
+
const crowdinLanguageCode = Object.entries(crowdinContent).find(([_, paths]) =>
|
|
44
|
+
paths.some((path) => translationPathRegex.test(path))
|
|
45
|
+
)?.[0]
|
|
46
|
+
|
|
47
|
+
if (!crowdinLanguageCode) {
|
|
48
|
+
Logger.error(
|
|
49
|
+
`${TAG}@handleFetchOtaTranslations`,
|
|
50
|
+
`Failed to find Crowdin language code for app language ${currentLanguage}`
|
|
51
|
+
)
|
|
52
|
+
return
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const lastFetchLanguage = yield* select(otaTranslationsLanguageSelector)
|
|
56
|
+
const lastFetchTime = yield* select(otaTranslationsLastUpdateSelector)
|
|
57
|
+
const timestamp = yield* call([otaClient, otaClient.getManifestTimestamp])
|
|
58
|
+
const lastFetchAppVersion = yield* select(otaTranslationsAppVersionSelector)
|
|
59
|
+
|
|
60
|
+
if (
|
|
61
|
+
lastFetchLanguage !== currentLanguage ||
|
|
62
|
+
lastFetchTime !== timestamp ||
|
|
63
|
+
DeviceInfo.getVersion() !== lastFetchAppVersion
|
|
64
|
+
) {
|
|
65
|
+
const translations = yield* call(
|
|
66
|
+
[otaClient, otaClient.getStringsByLocale],
|
|
67
|
+
crowdinLanguageCode
|
|
68
|
+
)
|
|
69
|
+
i18n.addResourceBundle(currentLanguage, 'translation', translations, true, true)
|
|
70
|
+
|
|
71
|
+
yield* call(saveOtaTranslations, { [currentLanguage]: translations })
|
|
72
|
+
yield* put(
|
|
73
|
+
otaTranslationsUpdated({
|
|
74
|
+
otaTranslationsLastUpdate: timestamp,
|
|
75
|
+
otaTranslationsAppVersion: DeviceInfo.getVersion(),
|
|
76
|
+
otaTranslationsLanguage: currentLanguage,
|
|
77
|
+
})
|
|
78
|
+
)
|
|
79
|
+
}
|
|
80
|
+
} catch (error) {
|
|
81
|
+
Logger.error(`${TAG}@handleFetchOtaTranslations`, 'Failed to fetch OTA translations', error)
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export function* watchOtaTranslations() {
|
|
86
|
+
yield* takeLatest([setLanguage.type], safely(handleFetchOtaTranslations))
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export function* i18nSaga() {
|
|
90
|
+
yield* spawn(handleFetchOtaTranslations)
|
|
91
|
+
yield* spawn(watchOtaTranslations)
|
|
92
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { RootState } from 'src/redux/reducers'
|
|
2
|
+
|
|
3
|
+
export const currentLanguageSelector = (state: RootState) => state.i18n.language
|
|
4
|
+
|
|
5
|
+
export const otaTranslationsLastUpdateSelector = (state: RootState) =>
|
|
6
|
+
state.i18n.otaTranslationsLastUpdate
|
|
7
|
+
|
|
8
|
+
export const otaTranslationsAppVersionSelector = (state: RootState) =>
|
|
9
|
+
state.i18n.otaTranslationsAppVersion
|
|
10
|
+
|
|
11
|
+
export const otaTranslationsLanguageSelector = (state: RootState) =>
|
|
12
|
+
state.i18n.otaTranslationsLanguage
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { createSlice, PayloadAction } from '@reduxjs/toolkit'
|
|
2
|
+
import { getRehydratePayload, REHYDRATE, RehydrateAction } from 'src/redux/persist-helper'
|
|
3
|
+
|
|
4
|
+
interface State {
|
|
5
|
+
language: string | null
|
|
6
|
+
otaTranslationsLastUpdate: number
|
|
7
|
+
otaTranslationsAppVersion: string
|
|
8
|
+
otaTranslationsLanguage: string
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const initialState: State = {
|
|
12
|
+
language: null,
|
|
13
|
+
otaTranslationsLastUpdate: 0,
|
|
14
|
+
otaTranslationsAppVersion: '0',
|
|
15
|
+
otaTranslationsLanguage: '',
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
interface OtaTranslationsUpdatedAction {
|
|
19
|
+
otaTranslationsLastUpdate: number
|
|
20
|
+
otaTranslationsAppVersion: string
|
|
21
|
+
otaTranslationsLanguage: string
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export const slice = createSlice({
|
|
25
|
+
name: 'i18n',
|
|
26
|
+
initialState,
|
|
27
|
+
reducers: {
|
|
28
|
+
otaTranslationsUpdated: (state, action: PayloadAction<OtaTranslationsUpdatedAction>) => ({
|
|
29
|
+
...state,
|
|
30
|
+
...action.payload,
|
|
31
|
+
}),
|
|
32
|
+
setLanguage: (state, action: PayloadAction<State['language']>) => {
|
|
33
|
+
state.language = action.payload
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
extraReducers: (builder) => {
|
|
37
|
+
builder.addCase(REHYDRATE, (state, action: RehydrateAction) => ({
|
|
38
|
+
...state,
|
|
39
|
+
...getRehydratePayload(action, 'i18n'),
|
|
40
|
+
}))
|
|
41
|
+
},
|
|
42
|
+
})
|
|
43
|
+
|
|
44
|
+
export const { otaTranslationsUpdated, setLanguage } = slice.actions
|
|
45
|
+
|
|
46
|
+
export default slice.reducer
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { renderHook } from '@testing-library/react-native'
|
|
2
|
+
import React from 'react'
|
|
3
|
+
import { Provider } from 'react-redux'
|
|
4
|
+
import i18n from 'src/i18n'
|
|
5
|
+
import * as I18nSlice from 'src/i18n/slice'
|
|
6
|
+
import useChangeLanguage from 'src/i18n/useChangeLanguage'
|
|
7
|
+
import Logger from 'src/utils/Logger'
|
|
8
|
+
import { createMockStore } from 'test/utils'
|
|
9
|
+
|
|
10
|
+
jest.mock('src/i18n')
|
|
11
|
+
|
|
12
|
+
const mockedI18n = jest.mocked(i18n)
|
|
13
|
+
|
|
14
|
+
const setLanguageSpy = jest.spyOn(I18nSlice, 'setLanguage')
|
|
15
|
+
const loggerErrorSpy = jest.spyOn(Logger, 'error')
|
|
16
|
+
|
|
17
|
+
const renderHookWithProvider = () => {
|
|
18
|
+
const store = createMockStore()
|
|
19
|
+
return renderHook(() => useChangeLanguage(), {
|
|
20
|
+
wrapper: (component) => (
|
|
21
|
+
<Provider store={store}>{component?.children ? component.children : component}</Provider>
|
|
22
|
+
),
|
|
23
|
+
})
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
describe('useChangeLanguage', () => {
|
|
27
|
+
afterEach(() => {
|
|
28
|
+
jest.clearAllMocks()
|
|
29
|
+
})
|
|
30
|
+
|
|
31
|
+
it('should handle changing language', async () => {
|
|
32
|
+
const changeLanguageSpy = jest.fn().mockResolvedValue(true)
|
|
33
|
+
mockedI18n.changeLanguage.mockImplementationOnce(changeLanguageSpy)
|
|
34
|
+
|
|
35
|
+
const { result } = renderHookWithProvider()
|
|
36
|
+
await result.current('pt-BR')
|
|
37
|
+
|
|
38
|
+
expect(setLanguageSpy).toHaveBeenCalledWith('pt-BR')
|
|
39
|
+
expect(changeLanguageSpy).toHaveBeenCalledWith('pt-BR')
|
|
40
|
+
})
|
|
41
|
+
|
|
42
|
+
it('should handle error when changing language', async () => {
|
|
43
|
+
const changeLanguageSpy = jest.fn().mockRejectedValue(true)
|
|
44
|
+
mockedI18n.changeLanguage.mockImplementationOnce(changeLanguageSpy)
|
|
45
|
+
|
|
46
|
+
const { result } = renderHookWithProvider()
|
|
47
|
+
await result.current('pt-BR')
|
|
48
|
+
|
|
49
|
+
expect(setLanguageSpy).toHaveBeenCalledWith('pt-BR')
|
|
50
|
+
expect(changeLanguageSpy).toHaveBeenCalledWith('pt-BR')
|
|
51
|
+
expect(loggerErrorSpy).toHaveBeenCalledTimes(1)
|
|
52
|
+
})
|
|
53
|
+
})
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import i18n from 'src/i18n'
|
|
2
|
+
import { setLanguage } from 'src/i18n/slice'
|
|
3
|
+
import { useDispatch } from 'src/redux/hooks'
|
|
4
|
+
import Logger from 'src/utils/Logger'
|
|
5
|
+
|
|
6
|
+
const TAG = 'i18n/actions'
|
|
7
|
+
|
|
8
|
+
export default function useChangeLanguage() {
|
|
9
|
+
const dispatch = useDispatch()
|
|
10
|
+
|
|
11
|
+
const handleChangeLanguage = async (language: string | null) => {
|
|
12
|
+
dispatch(setLanguage(language))
|
|
13
|
+
return i18n
|
|
14
|
+
.changeLanguage(language || '')
|
|
15
|
+
.catch((reason: any) => Logger.error(TAG, 'Failed to change i18n language', reason))
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
return handleChangeLanguage
|
|
19
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as React from 'react'
|
|
2
|
+
import colors, { ColorValue } from 'src/styles/colors'
|
|
3
|
+
import Svg, { Path } from 'svgs'
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
size?: number
|
|
7
|
+
color?: ColorValue
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
function Activity({ color = colors.contentPrimary, size = 24 }: Props) {
|
|
11
|
+
return (
|
|
12
|
+
<Svg width={size} height={size} fill="none" viewBox="0 0 24 24">
|
|
13
|
+
<Path
|
|
14
|
+
fill={color}
|
|
15
|
+
d="M8 17a.968.968 0 0 0 .713-.288A.964.964 0 0 0 9 16a.968.968 0 0 0-.288-.713A.964.964 0 0 0 8 15a.968.968 0 0 0-.713.288A.964.964 0 0 0 7 16c0 .283.096.521.288.713.192.192.43.288.712.287Zm0-4a.968.968 0 0 0 .713-.288A.964.964 0 0 0 9 12a.968.968 0 0 0-.288-.713A.964.964 0 0 0 8 11a.968.968 0 0 0-.713.288A.964.964 0 0 0 7 12c0 .283.096.521.288.713.192.192.43.288.712.287Zm0-4a.968.968 0 0 0 .713-.288A.964.964 0 0 0 9 8a.968.968 0 0 0-.288-.713A.964.964 0 0 0 8 7a.968.968 0 0 0-.713.288A.964.964 0 0 0 7 8c0 .283.096.521.288.713.192.192.43.288.712.287Zm3 8h6v-2h-6v2Zm0-4h6v-2h-6v2Zm0-4h6V7h-6v2ZM5 21c-.55 0-1.021-.196-1.413-.588A1.922 1.922 0 0 1 3 19V5c0-.55.196-1.021.588-1.413A1.922 1.922 0 0 1 5 3h14c.55 0 1.021.196 1.413.588.392.392.588.863.587 1.412v14c0 .55-.196 1.021-.588 1.413A1.922 1.922 0 0 1 19 21H5Zm0-2h14V5H5v14Z"
|
|
16
|
+
/>
|
|
17
|
+
</Svg>
|
|
18
|
+
)
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export default React.memo(Activity)
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from 'react'
|
|
2
|
+
import Svg, { Path } from 'react-native-svg'
|
|
3
|
+
import Colors from 'src/styles/colors'
|
|
4
|
+
|
|
5
|
+
const AppleIcon = ({ color = Colors.contentPrimary }) => (
|
|
6
|
+
<Svg width={32} height={32} viewBox="0 0 32 32" fill="none">
|
|
7
|
+
<Path
|
|
8
|
+
fill={color}
|
|
9
|
+
d="M22.442 24.531c-1.12 1.055-2.343.889-3.52.389-1.246-.511-2.388-.534-3.703 0-1.645.689-2.514.489-3.497-.389-5.577-5.588-4.754-14.098 1.577-14.41 1.543.078 2.617.823 3.52.89 1.349-.267 2.64-1.034 4.08-.934 1.726.133 3.029.8 3.886 2-3.566 2.078-2.72 6.644.548 7.921-.651 1.667-1.497 3.322-2.902 4.544l.011-.011Zm-5.737-14.476c-.171-2.477 1.897-4.522 4.274-4.722.332 2.867-2.674 5-4.274 4.722Z"
|
|
10
|
+
/>
|
|
11
|
+
</Svg>
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
export default AppleIcon
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from 'react'
|
|
2
|
+
import Svg, { Path } from 'react-native-svg'
|
|
3
|
+
import Colors, { ColorValue } from 'src/styles/colors'
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
color?: ColorValue
|
|
7
|
+
size?: number
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const ArrowDown = ({ color = Colors.contentPrimary, size = 24 }: Props) => (
|
|
11
|
+
<Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
12
|
+
<Path
|
|
13
|
+
d="M11.053 4.5L12.947 4.5L12.947 15.8636L18.1553 10.6553L19.5 12L12 19.5L4.5 12L5.8447 10.6553L11.053 15.8636L11.053 4.5Z"
|
|
14
|
+
fill={color}
|
|
15
|
+
/>
|
|
16
|
+
</Svg>
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
export default React.memo(ArrowDown)
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from 'react'
|
|
2
|
+
import Svg, { Path } from 'react-native-svg'
|
|
3
|
+
import colors, { ColorValue } from 'src/styles/colors'
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
color?: ColorValue
|
|
7
|
+
size?: number
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const ArrowRightThick = ({ color = colors.contentPrimary, size = 24 }: Props) => (
|
|
11
|
+
<Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
12
|
+
<Path d="M14 18L12.6 16.55L16.15 13H4V11H16.15L12.6 7.45L14 6L20 12L14 18Z" fill={color} />
|
|
13
|
+
</Svg>
|
|
14
|
+
)
|
|
15
|
+
|
|
16
|
+
export default React.memo(ArrowRightThick)
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as React from 'react'
|
|
2
|
+
import Svg, { Path } from 'react-native-svg'
|
|
3
|
+
import Colors, { ColorValue } from 'src/styles/colors'
|
|
4
|
+
|
|
5
|
+
const AttentionIcon = ({
|
|
6
|
+
color = Colors.warningPrimary,
|
|
7
|
+
size = 16,
|
|
8
|
+
testId,
|
|
9
|
+
}: {
|
|
10
|
+
color?: ColorValue
|
|
11
|
+
size?: number
|
|
12
|
+
testId?: string
|
|
13
|
+
}) => (
|
|
14
|
+
<Svg width={size} height={size} fill="none" testID={testId} viewBox="0 0 16 16">
|
|
15
|
+
<Path
|
|
16
|
+
d="M7.2 10.4h1.6V12H7.2v-1.6Zm0-6.4h1.6v4.8H7.2V4Zm.792-4C3.576 0 0 3.584 0 8s3.576 8 7.992 8C12.416 16 16 12.416 16 8s-3.584-8-8.008-8ZM8 14.4A6.398 6.398 0 0 1 1.6 8c0-3.536 2.864-6.4 6.4-6.4 3.536 0 6.4 2.864 6.4 6.4 0 3.536-2.864 6.4-6.4 6.4Z"
|
|
17
|
+
fill={color}
|
|
18
|
+
/>
|
|
19
|
+
</Svg>
|
|
20
|
+
)
|
|
21
|
+
|
|
22
|
+
export default AttentionIcon
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as React from 'react'
|
|
2
|
+
import { ColorValue } from 'react-native'
|
|
3
|
+
import Svg, { Path } from 'react-native-svg'
|
|
4
|
+
import Colors from 'src/styles/colors'
|
|
5
|
+
|
|
6
|
+
export interface Props {
|
|
7
|
+
height?: number
|
|
8
|
+
color?: ColorValue
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
function BackChevron({ color = Colors.contentPrimary, height = 16 }: Props) {
|
|
12
|
+
return (
|
|
13
|
+
<Svg height={height} width={height / 2} viewBox="0 0 8 16" fill="none" testID="BackChevron">
|
|
14
|
+
<Path
|
|
15
|
+
fillRule="evenodd"
|
|
16
|
+
clipRule="evenodd"
|
|
17
|
+
d="M7.707 13.707a1 1 0 0 1-1.414 0l-6-6a1 1 0 0 1 0-1.414l6-6a1 1 0 0 1 1.414 1.414L2.414 7l5.293 5.293a1 1 0 0 1 0 1.414Z"
|
|
18
|
+
fill={color}
|
|
19
|
+
/>
|
|
20
|
+
</Svg>
|
|
21
|
+
)
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export default BackChevron
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as React from 'react'
|
|
2
|
+
import colors from 'src/styles/colors'
|
|
3
|
+
import Svg, { Path } from 'svgs'
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
height?: number
|
|
7
|
+
width?: number
|
|
8
|
+
color?: string
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export default class Backspace extends React.PureComponent<Props> {
|
|
12
|
+
render() {
|
|
13
|
+
const { height = 30, width = 30, color = colors.contentPrimary } = this.props
|
|
14
|
+
return (
|
|
15
|
+
<Svg
|
|
16
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
17
|
+
height={height}
|
|
18
|
+
width={width}
|
|
19
|
+
viewBox="0 0 35 18"
|
|
20
|
+
fill="none"
|
|
21
|
+
>
|
|
22
|
+
<Path
|
|
23
|
+
d="M1.82198 9.7422L9.57436 16.7422C9.75813 16.9081 9.99693 17 10.2445 17H33C33.5523 17 34 16.5523 34 16V2C34 1.44772 33.5523 1 33 1H10.2445C9.99693 1 9.75813 1.09186 9.57436 1.25779L1.82198 8.25779C1.38221 8.65488 1.38221 9.34512 1.82198 9.7422Z"
|
|
24
|
+
stroke={color}
|
|
25
|
+
strokeWidth="3"
|
|
26
|
+
/>
|
|
27
|
+
<Path d="M17 5L25 13M17 13L25 5" stroke={color} strokeWidth="3" />
|
|
28
|
+
</Svg>
|
|
29
|
+
)
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as React from 'react'
|
|
2
|
+
import colors from 'src/styles/colors'
|
|
3
|
+
import Svg, { Path } from 'svgs'
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
height?: number
|
|
7
|
+
width?: number
|
|
8
|
+
color?: string
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export default class BankIcon extends React.PureComponent<Props> {
|
|
12
|
+
render() {
|
|
13
|
+
const { height = 32, width = 32, color = colors.accent } = this.props
|
|
14
|
+
return (
|
|
15
|
+
<Svg width={width} height={height} viewBox="0 0 24 24" fill="none">
|
|
16
|
+
<Path
|
|
17
|
+
d="M11.2852 0.594128C11.0584 0.424838 10.783 0.333374 10.5 0.333374C10.217 0.333374 9.9416 0.424838 9.71483 0.594128L0.414167 7.53696C-0.373333 8.12438 0.0425834 9.37563 1.02433 9.37563H19.9763C20.9586 9.37563 21.3739 8.12438 20.587 7.53696L11.2852 0.594128ZM10.5 6.16788C10.1906 6.16788 9.89384 6.04496 9.67504 5.82617C9.45625 5.60738 9.33333 5.31063 9.33333 5.00121C9.33333 4.69179 9.45625 4.39505 9.67504 4.17625C9.89384 3.95746 10.1906 3.83454 10.5 3.83454C10.8094 3.83454 11.1062 3.95746 11.325 4.17625C11.5438 4.39505 11.6667 4.69179 11.6667 5.00121C11.6667 5.31063 11.5438 5.60738 11.325 5.82617C11.1062 6.04496 10.8094 6.16788 10.5 6.16788ZM0 20.3125C0 18.6209 1.37083 17.25 3.0625 17.25H9.9995C9.56118 18.0026 9.33124 18.8583 9.33333 19.7292C9.33333 20.5167 9.51708 21.2605 9.842 21.9167H0.729167C0.326667 21.9167 0 21.59 0 21.1875V20.3125ZM11.6667 15.5607C12.3718 15.1389 13.1783 14.9166 14 14.9173V10.5423H11.6667V15.5607ZM16.3333 14.9173H18.6667V10.5423H16.3333V14.9173ZM4.66667 16.084H2.33333V10.5423H4.66667V16.084ZM7 10.5423V16.084H9.33333V10.5423H7ZM14.1458 16.084C13.6632 16.0779 13.1842 16.1676 12.7365 16.3481C12.2889 16.5286 11.8815 16.7961 11.5381 17.1353C11.1946 17.4744 10.922 17.8783 10.7358 18.3237C10.5497 18.769 10.4539 19.2468 10.4539 19.7295C10.4539 20.2122 10.5497 20.69 10.7358 21.1353C10.922 21.5807 11.1946 21.9846 11.5381 22.3237C11.8815 22.6629 12.2889 22.9304 12.7365 23.1109C13.1842 23.2914 13.6632 23.3811 14.1458 23.375H15.0208C15.2142 23.375 15.3997 23.2982 15.5364 23.1615C15.6732 23.0247 15.75 22.8393 15.75 22.6459C15.75 22.4525 15.6732 22.267 15.5364 22.1303C15.3997 21.9935 15.2142 21.9167 15.0208 21.9167H14.1458C13.5657 21.9167 13.0093 21.6862 12.599 21.276C12.1888 20.8658 11.9583 20.3094 11.9583 19.7292C11.9583 19.149 12.1888 18.5926 12.599 18.1824C13.0093 17.7722 13.5657 17.5417 14.1458 17.5417H15.0208C15.2142 17.5417 15.3997 17.4649 15.5364 17.3281C15.6732 17.1914 15.75 17.0059 15.75 16.8125C15.75 16.6192 15.6732 16.4337 15.5364 16.2969C15.3997 16.1602 15.2142 16.0834 15.0208 16.0834H14.1458V16.084ZM19.6875 16.084C20.1701 16.0779 20.6491 16.1676 21.0968 16.3481C21.5444 16.5286 21.9518 16.7961 22.2953 17.1353C22.6387 17.4744 22.9114 17.8783 23.0975 18.3237C23.2836 18.769 23.3795 19.2468 23.3795 19.7295C23.3795 20.2122 23.2836 20.69 23.0975 21.1353C22.9114 21.5807 22.6387 21.9846 22.2953 22.3237C21.9518 22.6629 21.5444 22.9304 21.0968 23.1109C20.6491 23.2914 20.1701 23.3811 19.6875 23.375H18.8125C18.6191 23.375 18.4336 23.2982 18.2969 23.1615C18.1602 23.0247 18.0833 22.8393 18.0833 22.6459C18.0833 22.4525 18.1602 22.267 18.2969 22.1303C18.4336 21.9935 18.6191 21.9167 18.8125 21.9167H19.6875C20.2677 21.9167 20.8241 21.6862 21.2343 21.276C21.6445 20.8658 21.875 20.3094 21.875 19.7292C21.875 19.149 21.6445 18.5926 21.2343 18.1824C20.8241 17.7722 20.2677 17.5417 19.6875 17.5417H18.8125C18.6191 17.5417 18.4336 17.4649 18.2969 17.3281C18.1602 17.1914 18.0833 17.0059 18.0833 16.8125C18.0833 16.6192 18.1602 16.4337 18.2969 16.2969C18.4336 16.1602 18.6191 16.0834 18.8125 16.0834H19.6875V16.084ZM13.4167 19.7292C13.4167 19.3261 13.7433 19 14.1458 19H19.6875C19.8809 19 20.0664 19.0769 20.2031 19.2136C20.3398 19.3504 20.4167 19.5358 20.4167 19.7292C20.4167 19.9226 20.3398 20.1081 20.2031 20.2448C20.0664 20.3816 19.8809 20.4584 19.6875 20.4584H14.1458C13.7433 20.4584 13.4167 20.1317 13.4167 19.7292Z"
|
|
18
|
+
fill={color}
|
|
19
|
+
/>
|
|
20
|
+
</Svg>
|
|
21
|
+
)
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from 'react'
|
|
2
|
+
import Colors from 'src/styles/colors'
|
|
3
|
+
import Svg, { Path } from 'svgs'
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
size?: number
|
|
7
|
+
color?: string
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const Celebration = ({ size = 24, color = Colors.contentPrimary }: Props) => (
|
|
11
|
+
<Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
12
|
+
<Path
|
|
13
|
+
fill={color}
|
|
14
|
+
d="M2 22 7 8l9 9-14 5Zm3.3-3.3 7.05-2.5-4.55-4.55-2.5 7.05Zm9.25-6.15L13.5 11.5l5.6-5.6a2.624 2.624 0 0 1 1.925-.8c.75 0 1.392.267 1.925.8l.6.6-1.05 1.05-.6-.6a1.187 1.187 0 0 0-.875-.35c-.35 0-.642.117-.875.35l-5.6 5.6Zm-4-4L9.5 7.5l.6-.6c.233-.233.35-.517.35-.85 0-.333-.117-.617-.35-.85l-.65-.65L10.5 3.5l.65.65c.533.533.8 1.167.8 1.9 0 .733-.267 1.367-.8 1.9l-.6.6Zm2 2L11.5 9.5l3.6-3.6c.233-.233.35-.525.35-.875s-.117-.642-.35-.875l-1.6-1.6 1.05-1.05 1.6 1.6c.533.533.8 1.175.8 1.925s-.267 1.392-.8 1.925l-3.6 3.6Zm4 4L15.5 13.5l1.6-1.6a2.624 2.624 0 0 1 1.925-.8c.75 0 1.392.267 1.925.8l1.6 1.6-1.05 1.05-1.6-1.6a1.187 1.187 0 0 0-.875-.35c-.35 0-.642.117-.875.35l-1.6 1.6Z"
|
|
15
|
+
/>
|
|
16
|
+
</Svg>
|
|
17
|
+
)
|
|
18
|
+
export default Celebration
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import Colors from 'src/styles/colors'
|
|
3
|
+
import Svg, { Path } from 'svgs'
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
size?: number
|
|
7
|
+
color?: string
|
|
8
|
+
testID?: string
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const CheckCircle = ({ size = 24, color = Colors.contentPrimary, testID }: Props) => (
|
|
12
|
+
<Svg width={size} height={size} viewBox="0 0 24 24" fill="none" testID={testID}>
|
|
13
|
+
<Path
|
|
14
|
+
fill={color}
|
|
15
|
+
d="m10.6 13.8-2.15-2.15a.948.948 0 0 0-.7-.275.948.948 0 0 0-.7.275.948.948 0 0 0-.275.7c0 .283.092.517.275.7L9.9 15.9c.2.2.433.3.7.3.267 0 .5-.1.7-.3l5.65-5.65a.948.948 0 0 0 .275-.7.948.948 0 0 0-.275-.7.948.948 0 0 0-.7-.275.948.948 0 0 0-.7.275L10.6 13.8ZM12 22a9.738 9.738 0 0 1-3.9-.788 10.099 10.099 0 0 1-3.175-2.137c-.9-.9-1.612-1.958-2.137-3.175A9.738 9.738 0 0 1 2 12c0-1.383.263-2.683.788-3.9a10.099 10.099 0 0 1 2.137-3.175c.9-.9 1.958-1.612 3.175-2.137A9.738 9.738 0 0 1 12 2c1.383 0 2.683.263 3.9.788a10.098 10.098 0 0 1 3.175 2.137c.9.9 1.613 1.958 2.137 3.175A9.738 9.738 0 0 1 22 12a9.738 9.738 0 0 1-.788 3.9 10.098 10.098 0 0 1-2.137 3.175c-.9.9-1.958 1.613-3.175 2.137A9.738 9.738 0 0 1 12 22Zm0-2c2.233 0 4.125-.775 5.675-2.325C19.225 16.125 20 14.233 20 12c0-2.233-.775-4.125-2.325-5.675C16.125 4.775 14.233 4 12 4c-2.233 0-4.125.775-5.675 2.325C4.775 7.875 4 9.767 4 12c0 2.233.775 4.125 2.325 5.675C7.875 19.225 9.767 20 12 20Z"
|
|
16
|
+
/>
|
|
17
|
+
</Svg>
|
|
18
|
+
)
|
|
19
|
+
export default CheckCircle
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as React from 'react'
|
|
2
|
+
import colors from 'src/styles/colors'
|
|
3
|
+
import Svg, { Path } from 'svgs'
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
height?: number
|
|
7
|
+
width?: number
|
|
8
|
+
color?: string
|
|
9
|
+
stroke?: boolean
|
|
10
|
+
testID?: string
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export default class Checkmark extends React.PureComponent<Props> {
|
|
14
|
+
render() {
|
|
15
|
+
const { height = 32, width = 32, color = colors.accent, stroke = false, testID } = this.props
|
|
16
|
+
return (
|
|
17
|
+
<Svg width={width} height={height} viewBox="0 0 24 24" fill="none" testID={testID}>
|
|
18
|
+
<Path
|
|
19
|
+
d="M20.5 7.33 9.186 18.643 4 13.458l1.33-1.33 3.856 3.847L19.17 6 20.5 7.33Z"
|
|
20
|
+
fill={color}
|
|
21
|
+
stroke={stroke ? color : undefined}
|
|
22
|
+
/>
|
|
23
|
+
</Svg>
|
|
24
|
+
)
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import * as React from 'react'
|
|
2
|
+
import { StyleSheet, View, ViewStyle } from 'react-native'
|
|
3
|
+
import Svg, { Path } from 'react-native-svg'
|
|
4
|
+
import colors from 'src/styles/colors'
|
|
5
|
+
import globalStyles from 'src/styles/styles'
|
|
6
|
+
|
|
7
|
+
const SIZE = 24
|
|
8
|
+
|
|
9
|
+
interface Props {
|
|
10
|
+
style?: ViewStyle
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export default function CircleArrowIcon({ style }: Props) {
|
|
14
|
+
return (
|
|
15
|
+
<View style={[styles.container, style]}>
|
|
16
|
+
<Svg width={13} height={9} viewBox="0 0 13 9" fill="none">
|
|
17
|
+
<Path
|
|
18
|
+
d="M1 4.5h11m0 0L8.264 1M12 4.5L8.264 8"
|
|
19
|
+
stroke={colors.contentPrimary}
|
|
20
|
+
strokeWidth={1.5}
|
|
21
|
+
strokeLinecap="round"
|
|
22
|
+
strokeLinejoin="round"
|
|
23
|
+
/>
|
|
24
|
+
</Svg>
|
|
25
|
+
</View>
|
|
26
|
+
)
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const styles = StyleSheet.create({
|
|
30
|
+
container: {
|
|
31
|
+
...globalStyles.softShadowLight,
|
|
32
|
+
backgroundColor: colors.backgroundPrimary,
|
|
33
|
+
width: SIZE,
|
|
34
|
+
height: SIZE,
|
|
35
|
+
borderRadius: SIZE / 2,
|
|
36
|
+
alignItems: 'center',
|
|
37
|
+
justifyContent: 'center',
|
|
38
|
+
},
|
|
39
|
+
})
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import * as React from 'react'
|
|
2
|
+
import { StyleProp, StyleSheet, View, ViewStyle } from 'react-native'
|
|
3
|
+
import colors, { ColorValue } from 'src/styles/colors'
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
backgroundColor?: ColorValue
|
|
7
|
+
radius?: number
|
|
8
|
+
style?: StyleProp<ViewStyle>
|
|
9
|
+
children?: React.ReactNode
|
|
10
|
+
borderColor?: ColorValue
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export default function CircledIcon({
|
|
14
|
+
backgroundColor = colors.accent,
|
|
15
|
+
radius = 50,
|
|
16
|
+
borderColor,
|
|
17
|
+
style,
|
|
18
|
+
children,
|
|
19
|
+
}: Props) {
|
|
20
|
+
return (
|
|
21
|
+
<View
|
|
22
|
+
style={[
|
|
23
|
+
{
|
|
24
|
+
backgroundColor,
|
|
25
|
+
height: radius,
|
|
26
|
+
width: radius,
|
|
27
|
+
borderRadius: radius,
|
|
28
|
+
},
|
|
29
|
+
borderColor && {
|
|
30
|
+
borderColor,
|
|
31
|
+
borderWidth: 1,
|
|
32
|
+
},
|
|
33
|
+
styles.container,
|
|
34
|
+
style,
|
|
35
|
+
]}
|
|
36
|
+
>
|
|
37
|
+
{children}
|
|
38
|
+
</View>
|
|
39
|
+
)
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const styles = StyleSheet.create({
|
|
43
|
+
container: {
|
|
44
|
+
justifyContent: 'center',
|
|
45
|
+
alignItems: 'center',
|
|
46
|
+
},
|
|
47
|
+
})
|