diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml
index 76f72d1c99..1d82e5d720 100644
--- a/.github/workflows/nightly.yml
+++ b/.github/workflows/nightly.yml
@@ -87,9 +87,7 @@ jobs:
yarn install
cd apps/wallet-mobile
yarn install
- cd ios
- pod install
- cd ..
+ npx pod-install --yes
yarn workspaces run build
- name: Copy Apple Signing Key
run: |
diff --git a/apps/wallet-mobile/.env b/apps/wallet-mobile/.env
index 9fe20e2b3c..1ac5746e88 100644
--- a/apps/wallet-mobile/.env
+++ b/apps/wallet-mobile/.env
@@ -16,4 +16,6 @@ WALLET_2_MNEMONIC=abandon abandon abandon abandon abandon abandon abandon abando
BANXA_TEST_WALLET=addr1qyfuspldlchc5kechfe5jzdrr9jms2s9w0tq4hggy9zgkhxssydveuc8xyx4zh27fwcmr62mraeezjwf24hzkyejwfmq7yptmd
FRONTEND_FEE_ADDRESS_MAINNET=addr1q9ry6jfdgm0lcrtfpgwrgxg7qfahv80jlghhrthy6w8hmyjuw9ngccy937pm7yw0jjnxasm7hzxjrf8rzkqcj26788lqws5fke
-FRONTEND_FEE_ADDRESS_PREPROD=addr_test1qrgpjmyy8zk9nuza24a0f4e7mgp9gd6h3uayp0rqnjnkl54v4dlyj0kwfs0x4e38a7047lymzp37tx0y42glslcdtzhqzp57km
\ No newline at end of file
+FRONTEND_FEE_ADDRESS_PREPROD=addr_test1qrgpjmyy8zk9nuza24a0f4e7mgp9gd6h3uayp0rqnjnkl54v4dlyj0kwfs0x4e38a7047lymzp37tx0y42glslcdtzhqzp57km
+
+UNSTOPPABLE_API_KEY=czsajliz-wxgu6tujd1zqq7hey_pclfqhdjsqolsxjfsurgh
diff --git a/apps/wallet-mobile/.env.nightly b/apps/wallet-mobile/.env.nightly
index f01172cf46..cb7d421413 100644
--- a/apps/wallet-mobile/.env.nightly
+++ b/apps/wallet-mobile/.env.nightly
@@ -7,4 +7,6 @@ DISABLE_LOGBOX=true
BANXA_TEST_WALLET=addr1qyfuspldlchc5kechfe5jzdrr9jms2s9w0tq4hggy9zgkhxssydveuc8xyx4zh27fwcmr62mraeezjwf24hzkyejwfmq7yptmd
FRONTEND_FEE_ADDRESS_MAINNET=addr1q9ry6jfdgm0lcrtfpgwrgxg7qfahv80jlghhrthy6w8hmyjuw9ngccy937pm7yw0jjnxasm7hzxjrf8rzkqcj26788lqws5fke
-FRONTEND_FEE_ADDRESS_PREPROD=addr_test1qrgpjmyy8zk9nuza24a0f4e7mgp9gd6h3uayp0rqnjnkl54v4dlyj0kwfs0x4e38a7047lymzp37tx0y42glslcdtzhqzp57km
\ No newline at end of file
+FRONTEND_FEE_ADDRESS_PREPROD=addr_test1qrgpjmyy8zk9nuza24a0f4e7mgp9gd6h3uayp0rqnjnkl54v4dlyj0kwfs0x4e38a7047lymzp37tx0y42glslcdtzhqzp57km
+
+UNSTOPPABLE_API_KEY=czsajliz-wxgu6tujd1zqq7hey_pclfqhdjsqolsxjfsurgh
diff --git a/apps/wallet-mobile/.env.production b/apps/wallet-mobile/.env.production
index 729f3ffb33..2300c957cc 100644
--- a/apps/wallet-mobile/.env.production
+++ b/apps/wallet-mobile/.env.production
@@ -4,4 +4,6 @@ BUILD_VARIANT=PROD
SENTRY_DSN=https://7f7c6cb60a6f429facd34f491dfc5133@o1138840.ingest.sentry.io/6783228
FRONTEND_FEE_ADDRESS_MAINNET=addr1q9ry6jfdgm0lcrtfpgwrgxg7qfahv80jlghhrthy6w8hmyjuw9ngccy937pm7yw0jjnxasm7hzxjrf8rzkqcj26788lqws5fke
-FRONTEND_FEE_ADDRESS_PREPROD=addr_test1qrgpjmyy8zk9nuza24a0f4e7mgp9gd6h3uayp0rqnjnkl54v4dlyj0kwfs0x4e38a7047lymzp37tx0y42glslcdtzhqzp57km
\ No newline at end of file
+FRONTEND_FEE_ADDRESS_PREPROD=addr_test1qrgpjmyy8zk9nuza24a0f4e7mgp9gd6h3uayp0rqnjnkl54v4dlyj0kwfs0x4e38a7047lymzp37tx0y42glslcdtzhqzp57km
+
+UNSTOPPABLE_API_KEY=czsajliz-wxgu6tujd1zqq7hey_pclfqhdjsqolsxjfsurgh
diff --git a/apps/wallet-mobile/.env.staging b/apps/wallet-mobile/.env.staging
index 65dcd903dc..9c9cbb8f5d 100644
--- a/apps/wallet-mobile/.env.staging
+++ b/apps/wallet-mobile/.env.staging
@@ -16,4 +16,6 @@ WALLET_2_MNEMONIC=abandon abandon abandon abandon abandon abandon abandon abando
BANXA_TEST_WALLET=addr1qyfuspldlchc5kechfe5jzdrr9jms2s9w0tq4hggy9zgkhxssydveuc8xyx4zh27fwcmr62mraeezjwf24hzkyejwfmq7yptmd
FRONTEND_FEE_ADDRESS_MAINNET=addr1q9ry6jfdgm0lcrtfpgwrgxg7qfahv80jlghhrthy6w8hmyjuw9ngccy937pm7yw0jjnxasm7hzxjrf8rzkqcj26788lqws5fke
-FRONTEND_FEE_ADDRESS_PREPROD=addr_test1qrgpjmyy8zk9nuza24a0f4e7mgp9gd6h3uayp0rqnjnkl54v4dlyj0kwfs0x4e38a7047lymzp37tx0y42glslcdtzhqzp57km
\ No newline at end of file
+FRONTEND_FEE_ADDRESS_PREPROD=addr_test1qrgpjmyy8zk9nuza24a0f4e7mgp9gd6h3uayp0rqnjnkl54v4dlyj0kwfs0x4e38a7047lymzp37tx0y42glslcdtzhqzp57km
+
+UNSTOPPABLE_API_KEY=czsajliz-wxgu6tujd1zqq7hey_pclfqhdjsqolsxjfsurgh
diff --git a/apps/wallet-mobile/.prettierignore b/apps/wallet-mobile/.prettierignore
deleted file mode 100644
index d433ceffb3..0000000000
--- a/apps/wallet-mobile/.prettierignore
+++ /dev/null
@@ -1 +0,0 @@
-src/metrics/ampli/index.ts
\ No newline at end of file
diff --git a/apps/wallet-mobile/.storybook/decorators/LayoutGrid.tsx b/apps/wallet-mobile/.storybook/decorators/LayoutGrid.tsx
deleted file mode 100644
index 855169cc45..0000000000
--- a/apps/wallet-mobile/.storybook/decorators/LayoutGrid.tsx
+++ /dev/null
@@ -1,36 +0,0 @@
-import React from 'react'
-import {StyleSheet, View} from 'react-native'
-
-export const LayoutGrid = ({children}: {children: React.ReactNode}) => {
- return (
- <>
- {children}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- >
- )
-}
-
-const commonStyles = {
- opacity: 0.5,
-}
-
-const Margin = () =>
-const Column = () =>
-const Gutter = () =>
diff --git a/apps/wallet-mobile/.storybook/decorators/index.ts b/apps/wallet-mobile/.storybook/decorators/index.ts
index 29502adb97..572430fbca 100644
--- a/apps/wallet-mobile/.storybook/decorators/index.ts
+++ b/apps/wallet-mobile/.storybook/decorators/index.ts
@@ -1,5 +1,3 @@
-export * from './intl'
-export * from './LayoutGrid'
export * from './modals'
export * from './navigation'
export * from './query'
diff --git a/apps/wallet-mobile/.storybook/decorators/intl.tsx b/apps/wallet-mobile/.storybook/decorators/intl.tsx
deleted file mode 100644
index e7fc923fa8..0000000000
--- a/apps/wallet-mobile/.storybook/decorators/intl.tsx
+++ /dev/null
@@ -1,5 +0,0 @@
-import React from 'react'
-
-import {LanguageProvider} from '../../src/i18n'
-
-export const withIntl = (storyFn) => {storyFn()}
diff --git a/apps/wallet-mobile/.storybook/decorators/navigation.tsx b/apps/wallet-mobile/.storybook/decorators/navigation.tsx
index 5528c0ef54..37dbdaaf70 100644
--- a/apps/wallet-mobile/.storybook/decorators/navigation.tsx
+++ b/apps/wallet-mobile/.storybook/decorators/navigation.tsx
@@ -1,77 +1,16 @@
import React from 'react'
-import {NavigationContext, NavigationProp, NavigationRouteContext, RouteProp} from '@react-navigation/native'
-import {action} from '@storybook/addon-actions'
-
-import {StackNavigationProp} from '@react-navigation/stack'
-import {BottomTabNavigationProp} from '@react-navigation/bottom-tabs'
-
-export const navigation = {
- setParams: action('setParams'),
- setOptions: action('setOptions'),
-
- // NavigationHelpers
- dispatch: action('dispatch'),
- navigate: action('navigate'),
- reset: action('reset'),
- goBack: action('goBack'),
- isFocused: (...args) => {
- action('isFocused')
-
- return true
- },
- canGoBack: (...args) => {
- action('canGoBack')
-
- return true
- },
-
- // EventConsumer
- addListener: (event: string) => {
- action('addListener')(event)
-
- return () => action('unsubscribe')(event)
- },
- removeListener: action('removeListener'),
-}
-
-export const stackNavigation: Partial> = {
- ...navigation,
- replace: action('replace'),
- push: action('push'),
- pop: action('pop'),
- popToTop: action('popToTop'),
-}
-
-export const tabNavigation: Partial> = {
- ...navigation,
- jumpTo: action('jumpTo'),
-}
-
-export const CommonNavigationProvider = ({children}: {children: React.ReactNode}) => (
- {children}
-)
-
-export const StackNavigationProvider = ({children}: {children: React.ReactNode}) => (
- }>{children}
-)
-
-export const TabNavigationProvider = ({children}: {children: React.ReactNode}) => (
- }>{children}
-)
+import {NavigationRouteContext} from '@react-navigation/native'
const route = {
key: 'route.key',
name: 'route.name',
}
-export const RouteProvider: React.FC}>> = ({children, params}) => (
+export const RouteProvider: React.FC}>> = ({
+ children,
+ params,
+}) => (
{children}
)
-
-export const withCommonNavigation = (storyFn) => (
-
- {storyFn({navigation, route})}
-
-)
diff --git a/apps/wallet-mobile/.storybook/storybook.requires.js b/apps/wallet-mobile/.storybook/storybook.requires.js
index d2c35fc4b2..44b28cf79a 100644
--- a/apps/wallet-mobile/.storybook/storybook.requires.js
+++ b/apps/wallet-mobile/.storybook/storybook.requires.js
@@ -75,6 +75,9 @@ const getStories = () => {
"./src/components/Checkbox/Checkbox.stories.tsx": require("../src/components/Checkbox/Checkbox.stories.tsx"),
"./src/components/ConfirmTx/ConfirmTx.stories.tsx": require("../src/components/ConfirmTx/ConfirmTx.stories.tsx"),
"./src/components/ConfirmTx/Dialog.stories.tsx": require("../src/components/ConfirmTx/Dialog.stories.tsx"),
+ "./src/components/ConfirmTxWithHwModal/ConfirmTxWithHwModal.stories.tsx": require("../src/components/ConfirmTxWithHwModal/ConfirmTxWithHwModal.stories.tsx"),
+ "./src/components/ConfirmTxWithOsModal/ConfirmTxWithOsModal.stories.tsx": require("../src/components/ConfirmTxWithOsModal/ConfirmTxWithOsModal.stories.tsx"),
+ "./src/components/ConfirmTxWithSpendingPasswordModal/ConfirmTxWithSpendingPasswordModal.stories.tsx": require("../src/components/ConfirmTxWithSpendingPasswordModal/ConfirmTxWithSpendingPasswordModal.stories.tsx"),
"./src/components/DangerousActionModal/DangerousActionModal.stories.tsx": require("../src/components/DangerousActionModal/DangerousActionModal.stories.tsx"),
"./src/components/ErrorBoundary/ErrorBoundary.stories.tsx": require("../src/components/ErrorBoundary/ErrorBoundary.stories.tsx"),
"./src/components/ErrorModal/ErrorModal.stories.tsx": require("../src/components/ErrorModal/ErrorModal.stories.tsx"),
@@ -86,6 +89,7 @@ const getStories = () => {
"./src/components/LanguagePicker/LanguagePickerWarning.stories.tsx": require("../src/components/LanguagePicker/LanguagePickerWarning.stories.tsx"),
"./src/components/Link/Link.stories.tsx": require("../src/components/Link/Link.stories.tsx"),
"./src/components/LoadingOverlay/LoadingOverlay.stories.tsx": require("../src/components/LoadingOverlay/LoadingOverlay.stories.tsx"),
+ "./src/components/ModalError/ModalError.stories.tsx": require("../src/components/ModalError/ModalError.stories.tsx"),
"./src/components/ModalScreenWrapper/ModalScreenWrapper.stories.tsx": require("../src/components/ModalScreenWrapper/ModalScreenWrapper.stories.tsx"),
"./src/components/NftImageGallery/NftImageGallery.stories.tsx": require("../src/components/NftImageGallery/NftImageGallery.stories.tsx"),
"./src/components/NftPreview/NftPreview.stories.tsx": require("../src/components/NftPreview/NftPreview.stories.tsx"),
@@ -111,11 +115,26 @@ const getStories = () => {
"./src/features/Initialization/LanguagePickerScreen/LanguagePickerScreen.stories.tsx": require("../src/features/Initialization/LanguagePickerScreen/LanguagePickerScreen.stories.tsx"),
"./src/features/Initialization/TermsOfServiceChangedScreen/TermsOfServiceChangedScreen.stories.tsx": require("../src/features/Initialization/TermsOfServiceChangedScreen/TermsOfServiceChangedScreen.stories.tsx"),
"./src/features/Menu/Menu.stories.tsx": require("../src/features/Menu/Menu.stories.tsx"),
+ "./src/features/RampOnOff/common/AmountCard/AmountCard.stories.tsx": require("../src/features/RampOnOff/common/AmountCard/AmountCard.stories.tsx"),
+ "./src/features/RampOnOff/common/ButtonActionGroup/ButtonActionGroup.stories.tsx": require("../src/features/RampOnOff/common/ButtonActionGroup/ButtonActionGroup.stories.tsx"),
+ "./src/features/RampOnOff/common/DescribeAction/DescribeAction.stories.tsx": require("../src/features/RampOnOff/common/DescribeAction/DescribeAction.stories.tsx"),
+ "./src/features/RampOnOff/common/ShowBuyBanner/BuyBannerBig.stories.tsx": require("../src/features/RampOnOff/common/ShowBuyBanner/BuyBannerBig.stories.tsx"),
+ "./src/features/RampOnOff/common/ShowBuyBanner/BuyBannerSmall.stories.tsx": require("../src/features/RampOnOff/common/ShowBuyBanner/BuyBannerSmall.stories.tsx"),
+ "./src/features/RampOnOff/common/ShowBuyBanner/ShowBuyBanner.stories.tsx": require("../src/features/RampOnOff/common/ShowBuyBanner/ShowBuyBanner.stories.tsx"),
+ "./src/features/RampOnOff/useCases/CreateExchange/CreateExchange.stories.tsx": require("../src/features/RampOnOff/useCases/CreateExchange/CreateExchange.stories.tsx"),
+ "./src/features/RampOnOff/useCases/CreateExchange/EditAmount/EditAmount.stories.tsx": require("../src/features/RampOnOff/useCases/CreateExchange/EditAmount/EditAmount.stories.tsx"),
+ "./src/features/RampOnOff/useCases/CreateExchange/SelectBuyOrSell/SelectBuyOrSell.stories.tsx": require("../src/features/RampOnOff/useCases/CreateExchange/SelectBuyOrSell/SelectBuyOrSell.stories.tsx"),
+ "./src/features/RampOnOff/useCases/CreateExchange/ShowDisclaimer/ShowDisclaimer.stories.tsx": require("../src/features/RampOnOff/useCases/CreateExchange/ShowDisclaimer/ShowDisclaimer.stories.tsx"),
+ "./src/features/RampOnOff/useCases/CreateExchange/ShowProviderFee/ShowProviderFee.stories.tsx": require("../src/features/RampOnOff/useCases/CreateExchange/ShowProviderFee/ShowProviderFee.stories.tsx"),
+ "./src/features/RampOnOff/useCases/CreateExchange/ShowProviderInfo/ShowProviderInfo.stories.tsx": require("../src/features/RampOnOff/useCases/CreateExchange/ShowProviderInfo/ShowProviderInfo.stories.tsx"),
+ "./src/features/RampOnOff/useCases/ShowExchangeResult/ContentResult/ContentResult.stories.tsx": require("../src/features/RampOnOff/useCases/ShowExchangeResult/ContentResult/ContentResult.stories.tsx"),
+ "./src/features/RampOnOff/useCases/ShowExchangeResult/ShowExchangeResult.stories.tsx": require("../src/features/RampOnOff/useCases/ShowExchangeResult/ShowExchangeResult.stories.tsx"),
"./src/features/Scan/common/CodeScannerButton.stories.tsx": require("../src/features/Scan/common/CodeScannerButton.stories.tsx"),
"./src/features/Scan/illustrations/Ilustrations.stories.tsx": require("../src/features/Scan/illustrations/Ilustrations.stories.tsx"),
"./src/features/Scan/useCases/ScanCodeScreen.stories.tsx": require("../src/features/Scan/useCases/ScanCodeScreen.stories.tsx"),
"./src/features/Scan/useCases/ShowCameraPermissionDeniedScreen/OpenDeviceAppSettingsButton.stories.tsx": require("../src/features/Scan/useCases/ShowCameraPermissionDeniedScreen/OpenDeviceAppSettingsButton.stories.tsx"),
"./src/features/Scan/useCases/ShowCameraPermissionDeniedScreen/ShowCameraPermissionDeniedScreen.stories.tsx": require("../src/features/Scan/useCases/ShowCameraPermissionDeniedScreen/ShowCameraPermissionDeniedScreen.stories.tsx"),
+ "./src/features/Send/common/ButtonGroup/ButtonGroup.stories.tsx": require("../src/features/Send/common/ButtonGroup/ButtonGroup.stories.tsx"),
"./src/features/Send/useCases/ConfirmTx/ConfirmTxScreen.stories.tsx": require("../src/features/Send/useCases/ConfirmTx/ConfirmTxScreen.stories.tsx"),
"./src/features/Send/useCases/ConfirmTx/FailedTx/FailedTxScreen.stories.tsx": require("../src/features/Send/useCases/ConfirmTx/FailedTx/FailedTxScreen.stories.tsx"),
"./src/features/Send/useCases/ConfirmTx/SubmittedTx/SubmittedTxScreen.stories.tsx": require("../src/features/Send/useCases/ConfirmTx/SubmittedTx/SubmittedTxScreen.stories.tsx"),
@@ -124,6 +143,10 @@ const getStories = () => {
"./src/features/Send/useCases/ListAmountsToSend/AddToken/Show/MaxAmountsPerTx.stories.tsx": require("../src/features/Send/useCases/ListAmountsToSend/AddToken/Show/MaxAmountsPerTx.stories.tsx"),
"./src/features/Send/useCases/ListAmountsToSend/EditAmount/EditAmountScreen.stories.tsx": require("../src/features/Send/useCases/ListAmountsToSend/EditAmount/EditAmountScreen.stories.tsx"),
"./src/features/Send/useCases/ListAmountsToSend/ListAmountsToSendScreen.stories.tsx": require("../src/features/Send/useCases/ListAmountsToSend/ListAmountsToSendScreen.stories.tsx"),
+ "./src/features/Send/useCases/StartMultiTokenTx/InputReceiver/InputReceiver.stories.tsx": require("../src/features/Send/useCases/StartMultiTokenTx/InputReceiver/InputReceiver.stories.tsx"),
+ "./src/features/Send/useCases/StartMultiTokenTx/InputReceiver/ShowResolvedAddressSelected.stories.tsx": require("../src/features/Send/useCases/StartMultiTokenTx/InputReceiver/ShowResolvedAddressSelected.stories.tsx"),
+ "./src/features/Send/useCases/StartMultiTokenTx/NotifySupportedNameServers/NotifySupportedNameServers.stories.tsx": require("../src/features/Send/useCases/StartMultiTokenTx/NotifySupportedNameServers/NotifySupportedNameServers.stories.tsx"),
+ "./src/features/Send/useCases/StartMultiTokenTx/SelectNameServer/SelectNameServer.stories.tsx": require("../src/features/Send/useCases/StartMultiTokenTx/SelectNameServer/SelectNameServer.stories.tsx"),
"./src/features/Send/useCases/StartMultiTokenTx/StartMultiTokenTxScreen.stories.tsx": require("../src/features/Send/useCases/StartMultiTokenTx/StartMultiTokenTxScreen.stories.tsx"),
"./src/features/Settings/About/About.stories.tsx": require("../src/features/Settings/About/About.stories.tsx"),
"./src/features/Settings/ApplicationSettings/ApplicationSettingsScreen.stories.tsx": require("../src/features/Settings/ApplicationSettings/ApplicationSettingsScreen.stories.tsx"),
@@ -141,36 +164,44 @@ const getStories = () => {
"./src/features/Settings/RemoveWallet/RemoveWalletScreen.stories.tsx": require("../src/features/Settings/RemoveWallet/RemoveWalletScreen.stories.tsx"),
"./src/features/Settings/TermsOfService/TermsOfServiceScreen.stories.tsx": require("../src/features/Settings/TermsOfService/TermsOfServiceScreen.stories.tsx"),
"./src/features/Settings/WalletSettings/WalletSettingsScreen.stories.tsx": require("../src/features/Settings/WalletSettings/WalletSettingsScreen.stories.tsx"),
+ "./src/features/Staking/Governance/common/Action/Action.stories.tsx": require("../src/features/Staking/Governance/common/Action/Action.stories.tsx"),
+ "./src/features/Staking/Governance/common/LearnMoreLink/LearnMoreLink.stories.tsx": require("../src/features/Staking/Governance/common/LearnMoreLink/LearnMoreLink.stories.tsx"),
+ "./src/features/Staking/Governance/useCases/ChangeVote/ChangeVoteScreen.stories.tsx": require("../src/features/Staking/Governance/useCases/ChangeVote/ChangeVoteScreen.stories.tsx"),
+ "./src/features/Staking/Governance/useCases/ConfirmTx/ConfirmTxScreen.stories.tsx": require("../src/features/Staking/Governance/useCases/ConfirmTx/ConfirmTxScreen.stories.tsx"),
+ "./src/features/Staking/Governance/useCases/EnterDrepIdModal/EnterDrepIdModal.stories.tsx": require("../src/features/Staking/Governance/useCases/EnterDrepIdModal/EnterDrepIdModal.stories.tsx"),
+ "./src/features/Staking/Governance/useCases/FailedTx/FailedTxScreen.stories.tsx": require("../src/features/Staking/Governance/useCases/FailedTx/FailedTxScreen.stories.tsx"),
+ "./src/features/Staking/Governance/useCases/Home/HomeScreen.stories.tsx": require("../src/features/Staking/Governance/useCases/Home/HomeScreen.stories.tsx"),
+ "./src/features/Staking/Governance/useCases/SuccessTx/SuccessTxScreen.stories.tsx": require("../src/features/Staking/Governance/useCases/SuccessTx/SuccessTxScreen.stories.tsx"),
"./src/features/Swap/common/AmountCard/AmountCard.stories.tsx": require("../src/features/Swap/common/AmountCard/AmountCard.stories.tsx"),
"./src/features/Swap/common/ButtonGroup/ButtonGroup.stories.tsx": require("../src/features/Swap/common/ButtonGroup/ButtonGroup.stories.tsx"),
"./src/features/Swap/common/ConfirmRawTx/ConfirmRawTx.stories.tsx": require("../src/features/Swap/common/ConfirmRawTx/ConfirmRawTx.stories.tsx"),
"./src/features/Swap/common/ConfirmWithSpendingPassword/ConfirmWithSpendingPassword.stories.tsx": require("../src/features/Swap/common/ConfirmWithSpendingPassword/ConfirmWithSpendingPassword.stories.tsx"),
"./src/features/Swap/common/LiquidityPool/LiquidityPool.stories.tsx": require("../src/features/Swap/common/LiquidityPool/LiquidityPool.stories.tsx"),
- "./src/features/Swap/common/ModalError/ModalError.stories.tsx": require("../src/features/Swap/common/ModalError/ModalError.stories.tsx"),
"./src/features/Swap/common/SelectPool/SelectPoolFromList/SelectPoolFromList.stories.tsx": require("../src/features/Swap/common/SelectPool/SelectPoolFromList/SelectPoolFromList.stories.tsx"),
"./src/features/Swap/common/ServiceUnavailable/ServiceUnavailable.stories.tsx": require("../src/features/Swap/common/ServiceUnavailable/ServiceUnavailable.stories.tsx"),
"./src/features/Swap/useCases/ConfirmTxScreen/ConfirmTxScreen.stories.tsx": require("../src/features/Swap/useCases/ConfirmTxScreen/ConfirmTxScreen.stories.tsx"),
"./src/features/Swap/useCases/ConfirmTxScreen/ShowFailedTxScreen/ShowFailedTxScreen.stories.tsx": require("../src/features/Swap/useCases/ConfirmTxScreen/ShowFailedTxScreen/ShowFailedTxScreen.stories.tsx"),
"./src/features/Swap/useCases/ConfirmTxScreen/ShowSubmittedTxScreen/ShowSubmittedTxScreen.stories.tsx": require("../src/features/Swap/useCases/ConfirmTxScreen/ShowSubmittedTxScreen/ShowSubmittedTxScreen.stories.tsx"),
"./src/features/Swap/useCases/ConfirmTxScreen/TransactionSummary.stories.tsx": require("../src/features/Swap/useCases/ConfirmTxScreen/TransactionSummary.stories.tsx"),
+ "./src/features/Swap/useCases/StartSwapScreen/CreateOrder/Actions/AmountActions/AmountActions.stories.tsx": require("../src/features/Swap/useCases/StartSwapScreen/CreateOrder/Actions/AmountActions/AmountActions.stories.tsx"),
+ "./src/features/Swap/useCases/StartSwapScreen/CreateOrder/Actions/AmountActions/ClearQuantities.stories.tsx": require("../src/features/Swap/useCases/StartSwapScreen/CreateOrder/Actions/AmountActions/ClearQuantities.stories.tsx"),
+ "./src/features/Swap/useCases/StartSwapScreen/CreateOrder/Actions/AmountActions/SwitchTokens.stories.tsx": require("../src/features/Swap/useCases/StartSwapScreen/CreateOrder/Actions/AmountActions/SwitchTokens.stories.tsx"),
+ "./src/features/Swap/useCases/StartSwapScreen/CreateOrder/Actions/OrderActions/OrderActions.stories.tsx": require("../src/features/Swap/useCases/StartSwapScreen/CreateOrder/Actions/OrderActions/OrderActions.stories.tsx"),
"./src/features/Swap/useCases/StartSwapScreen/CreateOrder/CreateOrder.stories.tsx": require("../src/features/Swap/useCases/StartSwapScreen/CreateOrder/CreateOrder.stories.tsx"),
"./src/features/Swap/useCases/StartSwapScreen/CreateOrder/EditBuyAmount/EditBuyAmount.stories.tsx": require("../src/features/Swap/useCases/StartSwapScreen/CreateOrder/EditBuyAmount/EditBuyAmount.stories.tsx"),
"./src/features/Swap/useCases/StartSwapScreen/CreateOrder/EditBuyAmount/SelectBuyTokenFromListScreen/SelectBuyTokenFromListScreen.stories.tsx": require("../src/features/Swap/useCases/StartSwapScreen/CreateOrder/EditBuyAmount/SelectBuyTokenFromListScreen/SelectBuyTokenFromListScreen.stories.tsx"),
- "./src/features/Swap/useCases/StartSwapScreen/CreateOrder/EditLimitPrice.stories.tsx": require("../src/features/Swap/useCases/StartSwapScreen/CreateOrder/EditLimitPrice.stories.tsx"),
"./src/features/Swap/useCases/StartSwapScreen/CreateOrder/EditPool/SelectPoolFromListScreen/SelectPoolFromListScreen.stories.tsx": require("../src/features/Swap/useCases/StartSwapScreen/CreateOrder/EditPool/SelectPoolFromListScreen/SelectPoolFromListScreen.stories.tsx"),
"./src/features/Swap/useCases/StartSwapScreen/CreateOrder/EditPool/ShowPoolActions.stories.tsx": require("../src/features/Swap/useCases/StartSwapScreen/CreateOrder/EditPool/ShowPoolActions.stories.tsx"),
+ "./src/features/Swap/useCases/StartSwapScreen/CreateOrder/EditPrice/EditPrice.stories.tsx": require("../src/features/Swap/useCases/StartSwapScreen/CreateOrder/EditPrice/EditPrice.stories.tsx"),
"./src/features/Swap/useCases/StartSwapScreen/CreateOrder/EditSellAmount/EditSellAmount.stories.tsx": require("../src/features/Swap/useCases/StartSwapScreen/CreateOrder/EditSellAmount/EditSellAmount.stories.tsx"),
"./src/features/Swap/useCases/StartSwapScreen/CreateOrder/EditSellAmount/SelectSellTokenFromListScreen/SelectSellTokenFromListScreen.stories.tsx": require("../src/features/Swap/useCases/StartSwapScreen/CreateOrder/EditSellAmount/SelectSellTokenFromListScreen/SelectSellTokenFromListScreen.stories.tsx"),
"./src/features/Swap/useCases/StartSwapScreen/CreateOrder/EditSlippage/EditSlippage.stories.tsx": require("../src/features/Swap/useCases/StartSwapScreen/CreateOrder/EditSlippage/EditSlippage.stories.tsx"),
"./src/features/Swap/useCases/StartSwapScreen/CreateOrder/EditSlippage/EditSlippageScreen/EditSlippageScreen.stories.tsx": require("../src/features/Swap/useCases/StartSwapScreen/CreateOrder/EditSlippage/EditSlippageScreen/EditSlippageScreen.stories.tsx"),
"./src/features/Swap/useCases/StartSwapScreen/CreateOrder/EditSlippage/ShowSlippageActions.stories.tsx": require("../src/features/Swap/useCases/StartSwapScreen/CreateOrder/EditSlippage/ShowSlippageActions.stories.tsx"),
"./src/features/Swap/useCases/StartSwapScreen/CreateOrder/EditSlippage/ShowSlippageInfo.stories.tsx": require("../src/features/Swap/useCases/StartSwapScreen/CreateOrder/EditSlippage/ShowSlippageInfo.stories.tsx"),
- "./src/features/Swap/useCases/StartSwapScreen/CreateOrder/LimitPriceWarning/LimitPriceWarning.stories.tsx": require("../src/features/Swap/useCases/StartSwapScreen/CreateOrder/LimitPriceWarning/LimitPriceWarning.stories.tsx"),
- "./src/features/Swap/useCases/StartSwapScreen/CreateOrder/ShowTokenActions/ClearQuantities.stories.tsx": require("../src/features/Swap/useCases/StartSwapScreen/CreateOrder/ShowTokenActions/ClearQuantities.stories.tsx"),
- "./src/features/Swap/useCases/StartSwapScreen/CreateOrder/ShowTokenActions/ShowTokenActions.stories.tsx": require("../src/features/Swap/useCases/StartSwapScreen/CreateOrder/ShowTokenActions/ShowTokenActions.stories.tsx"),
- "./src/features/Swap/useCases/StartSwapScreen/CreateOrder/ShowTokenActions/SwitchTokens.stories.tsx": require("../src/features/Swap/useCases/StartSwapScreen/CreateOrder/ShowTokenActions/SwitchTokens.stories.tsx"),
- "./src/features/Swap/useCases/StartSwapScreen/CreateOrder/ShowTokenActions/TopTokenActions.stories.tsx": require("../src/features/Swap/useCases/StartSwapScreen/CreateOrder/ShowTokenActions/TopTokenActions.stories.tsx"),
- "./src/features/Swap/useCases/StartSwapScreen/CreateOrder/SlippageWarning/SlippageWarning.stories.tsx": require("../src/features/Swap/useCases/StartSwapScreen/CreateOrder/SlippageWarning/SlippageWarning.stories.tsx"),
+ "./src/features/Swap/useCases/StartSwapScreen/CreateOrder/WarnLimitPrice/WarnLimitPrice.stories.tsx": require("../src/features/Swap/useCases/StartSwapScreen/CreateOrder/WarnLimitPrice/WarnLimitPrice.stories.tsx"),
+ "./src/features/Swap/useCases/StartSwapScreen/CreateOrder/WarnPriceImpact/WarnPriceImpact.stories.tsx": require("../src/features/Swap/useCases/StartSwapScreen/CreateOrder/WarnPriceImpact/WarnPriceImpact.stories.tsx"),
+ "./src/features/Swap/useCases/StartSwapScreen/CreateOrder/WarnSlippage/WarnSlippage.stories.tsx": require("../src/features/Swap/useCases/StartSwapScreen/CreateOrder/WarnSlippage/WarnSlippage.stories.tsx"),
"./src/features/Swap/useCases/StartSwapScreen/ListOrders/CompletedOrders.stories.tsx": require("../src/features/Swap/useCases/StartSwapScreen/ListOrders/CompletedOrders.stories.tsx"),
"./src/features/Swap/useCases/StartSwapScreen/ListOrders/ListOrders.stories.tsx": require("../src/features/Swap/useCases/StartSwapScreen/ListOrders/ListOrders.stories.tsx"),
"./src/features/Swap/useCases/StartSwapScreen/ListOrders/OpenOrders.stories.tsx": require("../src/features/Swap/useCases/StartSwapScreen/ListOrders/OpenOrders.stories.tsx"),
@@ -194,9 +225,6 @@ const getStories = () => {
"./src/Staking/PoolDetails/PoolDetailScreen.stories.tsx": require("../src/Staking/PoolDetails/PoolDetailScreen.stories.tsx"),
"./src/Staking/PoolWarningModal/PoolWarningModal.stories.tsx": require("../src/Staking/PoolWarningModal/PoolWarningModal.stories.tsx"),
"./src/Staking/StakingCenter/StakingCenter.stories.tsx": require("../src/Staking/StakingCenter/StakingCenter.stories.tsx"),
- "./src/theme/Palette.stories.tsx": require("../src/theme/Palette.stories.tsx"),
- "./src/theme/Theme.stories.tsx": require("../src/theme/Theme.stories.tsx"),
- "./src/theme/Typography.stories.tsx": require("../src/theme/Typography.stories.tsx"),
"./src/TxHistory/AssetList/ActionsBanner.stories.tsx": require("../src/TxHistory/AssetList/ActionsBanner.stories.tsx"),
"./src/TxHistory/AssetList/ChipButton/ChipButton.stories.tsx": require("../src/TxHistory/AssetList/ChipButton/ChipButton.stories.tsx"),
"./src/TxHistory/BalanceBanner.stories.tsx": require("../src/TxHistory/BalanceBanner.stories.tsx"),
diff --git a/apps/wallet-mobile/android/app/build.gradle b/apps/wallet-mobile/android/app/build.gradle
index 87b9e2812a..060ba3c347 100644
--- a/apps/wallet-mobile/android/app/build.gradle
+++ b/apps/wallet-mobile/android/app/build.gradle
@@ -108,8 +108,8 @@ android {
applicationId "com.emurgo"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
- versionCode 607
- versionName "4.24.0"
+ versionCode 622
+ versionName "4.25.0"
testBuildType System.getProperty('testBuildType', 'debug')
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
}
diff --git a/apps/wallet-mobile/android/app/src/main/AndroidManifest.xml b/apps/wallet-mobile/android/app/src/main/AndroidManifest.xml
index 05b3ba0a1f..fce3e7d54c 100644
--- a/apps/wallet-mobile/android/app/src/main/AndroidManifest.xml
+++ b/apps/wallet-mobile/android/app/src/main/AndroidManifest.xml
@@ -1,43 +1,28 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/apps/wallet-mobile/ios/Podfile.lock b/apps/wallet-mobile/ios/Podfile.lock
index 7eff5f118c..c8ecaa4269 100644
--- a/apps/wallet-mobile/ios/Podfile.lock
+++ b/apps/wallet-mobile/ios/Podfile.lock
@@ -383,7 +383,7 @@ PODS:
- react-native-config/App (= 1.5.1)
- react-native-config/App (1.5.1):
- React-Core
- - react-native-haskell-shelley (5.1.3):
+ - react-native-haskell-shelley (6.0.0-alpha.2):
- React
- react-native-pager-view (6.2.0):
- React-Core
@@ -900,7 +900,7 @@ SPEC CHECKSUMS:
react-native-background-timer: 17ea5e06803401a379ebf1f20505b793ac44d0fe
react-native-ble-plx: f10240444452dfb2d2a13a0e4f58d7783e92d76e
react-native-config: 86038147314e2e6d10ea9972022aa171e6b1d4d8
- react-native-haskell-shelley: 92544de7277b53cda2393528d530b526c81b48a6
+ react-native-haskell-shelley: c01783e1181b8fc1fea715a288801056d70afc07
react-native-pager-view: 0ccb8bf60e2ebd38b1f3669fa3650ecce81db2df
react-native-quick-base64: 62290829c619fbabca4c41cfec75ae759d08fc1c
react-native-randombytes: b6677f7d495c27e9ee0dbd77ebc97b3c59173729
diff --git a/apps/wallet-mobile/ios/nightly.plist b/apps/wallet-mobile/ios/nightly.plist
index fb7e6a3e33..c820d61eba 100644
--- a/apps/wallet-mobile/ios/nightly.plist
+++ b/apps/wallet-mobile/ios/nightly.plist
@@ -17,11 +17,11 @@
CFBundlePackageType
APPL
CFBundleShortVersionString
- 4.24.0
+ 4.25.0
CFBundleSignature
????
CFBundleVersion
- 496
+ 511
LSApplicationCategoryType
LSRequiresIPhoneOS
diff --git a/apps/wallet-mobile/ios/yoroi.xcodeproj/project.pbxproj b/apps/wallet-mobile/ios/yoroi.xcodeproj/project.pbxproj
index 1b68bf51c0..69226d01a2 100644
--- a/apps/wallet-mobile/ios/yoroi.xcodeproj/project.pbxproj
+++ b/apps/wallet-mobile/ios/yoroi.xcodeproj/project.pbxproj
@@ -366,15 +366,10 @@
TargetAttributes = {
00E356ED1AD99517003FC87E = {
CreatedOnToolsVersion = 6.2;
- ProvisioningStyle = Automatic;
TestTargetID = 13B07F861A680F5B00A75B9A;
};
13B07F861A680F5B00A75B9A = {
LastSwiftMigration = 1120;
- ProvisioningStyle = Automatic;
- };
- BD60BE622A34B13000EFF020 = {
- ProvisioningStyle = Automatic;
};
};
};
@@ -749,8 +744,9 @@
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_IDENTITY = "iPhone Distribution";
- CODE_SIGN_STYLE = Automatic;
- DEVELOPMENT_TEAM = F8NVT2G2L4;
+ CODE_SIGN_STYLE = Manual;
+ DEVELOPMENT_TEAM = "";
+ "DEVELOPMENT_TEAM[sdk=iphoneos*]" = F8NVT2G2L4;
ENVFILE = "$(PODS_ROOT)/../../.env";
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
@@ -775,7 +771,8 @@
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_DEBUG";
PRODUCT_BUNDLE_IDENTIFIER = com.emurgo.yoroi;
PRODUCT_NAME = "$(TARGET_NAME)";
- PROVISIONING_PROFILE_SPECIFIER = "match AppStore com.emurgo.yoroi";
+ PROVISIONING_PROFILE_SPECIFIER = "";
+ "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "match AppStore com.emurgo.yoroi";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
@@ -791,9 +788,10 @@
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_IDENTITY = "iPhone Distribution";
- CODE_SIGN_STYLE = Automatic;
+ CODE_SIGN_STYLE = Manual;
COPY_PHASE_STRIP = NO;
- DEVELOPMENT_TEAM = F8NVT2G2L4;
+ DEVELOPMENT_TEAM = "";
+ "DEVELOPMENT_TEAM[sdk=iphoneos*]" = F8NVT2G2L4;
ENVFILE = "$(PODS_ROOT)/../../.env";
INFOPLIST_FILE = yoroiTests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
@@ -814,7 +812,8 @@
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE";
PRODUCT_BUNDLE_IDENTIFIER = com.emurgo.yoroi;
PRODUCT_NAME = "$(TARGET_NAME)";
- PROVISIONING_PROFILE_SPECIFIER = "match AppStore com.emurgo.yoroi";
+ PROVISIONING_PROFILE_SPECIFIER = "";
+ "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "match AppStore com.emurgo.yoroi";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
@@ -830,9 +829,10 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "iPhone Distribution";
- CODE_SIGN_STYLE = Automatic;
- CURRENT_PROJECT_VERSION = 496;
- DEVELOPMENT_TEAM = F8NVT2G2L4;
+ CODE_SIGN_STYLE = Manual;
+ CURRENT_PROJECT_VERSION = 511;
+ DEVELOPMENT_TEAM = "";
+ "DEVELOPMENT_TEAM[sdk=iphoneos*]" = F8NVT2G2L4;
ENABLE_BITCODE = NO;
ENVFILE = "$(PODS_ROOT)/../../.env";
INFOPLIST_FILE = yoroi/Info.plist;
@@ -854,7 +854,8 @@
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_DEBUG";
PRODUCT_BUNDLE_IDENTIFIER = com.emurgo.yoroi;
PRODUCT_NAME = yoroi;
- PROVISIONING_PROFILE_SPECIFIER = "match AppStore com.emurgo.yoroi";
+ PROVISIONING_PROFILE_SPECIFIER = "";
+ "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "match AppStore com.emurgo.yoroi";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
@@ -872,9 +873,10 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "iPhone Distribution";
- CODE_SIGN_STYLE = Automatic;
- CURRENT_PROJECT_VERSION = 496;
- DEVELOPMENT_TEAM = F8NVT2G2L4;
+ CODE_SIGN_STYLE = Manual;
+ CURRENT_PROJECT_VERSION = 511;
+ DEVELOPMENT_TEAM = "";
+ "DEVELOPMENT_TEAM[sdk=iphoneos*]" = F8NVT2G2L4;
ENVFILE = "$(PODS_ROOT)/../../.env.production";
INFOPLIST_FILE = yoroi/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = Yoroi;
@@ -895,7 +897,8 @@
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE";
PRODUCT_BUNDLE_IDENTIFIER = com.emurgo.yoroi;
PRODUCT_NAME = yoroi;
- PROVISIONING_PROFILE_SPECIFIER = "match AppStore com.emurgo.yoroi";
+ PROVISIONING_PROFILE_SPECIFIER = "";
+ "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "match AppStore com.emurgo.yoroi";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
@@ -1064,9 +1067,10 @@
ASSETCATALOG_COMPILER_APPICON_NAME = "AppIcon-nightly";
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "iPhone Distribution";
- CODE_SIGN_STYLE = Automatic;
- CURRENT_PROJECT_VERSION = 496;
- DEVELOPMENT_TEAM = F8NVT2G2L4;
+ CODE_SIGN_STYLE = Manual;
+ CURRENT_PROJECT_VERSION = 511;
+ DEVELOPMENT_TEAM = "";
+ "DEVELOPMENT_TEAM[sdk=iphoneos*]" = F8NVT2G2L4;
ENABLE_BITCODE = NO;
ENVFILE = "$(PODS_ROOT)/../../.env.nightly";
INFOPLIST_FILE = nightly.plist;
@@ -1088,7 +1092,8 @@
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_DEBUG";
PRODUCT_BUNDLE_IDENTIFIER = com.emurgo.yoroi;
PRODUCT_NAME = "$(TARGET_NAME)";
- PROVISIONING_PROFILE_SPECIFIER = "match AppStore com.emurgo.yoroi";
+ PROVISIONING_PROFILE_SPECIFIER = "";
+ "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "match AppStore com.emurgo.yoroi";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
@@ -1106,9 +1111,10 @@
ASSETCATALOG_COMPILER_APPICON_NAME = "AppIcon-nightly";
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "iPhone Distribution";
- CODE_SIGN_STYLE = Automatic;
- CURRENT_PROJECT_VERSION = 496;
- DEVELOPMENT_TEAM = F8NVT2G2L4;
+ CODE_SIGN_STYLE = Manual;
+ CURRENT_PROJECT_VERSION = 511;
+ DEVELOPMENT_TEAM = "";
+ "DEVELOPMENT_TEAM[sdk=iphoneos*]" = F8NVT2G2L4;
ENVFILE = "$(PODS_ROOT)/../../.env.nightly";
INFOPLIST_FILE = nightly.plist;
INFOPLIST_KEY_CFBundleDisplayName = "Yoroi Nightly";
@@ -1129,7 +1135,8 @@
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE";
PRODUCT_BUNDLE_IDENTIFIER = com.emurgo.yoroi;
PRODUCT_NAME = "$(TARGET_NAME)";
- PROVISIONING_PROFILE_SPECIFIER = "match AppStore com.emurgo.yoroi";
+ PROVISIONING_PROFILE_SPECIFIER = "";
+ "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "match AppStore com.emurgo.yoroi";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
diff --git a/apps/wallet-mobile/ios/yoroi/AppDelegate.mm b/apps/wallet-mobile/ios/yoroi/AppDelegate.mm
index 4a78bdc03e..c2a64f350c 100644
--- a/apps/wallet-mobile/ios/yoroi/AppDelegate.mm
+++ b/apps/wallet-mobile/ios/yoroi/AppDelegate.mm
@@ -1,3 +1,4 @@
+#import
#import "AppDelegate.h"
#import "RNBootSplash.h"
@@ -38,4 +39,11 @@ - (BOOL)concurrentRootEnabled
return true;
}
+- (BOOL)application:(UIApplication *)application
+ openURL:(NSURL *)url
+ options:(NSDictionary *)options
+{
+ return [RCTLinkingManager application:application openURL:url options:options];
+}
+
@end
diff --git a/apps/wallet-mobile/ios/yoroi/Info.plist b/apps/wallet-mobile/ios/yoroi/Info.plist
index b926485ebf..085205703e 100644
--- a/apps/wallet-mobile/ios/yoroi/Info.plist
+++ b/apps/wallet-mobile/ios/yoroi/Info.plist
@@ -17,11 +17,26 @@
CFBundlePackageType
APPL
CFBundleShortVersionString
- 4.24.0
+ 4.25.0
CFBundleSignature
????
+ CFBundleURLTypes
+
+
+ CFBundleTypeRole
+ Editor
+ CFBundleURLName
+ yoroi
+ CFBundleURLSchemes
+
+ yoroi
+
+
+
CFBundleVersion
- 496
+ 511
+ ITSAppUsesNonExemptEncryption
+
LSApplicationCategoryType
LSRequiresIPhoneOS
@@ -88,11 +103,9 @@
UIInterfaceOrientationLandscapeRight
UIInterfaceOrientationPortrait
- UIViewControllerBasedStatusBarAppearance
-
- ITSAppUsesNonExemptEncryption
-
UIUserInterfaceStyle
Light
+ UIViewControllerBasedStatusBarAppearance
+
diff --git a/apps/wallet-mobile/ios/yoroiTests/Info.plist b/apps/wallet-mobile/ios/yoroiTests/Info.plist
index 31b1a148ea..f705f9781f 100644
--- a/apps/wallet-mobile/ios/yoroiTests/Info.plist
+++ b/apps/wallet-mobile/ios/yoroiTests/Info.plist
@@ -15,10 +15,10 @@
CFBundlePackageType
BNDL
CFBundleShortVersionString
- 4.24.0
+ 4.25.0
CFBundleSignature
????
CFBundleVersion
- 496
+ 511
diff --git a/apps/wallet-mobile/package.json b/apps/wallet-mobile/package.json
index e8314af352..17d1d77b07 100644
--- a/apps/wallet-mobile/package.json
+++ b/apps/wallet-mobile/package.json
@@ -1,6 +1,6 @@
{
"name": "@yoroi/wallet-mobile",
- "version": "4.24.0",
+ "version": "4.25.0",
"private": true,
"scripts": {
"android-bundle": "react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res",
@@ -94,12 +94,12 @@
"@cardano-foundation/ledgerjs-hw-app-cardano": "^6.0.0",
"@emurgo/cip14-js": "^3.0.1",
"@emurgo/cip4-js": "1.0.7",
- "@emurgo/cross-csl-core": "^3.1.0",
- "@emurgo/cross-csl-mobile": "^3.1.0",
- "@emurgo/csl-mobile-bridge": "5.1.3",
+ "@emurgo/cross-csl-core": "^4.0.0-alpha.1",
+ "@emurgo/cross-csl-mobile": "^4.0.0-alpha.1",
+ "@emurgo/csl-mobile-bridge": "6.0.0-alpha.2",
"@emurgo/react-native-blockies-svg": "^0.0.2",
"@emurgo/react-native-hid": "^5.15.6",
- "@emurgo/yoroi-lib": "^0.11.0",
+ "@emurgo/yoroi-lib": "0.14.2",
"@formatjs/intl-datetimeformat": "^6.7.0",
"@formatjs/intl-getcanonicallocales": "^2.1.0",
"@formatjs/intl-locale": "^3.2.1",
@@ -120,12 +120,16 @@
"@react-navigation/stack": "^6.3.16",
"@sentry/react-native": "^5.8.0",
"@shopify/flash-list": "^1.4.1",
- "@unstoppabledomains/resolution": "6.0.3",
- "@yoroi/api": "1.3.0",
- "@yoroi/banxa": "1.3.0",
- "@yoroi/common": "1.3.0",
- "@yoroi/links": "1.3.0",
- "@yoroi/swap": "1.3.0",
+ "@types/bip39": "^3.0.0",
+ "@types/pbkdf2": "^3.1.2",
+ "@yoroi/api": "1.5.1",
+ "@yoroi/banxa": "1.5.0",
+ "@yoroi/common": "1.5.1",
+ "@yoroi/links": "1.5.1",
+ "@yoroi/resolver": "2.0.4",
+ "@yoroi/staking": "1.5.1",
+ "@yoroi/swap": "1.5.1",
+ "@yoroi/theme": "^1.0.0",
"add": "2.0.6",
"assert": "^2.0.0",
"base-64": "^1.0.0",
@@ -202,7 +206,7 @@
"@babel/preset-react": "^7.16.7",
"@babel/runtime": "^7.20.0",
"@emurgo/cardano-serialization-lib-nodejs": "^9.1.4",
- "@emurgo/cross-csl-nodejs": "^3.1.0",
+ "@emurgo/cross-csl-nodejs": "^4.0.0-alpha.1",
"@formatjs/cli": "^6.1.0",
"@formatjs/ts-transformer": "^3.13.0",
"@react-navigation/devtools": "^6.0.13",
@@ -222,6 +226,7 @@
"@testing-library/react-hooks": "^8.0.1",
"@testing-library/react-native": "^9.0.0",
"@tsconfig/react-native": "^2.0.2",
+ "@types/bs58": "^4.0.4",
"@types/chai": "^4.3.4",
"@types/jest": "^29.2.1",
"@types/lodash": "^4.14.175",
@@ -231,10 +236,11 @@
"@types/react-native": "0.71.6",
"@types/react-native-background-timer": "^2.0.0",
"@types/react-test-renderer": "^18.0.0",
+ "@types/tinycolor2": "^1.4.6",
"@types/uuid": "^8.3.4",
"@typescript-eslint/eslint-plugin": "^5.0.0",
"@typescript-eslint/parser": "^5.32.0",
- "@yoroi/types": "1.3.0",
+ "@yoroi/types": "1.5.2",
"babel-eslint": "^10.1.0",
"babel-jest": "^29.2.1",
"babel-loader": "8.2.2",
@@ -256,13 +262,14 @@
"i18n-unused": "^0.8.0",
"lint-staged": "^13.2.2",
"metro-react-native-babel-preset": "0.73.9",
+ "mockdate": "^3.0.5",
"node-fetch": "<3",
"pod-install": "^0.1.38",
"prettier": "^2.4.1",
"prettier-plugin-packagejson": "^2.2.11",
"prettylint": "^1.0.0",
"react-addons-test-utils": "^15.6.2",
- "react-devtools-core": "4.26.1",
+ "react-devtools-core": "^4.28",
"react-dom": "16.8.3",
"react-intl-translations-manager": "^5.0.3",
"react-native-typescript-transformer": "^1.2.13",
diff --git a/apps/wallet-mobile/src/AppNavigator.tsx b/apps/wallet-mobile/src/AppNavigator.tsx
index 06d2600242..ed0f138b04 100644
--- a/apps/wallet-mobile/src/AppNavigator.tsx
+++ b/apps/wallet-mobile/src/AppNavigator.tsx
@@ -15,7 +15,7 @@ import {ModalProvider} from './components/Modal/ModalContext'
import {ModalScreen} from './components/Modal/ModalScreen'
import {AgreementChangedNavigator, InitializationNavigator} from './features/Initialization'
import {LegalAgreement, useLegalAgreement} from './features/Initialization/common'
-import {CONFIG} from './legacy/config'
+import {CONFIG, LINKING_CONFIG, LINKING_PREFIXES} from './legacy/config'
import {DeveloperScreen} from './legacy/DeveloperScreen'
import {AppRoutes} from './navigation'
import {SearchProvider} from './Search/SearchContext'
@@ -28,6 +28,15 @@ const navRef = React.createRef {
const strings = useStrings()
+ const [routeName, setRouteName] = React.useState()
+
+ const enableDeepLink = routeName === 'history-list'
+
+ const linking = {
+ enabled: enableDeepLink,
+ prefixes: LINKING_PREFIXES,
+ config: LINKING_CONFIG,
+ }
useHideScreenInAppSwitcher()
useAutoLogout()
@@ -62,8 +71,13 @@ export const AppNavigator = () => {
}
}
+ const handleStateChange = () => {
+ const currentRouteName = navRef.current?.getCurrentRoute()?.name
+ setRouteName(currentRouteName)
+ }
+
return (
-
+
-
+
+
-
-
+
+
- {strings.subTitle}
+ {strings.subTitle}
-
+
- {wallet.isHW ? (
-
- ) : (
-
- {wallet.isEasyConfirmationEnabled ? strings.authOsInstructions : strings.description}
-
- )}
-
-
-
-
+ ) : (
+
+ {wallet.isEasyConfirmationEnabled ? strings.authOsInstructions : strings.description}
+
)}
- label={strings.fees}
- editable={false}
- autoComplete="off"
- />
- {!wallet.isEasyConfirmationEnabled && !wallet.isHW && (
+
+
- )}
-
-
-
-
-
- onNext()}
- isProvidingPassword
- providedPassword={password}
- setUseUSB={setUseUSB}
- useUSB={useUSB}
- yoroiUnsignedTx={votingRegTx}
- biometricInstructions={[strings.authOsInstructions]}
- chooseTransportOnConfirmation
- onCIP36SupportChange={handleCIP36SupportChange}
- autoConfirm={!supportsCIP36}
- supportsCIP36={supportsCIP36}
- />
-
+
+ {!wallet.isEasyConfirmationEnabled && !wallet.isHW && (
+
+ )}
+
+
+
+
+
+ onNext()}
+ isProvidingPassword
+ providedPassword={password}
+ setUseUSB={setUseUSB}
+ useUSB={useUSB}
+ yoroiUnsignedTx={votingRegTx}
+ biometricInstructions={[strings.authOsInstructions]}
+ chooseTransportOnConfirmation
+ onCIP36SupportChange={handleCIP36SupportChange}
+ autoConfirm={!supportsCIP36}
+ supportsCIP36={supportsCIP36}
+ />
+
+
)
}
diff --git a/apps/wallet-mobile/src/Catalyst/DownloadCatalyst.tsx b/apps/wallet-mobile/src/Catalyst/DownloadCatalyst.tsx
index 2cb93e2f76..b1ea991e4d 100644
--- a/apps/wallet-mobile/src/Catalyst/DownloadCatalyst.tsx
+++ b/apps/wallet-mobile/src/Catalyst/DownloadCatalyst.tsx
@@ -1,7 +1,7 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import React, {useState} from 'react'
import {defineMessages, useIntl} from 'react-intl'
-import {Image, Linking, ScrollView, StyleSheet, TouchableOpacity, View} from 'react-native'
+import {Image, Linking, ScrollView, StyleSheet, TouchableOpacity, View, ViewProps} from 'react-native'
import {SafeAreaView} from 'react-native-safe-area-context'
import appstoreBadge from '../assets/img/app-store-badge.png'
@@ -73,7 +73,7 @@ export const DownloadCatalyst = ({onNext}: Props) => {
)
}
-const Tip = (props) =>
+const Tip = (props: ViewProps) =>
const PlayStoreButton = () => {
const openPlayStore = async () => {
diff --git a/apps/wallet-mobile/src/Catalyst/InsufficientFundsModal.tsx b/apps/wallet-mobile/src/Catalyst/InsufficientFundsModal.tsx
index dbfffb2053..f2723098d5 100644
--- a/apps/wallet-mobile/src/Catalyst/InsufficientFundsModal.tsx
+++ b/apps/wallet-mobile/src/Catalyst/InsufficientFundsModal.tsx
@@ -45,7 +45,7 @@ const useStrings = () => {
const intl = useIntl()
return {
- insufficientBalance: ({requiredBalance, currentBalance}) =>
+ insufficientBalance: ({requiredBalance, currentBalance}: {requiredBalance: string; currentBalance: string}) =>
intl.formatMessage(globalMessages.insufficientBalance, {
requiredBalance,
currentBalance,
diff --git a/apps/wallet-mobile/src/Catalyst/QrCode.tsx b/apps/wallet-mobile/src/Catalyst/QrCode.tsx
index 6375e5114d..252a471026 100644
--- a/apps/wallet-mobile/src/Catalyst/QrCode.tsx
+++ b/apps/wallet-mobile/src/Catalyst/QrCode.tsx
@@ -1,6 +1,6 @@
import React, {useState} from 'react'
import {defineMessages, useIntl} from 'react-intl'
-import {ScrollView, StyleSheet, View} from 'react-native'
+import {ScrollView, StyleSheet, View, ViewProps} from 'react-native'
import QRCodeSVG from 'react-native-qrcode-svg'
import {SafeAreaView} from 'react-native-safe-area-context'
@@ -80,13 +80,13 @@ export const QrCode = ({onNext, votingKeyEncrypted}: {onNext: () => void; voting
)
}
-const AlertBox = (props) =>
+const AlertBox = (props: ViewProps) =>
const QRCode = ({text}: {text: string}) => (
)
-const SecretCodeBox = (props) =>
+const SecretCodeBox = (props: ViewProps) =>
const messages = defineMessages({
subTitle: {
diff --git a/apps/wallet-mobile/src/Catalyst/VotingBanner.tsx b/apps/wallet-mobile/src/Catalyst/VotingBanner.tsx
index 18babe7f27..41891a8be2 100644
--- a/apps/wallet-mobile/src/Catalyst/VotingBanner.tsx
+++ b/apps/wallet-mobile/src/Catalyst/VotingBanner.tsx
@@ -1,3 +1,4 @@
+import {catalystManagerMaker} from '@yoroi/staking'
import React, {useEffect, useState} from 'react'
import {defineMessages, useIntl} from 'react-intl'
import {StyleSheet, TouchableOpacity, View} from 'react-native'
@@ -8,7 +9,6 @@ import globalMessages, {confirmationMessages} from '../i18n/global-messages'
import {isNightly} from '../legacy/config'
import {Logger} from '../legacy/logging'
import {COLORS} from '../theme'
-import {isRegistrationOpen} from '../yoroi-wallets/cardano/catalyst/catalystUtils'
import {useCanVote} from './hooks'
import {InsufficientFundsModal} from './InsufficientFundsModal'
@@ -42,7 +42,9 @@ export const VotingBanner = ({onPress, disabled}: Props) => {
}
}
- setShowCatalystBanner((canVote && isRegistrationOpen(fundInfo)) || isNightly() || __DEV__)
+ const catalyst = catalystManagerMaker()
+
+ setShowCatalystBanner((canVote && catalyst.isRegistrationOpen(fundInfo)) || isNightly() || __DEV__)
}
checkCatalystFundInfo()
@@ -103,7 +105,7 @@ const useStrings = () => {
name: intl.formatMessage(messages.name),
attention: intl.formatMessage(globalMessages.attention),
back: intl.formatMessage(confirmationMessages.commonButtons.backButton),
- noBalance: ({requiredBalance, currentBalance}) =>
+ noBalance: ({requiredBalance, currentBalance}: {requiredBalance: string; currentBalance: string}) =>
intl.formatMessage(globalMessages.insufficientBalance, {
requiredBalance,
currentBalance,
diff --git a/apps/wallet-mobile/src/Catalyst/VotingRegistration.tsx b/apps/wallet-mobile/src/Catalyst/VotingRegistration.tsx
index 6a9fc68956..50c71e84ab 100644
--- a/apps/wallet-mobile/src/Catalyst/VotingRegistration.tsx
+++ b/apps/wallet-mobile/src/Catalyst/VotingRegistration.tsx
@@ -1,4 +1,4 @@
-import {useNavigation} from '@react-navigation/native'
+import {useFocusEffect, useNavigation} from '@react-navigation/native'
import {createStackNavigator} from '@react-navigation/stack'
import cryptoRandomString from 'crypto-random-string'
import React, {useState} from 'react'
@@ -6,6 +6,7 @@ import {useIntl} from 'react-intl'
import {Boundary} from '../components'
import globalMessages from '../i18n/global-messages'
+import {useMetrics} from '../metrics/metricsManager'
import {
defaultStackNavigationOptions,
useWalletNavigation,
@@ -25,6 +26,13 @@ export const VotingRegistration = () => {
const pin = usePin({length: 4, type: 'numeric'})
const [votingKeyEncrypted, setVotingKeyEncrypted] = React.useState(undefined)
const [complete, setComplete] = React.useState(false)
+ const {track} = useMetrics()
+
+ useFocusEffect(
+ React.useCallback(() => {
+ track.votingPageViewed()
+ }, [track]),
+ )
return (
{
const intl = useIntl()
const navigateTo = useNavigateTo()
+ const governanceStrings = useGovernanceStrings()
const wallet = useSelectedWallet()
const {isLoading: isSyncing, sync} = useSync(wallet)
const isOnline = useIsOnline(wallet)
+ const {openModal} = useModal()
const balances = useBalances(wallet)
const primaryAmount = Amounts.getAmount(balances, '')
const {stakingInfo, refetch: refetchStakingInfo, error, isLoading} = useStakingInfo(wallet)
+ const isGovernanceFeatureEnabled = useIsGovernanceFeatureEnabled(wallet)
const [showWithdrawalDialog, setShowWithdrawalDialog] = React.useState(false)
const {resetToTxHistory} = useWalletNavigation()
+ const isParticipatingInGovernance = useIsParticipatingInGovernance(wallet)
+ const walletNavigateTo = useWalletNavigation()
+
+ const handleOnParticipatePress = () => {
+ walletNavigateTo.navigateToGovernanceCentre({navigateToStakingOnSuccess: true})
+ }
+
+ const onWithdraw = () => {
+ if (isGovernanceFeatureEnabled && !isParticipatingInGovernance) {
+ openModal(
+ governanceStrings.withdrawWarningTitle,
+ ,
+ )
+ return
+ }
+ setShowWithdrawalDialog(true)
+ }
+
return (
@@ -77,7 +104,7 @@ export const Dashboard = () => {
totalAdaSum={!isEmptyString(primaryAmount.quantity) ? new BigNumber(primaryAmount.quantity) : null}
totalRewards={new BigNumber(stakingInfo.rewards)}
totalDelegated={new BigNumber(stakingInfo.amount)}
- onWithdraw={() => setShowWithdrawalDialog(true)}
+ onWithdraw={onWithdraw}
disableWithdraw={wallet.isReadOnly}
/>
) : (
@@ -85,7 +112,7 @@ export const Dashboard = () => {
totalAdaSum={!isEmptyString(primaryAmount.quantity) ? new BigNumber(primaryAmount.quantity) : null}
totalRewards={null}
totalDelegated={null}
- onWithdraw={() => setShowWithdrawalDialog(true)}
+ onWithdraw={onWithdraw}
disableWithdraw
/>
)}
@@ -214,7 +241,7 @@ const EpochInfo = () => {
)
}
-const Actions = (props) =>
+const Actions = (props: ViewProps) =>
const messages = defineMessages({
stakingCenterButton: {
diff --git a/apps/wallet-mobile/src/Dashboard/DashboardNavigator.tsx b/apps/wallet-mobile/src/Dashboard/DashboardNavigator.tsx
index 74d518cd4a..3c25f171c8 100644
--- a/apps/wallet-mobile/src/Dashboard/DashboardNavigator.tsx
+++ b/apps/wallet-mobile/src/Dashboard/DashboardNavigator.tsx
@@ -1,9 +1,11 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import {createStackNavigator} from '@react-navigation/stack'
+import {GovernanceProvider} from '@yoroi/staking'
import React from 'react'
import {defineMessages, useIntl} from 'react-intl'
import {SettingsButton} from '../components/Button'
+import {useGovernanceManagerMaker} from '../features/Staking/Governance'
import {DashboardRoutes, defaultStackNavigationOptions, useWalletNavigation} from '../navigation'
import {useSelectedWallet} from '../SelectedWallet'
import {DelegationConfirmation} from '../Staking'
@@ -17,34 +19,33 @@ export const DashboardNavigator = () => {
const walletName = useWalletName(wallet)
const strings = useStrings()
+ const manager = useGovernanceManagerMaker()
+
return (
-
- ,
- }}
- />
+
+
+ ,
+ }}
+ />
-
+
-
-
+
+
+
)
}
diff --git a/apps/wallet-mobile/src/Dashboard/WithdrawStakingRewards/TransferSummary/TransferSummary.tsx b/apps/wallet-mobile/src/Dashboard/WithdrawStakingRewards/TransferSummary/TransferSummary.tsx
index b4ba57328a..c1306dd6a9 100644
--- a/apps/wallet-mobile/src/Dashboard/WithdrawStakingRewards/TransferSummary/TransferSummary.tsx
+++ b/apps/wallet-mobile/src/Dashboard/WithdrawStakingRewards/TransferSummary/TransferSummary.tsx
@@ -154,7 +154,7 @@ const useStrings = () => {
balanceLabel: intl.formatMessage(messages.balanceLabel),
confirmButton: intl.formatMessage(confirmationMessages.commonButtons.confirmButton),
finalBalanceLabel: intl.formatMessage(messages.finalBalanceLabel),
- unregisterExplanation: (args) => intl.formatMessage(messages.unregisterExplanation, args),
+ unregisterExplanation: (args: {refundAmount: string}) => intl.formatMessage(messages.unregisterExplanation, args),
confirmTx: intl.formatMessage(txLabels.confirmTx),
password: intl.formatMessage(txLabels.password),
diff --git a/apps/wallet-mobile/src/HW/LedgerConnect/DeviceItem/DeviceItem.stories.tsx b/apps/wallet-mobile/src/HW/LedgerConnect/DeviceItem/DeviceItem.stories.tsx
index c89c76a533..cffaa861a1 100644
--- a/apps/wallet-mobile/src/HW/LedgerConnect/DeviceItem/DeviceItem.stories.tsx
+++ b/apps/wallet-mobile/src/HW/LedgerConnect/DeviceItem/DeviceItem.stories.tsx
@@ -12,7 +12,7 @@ const device: Device = {
const doTheThing = () => new Promise((resolve) => setTimeout(resolve, 1000))
-const onSelect = async (device) => {
+const onSelect = async (device: Device) => {
action('onSelect start')(device)
await doTheThing()
action('onSelect end')(device)
diff --git a/apps/wallet-mobile/src/HW/LedgerConnect/LedgerConnect.tsx b/apps/wallet-mobile/src/HW/LedgerConnect/LedgerConnect.tsx
index 39f66ecf0d..80bd871863 100644
--- a/apps/wallet-mobile/src/HW/LedgerConnect/LedgerConnect.tsx
+++ b/apps/wallet-mobile/src/HW/LedgerConnect/LedgerConnect.tsx
@@ -1,4 +1,6 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
+// eslint-disable-next-line @typescript-eslint/ban-ts-comment
+// @ts-ignore
import TransportHID from '@emurgo/react-native-hid'
import TransportBLE from '@ledgerhq/react-native-hw-transport-ble'
import React from 'react'
@@ -31,7 +33,7 @@ type State = {
devices: Array
deviceId?: null | DeviceId
deviceObj?: null | DeviceObj
- error?: any
+ error?: Error | null
refreshing: boolean
waiting: boolean
}
@@ -49,7 +51,7 @@ class _LedgerConnect extends React.Component {
_subscriptions: null | {unsubscribe: () => void} = null
_bluetoothEnabled: null | boolean = null
- _transportLib: any = null
+ _transportLib: TransportHID | TransportBLE | null = null
_isMounted = false
componentDidMount() {
@@ -100,29 +102,35 @@ class _LedgerConnect extends React.Component {
startScan = () => {
const {useUSB} = this.props
+ const onComplete = () => {
+ Logger.debug('listen: subscription completed')
+ this.setState({refreshing: false})
+ }
+
+ const onError = (error: Error) => {
+ this.setState({error, refreshing: false, devices: []})
+ }
+
+ const onBLENext = (e: {type: string; descriptor: Device}) => {
+ if (e.type === 'add') {
+ Logger.debug('listen: new device detected')
+ // with bluetooth, new devices are appended in the screen
+ this.setState(deviceAddition(e.descriptor))
+ }
+ }
+
+ const onHWNext = (e: {type: string; descriptor: DeviceObj}) => {
+ if (e.type === 'add') {
+ Logger.debug('listen: new device detected')
+ // if a device is detected, save it in state immediately
+ this.setState({refreshing: false, deviceObj: e.descriptor})
+ }
+ }
+
this._subscriptions = this._transportLib.listen({
- complete: () => {
- Logger.debug('listen: subscription completed')
- this.setState({refreshing: false})
- },
- next: (e) => {
- if (e.type === 'add') {
- Logger.debug('listen: new device detected')
- if (useUSB === true) {
- // if a device is detected, save it in state immediately
- this.setState({
- refreshing: false,
- deviceObj: e.descriptor,
- })
- } else {
- // with bluetooth, new devices are appended in the screen
- this.setState(deviceAddition(e.descriptor))
- }
- }
- },
- error: (error) => {
- this.setState({error, refreshing: false, devices: []})
- },
+ complete: onComplete,
+ next: useUSB ? onHWNext : onBLENext,
+ error: onError,
})
}
@@ -160,6 +168,7 @@ class _LedgerConnect extends React.Component {
})
await onConnectBLE(device.id.toString())
} catch (e) {
+ if (!(e instanceof Error)) return
Logger.debug(e as any)
if (e instanceof RejectedByUserError) {
this.reload()
@@ -179,6 +188,7 @@ class _LedgerConnect extends React.Component {
})
await this.props.onConnectUSB(deviceObj)
} catch (e) {
+ if (!(e instanceof Error)) return
Logger.debug(e as any)
if (e instanceof RejectedByUserError) {
this.reload()
@@ -317,10 +327,10 @@ const messages = defineMessages({
})
const deviceAddition =
- (device) =>
- ({devices}) => {
+ (device: Device) =>
+ ({devices}: {devices: Device[]}) => {
return {
- devices: devices.some((i) => i.id === device.id) === true ? devices : devices.concat(device),
+ devices: devices.some((i) => i.id === device.id) ? devices : devices.concat(device),
}
}
diff --git a/apps/wallet-mobile/src/Legal/TermsOfService/TermsOfService.tsx b/apps/wallet-mobile/src/Legal/TermsOfService/TermsOfService.tsx
index 14a4650fab..c0fcaba02a 100644
--- a/apps/wallet-mobile/src/Legal/TermsOfService/TermsOfService.tsx
+++ b/apps/wallet-mobile/src/Legal/TermsOfService/TermsOfService.tsx
@@ -4,9 +4,10 @@ import Markdown from 'react-native-markdown-display'
import {useQuery} from 'react-query'
import {Spacer} from '../../components'
+import {LanguageCode} from '../../i18n/languages'
import {loadTOS} from './loadTos'
-export const useTos = ({languageCode}: {languageCode: string}) => {
+export const useTos = ({languageCode}: {languageCode: LanguageCode}) => {
const query = useQuery({
queryKey: ['tos', languageCode],
queryFn: () => loadTOS(languageCode),
@@ -15,7 +16,7 @@ export const useTos = ({languageCode}: {languageCode: string}) => {
return query.data
}
-export const TermsOfService = ({languageCode}: {languageCode: string}) => {
+export const TermsOfService = ({languageCode}: {languageCode: LanguageCode}) => {
const tos = useTos({languageCode})
return tos != null ? (
diff --git a/apps/wallet-mobile/src/Legal/TermsOfService/loadTos.ts b/apps/wallet-mobile/src/Legal/TermsOfService/loadTos.ts
index 83df0389de..bbc1eec750 100644
--- a/apps/wallet-mobile/src/Legal/TermsOfService/loadTos.ts
+++ b/apps/wallet-mobile/src/Legal/TermsOfService/loadTos.ts
@@ -48,11 +48,6 @@ const tosByCode = {
'zh-Hans': ZH_CN_TOS,
}
-export const loadTOS = (languageCode: string): string => {
- console.log('------------------------------')
- console.log(languageCode)
- // fetch(HU_HU_TOS).then((response) => response.text()).then((text) => console.log(text))
- console.log(tosByCode[languageCode])
- console.log('------------------------------')
+export const loadTOS = (languageCode: keyof typeof tosByCode): string => {
return tosByCode[languageCode]
}
diff --git a/apps/wallet-mobile/src/NftDetails/NftDetails.tsx b/apps/wallet-mobile/src/NftDetails/NftDetails.tsx
index 76642fb722..bcb44a4393 100644
--- a/apps/wallet-mobile/src/NftDetails/NftDetails.tsx
+++ b/apps/wallet-mobile/src/NftDetails/NftDetails.tsx
@@ -3,8 +3,16 @@ import {isRecord, isString} from '@yoroi/common'
import {Balance} from '@yoroi/types'
import React, {ReactNode, useState} from 'react'
import {defineMessages, useIntl} from 'react-intl'
-import {Dimensions, Linking, StyleSheet, TouchableOpacity, View} from 'react-native'
-import {ScrollView} from 'react-native-gesture-handler'
+import {
+ Dimensions,
+ Linking,
+ RefreshControl,
+ SafeAreaView,
+ ScrollView,
+ StyleSheet,
+ TouchableOpacity,
+ View,
+} from 'react-native'
import {CopyButton, FadeIn, Icon, Spacer, Text} from '../components'
import {NftPreview} from '../components/NftPreview'
@@ -17,57 +25,64 @@ import {useNavigateTo} from '../Nfts/navigation'
import {useSelectedWallet} from '../SelectedWallet'
import {COLORS} from '../theme'
import {getNetworkConfigById} from '../yoroi-wallets/cardano/networks'
-import {useNft} from '../yoroi-wallets/hooks'
+import {useNativeAssetInvalidation, useNft} from '../yoroi-wallets/hooks'
export const NftDetails = () => {
const {id} = useRoute>().params
const strings = useStrings()
const wallet = useSelectedWallet()
const nft = useNft(wallet, {id})
+ const [policy, name] = nft.id.split('.')
const [activeTab, setActiveTab] = useState<'overview' | 'metadata'>('overview')
const {track} = useMetrics()
+ const {invalidate, isLoading} = useNativeAssetInvalidation({networkId: wallet.networkId, policy, name})
return (
-
- {features.moderatingNftsEnabled ? : }
-
-
- {
- if (activeTab !== 'overview') {
- setActiveTab('overview')
- track.nftGalleryDetailsTab({nft_tab: 'Overview'})
- }
- }}
- label={strings.overview}
- active={activeTab === 'overview'}
- testID="overview"
- />
-
- {
- if (activeTab !== 'metadata') {
- setActiveTab('metadata')
- track.nftGalleryDetailsTab({nft_tab: 'Metadata'})
- }
- }}
- label={strings.metadata}
- active={activeTab === 'metadata'}
- testID="metadata"
- />
-
-
-
-
-
-
-
-
-
-
-
-
+
+ }
+ >
+ {features.moderatingNftsEnabled ? : }
+
+
+ {
+ if (activeTab !== 'overview') {
+ setActiveTab('overview')
+ track.nftGalleryDetailsTab({nft_tab: 'Overview'})
+ }
+ }}
+ label={strings.overview}
+ active={activeTab === 'overview'}
+ testID="overview"
+ />
+
+ {
+ if (activeTab !== 'metadata') {
+ setActiveTab('metadata')
+ track.nftGalleryDetailsTab({nft_tab: 'Metadata'})
+ }
+ }}
+ label={strings.metadata}
+ active={activeTab === 'metadata'}
+ testID="metadata"
+ />
+
+
+
+
+
+
+
+
+
+
+
+
+
)
}
@@ -76,7 +91,7 @@ const UnModeratedNftImage = ({nft}: {nft: Balance.TokenInfo}) => {
const navigateTo = useNavigateTo()
return (
navigateTo.nftZoom(nft.id)} style={styles.imageWrapper}>
-
+
)
}
@@ -97,7 +112,7 @@ const ModeratedNftImage = ({nft}: {nft: Balance.TokenInfo}) => {
return (
navigateTo.nftZoom(nft.id)} style={styles.imageWrapper}>
-
+
)
}
diff --git a/apps/wallet-mobile/src/NftDetails/NftDetailsImage.tsx b/apps/wallet-mobile/src/NftDetails/NftDetailsImage.tsx
index f51b69f670..986a54d937 100644
--- a/apps/wallet-mobile/src/NftDetails/NftDetailsImage.tsx
+++ b/apps/wallet-mobile/src/NftDetails/NftDetailsImage.tsx
@@ -1,5 +1,7 @@
import React from 'react'
import {Dimensions, StyleSheet, View} from 'react-native'
+// eslint-disable-next-line @typescript-eslint/ban-ts-comment
+// @ts-ignore
import ViewTransformer from 'react-native-easy-view-transformer'
import {FadeIn} from '../components'
@@ -27,13 +29,12 @@ export const NftDetailsImage = () => {
}, [nft?.id, track])
const dimensions = Dimensions.get('window')
- const imageSize = Math.min(dimensions.width, dimensions.height)
return (
-
+
diff --git a/apps/wallet-mobile/src/Nfts/Nfts.tsx b/apps/wallet-mobile/src/Nfts/Nfts.tsx
index fd26aee91c..73e38fd75d 100644
--- a/apps/wallet-mobile/src/Nfts/Nfts.tsx
+++ b/apps/wallet-mobile/src/Nfts/Nfts.tsx
@@ -5,7 +5,7 @@ import {defineMessages, useIntl} from 'react-intl'
import {RefreshControl, ScrollView, StyleSheet, Text, View} from 'react-native'
import {SafeAreaView} from 'react-native-safe-area-context'
-import {Icon, NftImageGallery, SkeletonGallery, Spacer} from '../components'
+import {Icon, NftImageGallery, SkeletonGallery, Spacer, StatusBar} from '../components'
import {useMetrics} from '../metrics/metricsManager'
import {useSearch, useSearchOnNavBar} from '../Search/SearchContext'
import {useSelectedWallet} from '../SelectedWallet'
@@ -134,6 +134,8 @@ export const Nfts = () => {
const Wrapper = ({children}: {children: ReactNode}) => {
return (
+
+
diff --git a/apps/wallet-mobile/src/Receive/AddressModal.tsx b/apps/wallet-mobile/src/Receive/AddressModal.tsx
index 08a6de7c12..52cff2d3e3 100644
--- a/apps/wallet-mobile/src/Receive/AddressModal.tsx
+++ b/apps/wallet-mobile/src/Receive/AddressModal.tsx
@@ -1,7 +1,7 @@
import {fromPairs} from 'lodash'
import React, {useState} from 'react'
import {defineMessages, useIntl} from 'react-intl'
-import {StyleSheet, View} from 'react-native'
+import {StyleSheet, View, ViewProps} from 'react-native'
import QRCode from 'react-native-qrcode-svg'
import {CopyButton, Spacer, Text} from '../components'
@@ -125,8 +125,8 @@ const PathInfo = ({path}: PathInfoProps) => {
>
)
}
-const Info = (props) =>
-const Row = (props) =>
+const Info = (props: ViewProps) =>
+const Row = (props: ViewProps) =>
const styles = StyleSheet.create({
info: {
@@ -188,7 +188,7 @@ const useStrings = () => {
}
}
-const useKeyHashes = (address) => {
+const useKeyHashes = (address: string) => {
const [spending, setSpending] = useState(null)
const [staking, setStaking] = useState(null)
diff --git a/apps/wallet-mobile/src/Receive/Addresses.tsx b/apps/wallet-mobile/src/Receive/Addresses.tsx
index f4036a2745..9b064a4502 100644
--- a/apps/wallet-mobile/src/Receive/Addresses.tsx
+++ b/apps/wallet-mobile/src/Receive/Addresses.tsx
@@ -1,7 +1,7 @@
import {fromPairs} from 'lodash'
import React from 'react'
import {defineMessages, useIntl} from 'react-intl'
-import {StyleSheet, TouchableOpacity, View} from 'react-native'
+import {StyleSheet, TouchableOpacity, TouchableOpacityProps, View, ViewProps} from 'react-native'
import {CopyButton, Icon, Spacer, Text} from '../components'
import {useSelectedWallet} from '../SelectedWallet'
@@ -108,11 +108,11 @@ const UnusedAddress = ({address, onPress}: {address: string; onPress: () => void
)
}
-const Header = (props) =>
-const Row = (props) =>
-const Address = (props) =>
-const Actions = (props) =>
-const VerifyButton = (props) => (
+const Header = (props: ViewProps) =>
+const Row = (props: ViewProps) =>
+const Address = (props: ViewProps) =>
+const Actions = (props: ViewProps) =>
+const VerifyButton = (props: TouchableOpacityProps) => (
diff --git a/apps/wallet-mobile/src/Receive/ReceiveScreen.tsx b/apps/wallet-mobile/src/Receive/ReceiveScreen.tsx
index 10380e8206..6aa7e8dd03 100644
--- a/apps/wallet-mobile/src/Receive/ReceiveScreen.tsx
+++ b/apps/wallet-mobile/src/Receive/ReceiveScreen.tsx
@@ -1,9 +1,11 @@
+import {useFocusEffect} from '@react-navigation/native'
import _ from 'lodash'
import React from 'react'
import {defineMessages, useIntl} from 'react-intl'
-import {ActivityIndicator, ScrollView, StyleSheet, View} from 'react-native'
+import {ActivityIndicator, ScrollView, StyleSheet, View, ViewProps} from 'react-native'
import {Button, Spacer, StatusBar} from '../components'
+import {useMetrics} from '../metrics/metricsManager'
import {useSelectedWallet} from '../SelectedWallet'
import {COLORS} from '../theme'
import {useReceiveAddresses} from '../yoroi-wallets/hooks'
@@ -22,6 +24,14 @@ export const ReceiveScreen = () => {
wallet.generateNewReceiveAddressIfNeeded()
}, [wallet])
+ const {track} = useMetrics()
+
+ useFocusEffect(
+ React.useCallback(() => {
+ track.receivePageViewed()
+ }, [track]),
+ )
+
return (
@@ -61,7 +71,7 @@ export const ReceiveScreen = () => {
)
}
-const Content = (props) =>
+const Content = (props: ViewProps) =>
const messages = defineMessages({
infoText: {
diff --git a/apps/wallet-mobile/src/SelectedWallet/WalletSelection/WalletSelectionScreen.tsx b/apps/wallet-mobile/src/SelectedWallet/WalletSelection/WalletSelectionScreen.tsx
index 6b273ca27f..04aef826e0 100644
--- a/apps/wallet-mobile/src/SelectedWallet/WalletSelection/WalletSelectionScreen.tsx
+++ b/apps/wallet-mobile/src/SelectedWallet/WalletSelection/WalletSelectionScreen.tsx
@@ -1,4 +1,4 @@
-import {useNavigation} from '@react-navigation/native'
+import {useFocusEffect, useNavigation} from '@react-navigation/native'
import React from 'react'
import {defineMessages, useIntl} from 'react-intl'
import {FlatList, InteractionManager, Linking, RefreshControl, StyleSheet, Text, TouchableOpacity} from 'react-native'
@@ -11,10 +11,12 @@ import {StatusBar} from '../../components/StatusBar'
import {showErrorDialog} from '../../dialogs'
import globalMessages, {errorMessages} from '../../i18n/global-messages'
import {isNightly} from '../../legacy/config'
+import {useMetrics} from '../../metrics/metricsManager'
import {useWalletNavigation} from '../../navigation'
import {COLORS} from '../../theme'
import {useWalletManager} from '../../WalletManager'
import * as HASKELL_SHELLEY from '../../yoroi-wallets/cardano/constants/mainnet/constants'
+import * as SANCHONET from '../../yoroi-wallets/cardano/constants/sanchonet/constants'
import * as HASKELL_SHELLEY_TESTNET from '../../yoroi-wallets/cardano/constants/testnet/constants'
import {InvalidState, NetworkError} from '../../yoroi-wallets/cardano/errors'
import {isJormungandr} from '../../yoroi-wallets/cardano/networks'
@@ -33,6 +35,13 @@ export const WalletSelectionScreen = () => {
const selectWalletMeta = useSetSelectedWalletMeta()
const selectWallet = useSetSelectedWallet()
const intl = useIntl()
+ const {track} = useMetrics()
+
+ useFocusEffect(
+ React.useCallback(() => {
+ track.allWalletsPageViewed()
+ }, [track]),
+ )
const {openWallet, isLoading} = useOpenWallet({
onSuccess: ([wallet, walletMeta]) => {
@@ -89,6 +98,8 @@ export const WalletSelectionScreen = () => {
+
+
@@ -197,6 +208,25 @@ const OnlyNightlyShelleyTestnetButton = () => {
)
}
+const OnlyNightlyShelleySanchonetButton = () => {
+ const navigation = useNavigation()
+ const strings = useStrings()
+
+ if (!isNightly() && !__DEV__) return null
+
+ const handleOnPress = () => {
+ navigation.navigate('new-wallet', {
+ screen: 'choose-create-restore',
+ params: {
+ networkId: SANCHONET.NETWORK_ID,
+ walletImplementationId: SANCHONET.WALLET_IMPLEMENTATION_ID,
+ },
+ })
+ }
+
+ return
+}
+
const OnlyDevButton = () => {
const navigation = useNavigation()
diff --git a/apps/wallet-mobile/src/Staking/DelegationConfirmation/DelegationConfirmation.tsx b/apps/wallet-mobile/src/Staking/DelegationConfirmation/DelegationConfirmation.tsx
index e01e60c25c..fc32409775 100644
--- a/apps/wallet-mobile/src/Staking/DelegationConfirmation/DelegationConfirmation.tsx
+++ b/apps/wallet-mobile/src/Staking/DelegationConfirmation/DelegationConfirmation.tsx
@@ -2,9 +2,9 @@
import {Balance} from '@yoroi/types'
import React, {useEffect, useState} from 'react'
import {defineMessages, useIntl} from 'react-intl'
-import {ScrollView, StyleSheet, View, ViewProps} from 'react-native'
+import {Platform, ScrollView, StyleSheet, View, ViewProps} from 'react-native'
-import {Text, ValidatedTextInput} from '../../components'
+import {KeyboardSpacer, Text, ValidatedTextInput} from '../../components'
import {ConfirmTx} from '../../components/ConfirmTx'
import {useStakePoolInfoAndHistory} from '../../Dashboard/StakePoolInfo'
import {debugWalletInfo, features} from '../../features'
@@ -114,6 +114,9 @@ export const DelegationConfirmation = () => {
chooseTransportOnConfirmation
/>
+
+ {/* hack to fix weird KeyboardAvoidingView bug in THIS SCREEN */}
+ {Platform.OS === 'ios' && }
)
}
diff --git a/apps/wallet-mobile/src/Staking/StakingCenter/StakingCenter.tsx b/apps/wallet-mobile/src/Staking/StakingCenter/StakingCenter.tsx
index a3357eda11..594c7e83ce 100644
--- a/apps/wallet-mobile/src/Staking/StakingCenter/StakingCenter.tsx
+++ b/apps/wallet-mobile/src/Staking/StakingCenter/StakingCenter.tsx
@@ -1,5 +1,5 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
-import {useNavigation} from '@react-navigation/native'
+import {useFocusEffect, useNavigation} from '@react-navigation/native'
import React from 'react'
import {defineMessages, useIntl} from 'react-intl'
import {View} from 'react-native'
@@ -13,6 +13,7 @@ import {useLanguage} from '../../i18n'
import globalMessages, {errorMessages} from '../../i18n/global-messages'
import {isNightly} from '../../legacy/config'
import {Logger} from '../../legacy/logging'
+import {useMetrics} from '../../metrics/metricsManager'
import {StakingCenterRouteNavigation} from '../../navigation'
import {useSelectedWallet} from '../../SelectedWallet'
import {getNetworkConfigById, NETWORKS} from '../../yoroi-wallets/cardano/networks'
@@ -25,6 +26,13 @@ export const StakingCenter = () => {
const {languageCode} = useLanguage()
const wallet = useSelectedWallet()
+ const {track} = useMetrics()
+
+ useFocusEffect(
+ React.useCallback(() => {
+ track.stakingCenterPageViewed()
+ }, [track]),
+ )
const [selectedPoolId, setSelectedPoolId] = React.useState()
diff --git a/apps/wallet-mobile/src/TxHistory/ActionsBanner.tsx b/apps/wallet-mobile/src/TxHistory/ActionsBanner.tsx
index 5fac11cbcb..2b442924a8 100644
--- a/apps/wallet-mobile/src/TxHistory/ActionsBanner.tsx
+++ b/apps/wallet-mobile/src/TxHistory/ActionsBanner.tsx
@@ -1,15 +1,13 @@
import {useNavigation} from '@react-navigation/native'
-import {banxaModuleMaker} from '@yoroi/banxa'
import {useSwap} from '@yoroi/swap'
import React, {ReactNode} from 'react'
import {useIntl} from 'react-intl'
-import {Linking, Platform, StyleSheet, TouchableOpacity, View} from 'react-native'
+import {StyleSheet, TouchableOpacity, View} from 'react-native'
-import {Button, Icon, Spacer, Text, useModal} from '../components'
+import {Icon, Spacer, Text} from '../components'
import {useSend} from '../features/Send/common/SendContext'
import {useSwapForm} from '../features/Swap/common/SwapFormProvider'
import {actionMessages} from '../i18n/global-messages'
-import env from '../legacy/env'
import {useMetrics} from '../metrics/metricsManager'
import {TxHistoryRouteNavigation} from '../navigation'
import {useSelectedWallet} from '../SelectedWallet'
@@ -17,7 +15,7 @@ import {COLORS} from '../theme'
import {useTokenInfo} from '../yoroi-wallets/hooks'
const ACTION_PROPS = {
- size: 32,
+ size: 24,
color: COLORS.WHITE,
}
@@ -25,7 +23,7 @@ export const ActionsBanner = ({disabled = false}: {disabled: boolean}) => {
const strings = useStrings()
const navigateTo = useNavigateTo()
const wallet = useSelectedWallet()
- const {resetForm} = useSend()
+ const {reset: resetSendState} = useSend()
const {orderData} = useSwap()
const {resetSwapForm} = useSwapForm()
const {track} = useMetrics()
@@ -37,56 +35,10 @@ export const ActionsBanner = ({disabled = false}: {disabled: boolean}) => {
wallet,
tokenId: orderData.amounts.buy.tokenId,
})
- const {openModal, closeModal} = useModal()
-
- const handleOnBuy = () => {
- track.walletPageExchangeClicked()
-
- const modalHeight = 320
- const modalTextFormattingOptions: BuyInfoFormattingOptions = {
- b: (text) => {text},
- textComponent: (text) => {text},
- }
-
- openModal(
- strings.buyTitle,
-
- {strings.buyInfo(modalTextFormattingOptions)}
-
-
-
- ,
- modalHeight,
- )
- }
const handleOnSend = () => {
navigateTo.send()
- resetForm()
+ resetSendState()
}
const handleOnSwap = () => {
@@ -104,12 +56,32 @@ export const ActionsBanner = ({disabled = false}: {disabled: boolean}) => {
navigateTo.swap()
}
+ const handleExchange = () => {
+ track.walletPageExchangeClicked()
+ navigateTo.exchange()
+ }
+
return (
+
+
+
+
+
+ {strings.receiveLabel}
+
+
+ {!wallet.isReadOnly && }
+
{!wallet.isReadOnly && (
{
)}
- {!wallet.isReadOnly && }
-
-
-
-
-
-
- {strings.receiveLabel}
-
-
{!wallet.isReadOnly && (
<>
-
+
{
testID="swapButton"
disabled={disabled}
>
-
+
{strings.swapLabel}
-
+
-
+
- {strings.buyLabel}
+ {strings.exchange}
>
)}
@@ -182,9 +139,7 @@ export const ActionsBanner = ({disabled = false}: {disabled: boolean}) => {
}
const styles = StyleSheet.create({
- banner: {
- backgroundColor: COLORS.BACKGROUND_GRAY,
- },
+ banner: {},
centralized: {
alignItems: 'center',
justifyContent: 'center',
@@ -196,10 +151,10 @@ const styles = StyleSheet.create({
actionIcon: {
justifyContent: 'center',
alignItems: 'center',
- height: 42,
- width: 42,
- borderRadius: 20,
- backgroundColor: '#3154CB',
+ height: 56,
+ width: 56,
+ borderRadius: 28,
+ backgroundColor: '#4B6DDE',
},
actionLabel: {
paddingTop: 8,
@@ -209,23 +164,10 @@ const styles = StyleSheet.create({
fontWeight: '500',
lineHeight: 18,
},
- buyInfo: {
- fontSize: 16,
- color: '#000000',
- fontFamily: 'Rubik-Regular',
- fontWeight: '400',
- lineHeight: 24,
- },
- bold: {
- fontWeight: '500',
- fontFamily: 'Rubik-Medium',
- },
+
disabled: {
opacity: 0.5,
},
- buyModalContent: {
- flex: 1,
- },
})
const useStrings = () => {
@@ -240,6 +182,7 @@ const useStrings = () => {
proceed: intl.formatMessage(actionMessages.proceed),
swapLabel: intl.formatMessage(actionMessages.swap),
messageBuy: intl.formatMessage(actionMessages.soon),
+ exchange: intl.formatMessage(actionMessages.exchange),
}
}
@@ -252,5 +195,6 @@ const useNavigateTo = () => {
send: () => navigation.navigate('send-start-tx'),
receive: () => navigation.navigate('receive'),
swap: () => navigation.navigate('swap-start-swap'),
+ exchange: () => navigation.navigate('rampOnOff-start-rampOnOff'),
}
}
diff --git a/apps/wallet-mobile/src/TxHistory/AssetList/AssetList.tsx b/apps/wallet-mobile/src/TxHistory/AssetList/AssetList.tsx
index 67b42c37f4..d8347080a7 100644
--- a/apps/wallet-mobile/src/TxHistory/AssetList/AssetList.tsx
+++ b/apps/wallet-mobile/src/TxHistory/AssetList/AssetList.tsx
@@ -1,3 +1,4 @@
+import {useFocusEffect} from '@react-navigation/native'
import {FlashList, FlashListProps} from '@shopify/flash-list'
import {Balance} from '@yoroi/types'
import React from 'react'
@@ -8,6 +9,7 @@ import {AmountItem, AmountItemProps} from '../../components/AmountItem/AmountIte
import {Spacer} from '../../components/Spacer'
import {usePrivacyMode} from '../../features/Settings/PrivacyMode/PrivacyMode'
import globalMessages, {actionMessages} from '../../i18n/global-messages'
+import {useMetrics} from '../../metrics/metricsManager'
import {useSelectedWallet} from '../../SelectedWallet'
import {sortTokenInfos} from '../../utils'
import {getNetworkConfigById} from '../../yoroi-wallets/cardano/networks'
@@ -25,6 +27,13 @@ export const AssetList = (props: Props) => {
const strings = useStrings()
const wallet = useSelectedWallet()
const balances = useBalances(wallet)
+ const {track} = useMetrics()
+
+ useFocusEffect(
+ React.useCallback(() => {
+ track.assetsPageViewed()
+ }, [track]),
+ )
const handleOnPressNFTs = () => Alert.alert(strings.soon, strings.soon)
const handleOnPressTokens = () => Alert.alert(strings.soon, strings.soon)
diff --git a/apps/wallet-mobile/src/TxHistory/BalanceBanner.tsx b/apps/wallet-mobile/src/TxHistory/BalanceBanner.tsx
index d9893f7f4a..f11d2350ca 100644
--- a/apps/wallet-mobile/src/TxHistory/BalanceBanner.tsx
+++ b/apps/wallet-mobile/src/TxHistory/BalanceBanner.tsx
@@ -63,9 +63,7 @@ const Balance = ({isPrivacyOff}: {isPrivacyOff: boolean}) => {
const Row = ({children}: {children: React.ReactNode}) => {children}
const styles = StyleSheet.create({
- banner: {
- backgroundColor: COLORS.BACKGROUND_GRAY,
- },
+ banner: {},
walletIcon: {
height: 40,
width: 40,
diff --git a/apps/wallet-mobile/src/TxHistory/LockedDeposit.tsx b/apps/wallet-mobile/src/TxHistory/LockedDeposit.tsx
index c1b39664c8..8ab6ef51a1 100644
--- a/apps/wallet-mobile/src/TxHistory/LockedDeposit.tsx
+++ b/apps/wallet-mobile/src/TxHistory/LockedDeposit.tsx
@@ -1,6 +1,6 @@
import React from 'react'
import {useIntl} from 'react-intl'
-import {View} from 'react-native'
+import {StyleSheet, View} from 'react-native'
import {Boundary, Spacer, Text} from '../components'
import {usePrivacyMode} from '../features/Settings/PrivacyMode/PrivacyMode'
@@ -43,19 +43,19 @@ const FormattedAmount = ({amount}: {amount: string}) => {
- {amount}
+ {amount}
)
}
const Row = ({children}: {children: React.ReactNode}) => {
- return {children}
+ return {children}
}
const Label = () => {
const strings = useStrings()
- return {strings.lockedDeposit}:
+ return {strings.lockedDeposit}:
}
const useStrings = () => {
@@ -65,3 +65,17 @@ const useStrings = () => {
lockedDeposit: intl.formatMessage(globalMessages.lockedDeposit),
}
}
+
+const styles = StyleSheet.create({
+ root: {
+ flexDirection: 'row',
+ justifyContent: 'center',
+ alignItems: 'center',
+ },
+ label: {
+ color: '#6B7384',
+ fontSize: 14,
+ fontWeight: '400',
+ lineHeight: 22,
+ },
+})
diff --git a/apps/wallet-mobile/src/TxHistory/TxDetails/TxDetails.tsx b/apps/wallet-mobile/src/TxHistory/TxDetails/TxDetails.tsx
index 0bdd7848ec..80f55237b3 100644
--- a/apps/wallet-mobile/src/TxHistory/TxDetails/TxDetails.tsx
+++ b/apps/wallet-mobile/src/TxHistory/TxDetails/TxDetails.tsx
@@ -235,7 +235,7 @@ type AddressEntryProps = {
address: string
path: string
isHighlighted: boolean
- showModalForAddress: (string) => void
+ showModalForAddress: (text: string) => void
}
const AddressEntry = ({address, path, isHighlighted, showModalForAddress}: AddressEntryProps) => {
const text = `(${path}) ${address}`
@@ -256,11 +256,11 @@ const getShownAddresses = (
internalAddressIndex: Record,
externalAddressIndex: Record,
) => {
- const isMyReceive = (address) => externalAddressIndex[address] != null
- const isMyChange = (address) => internalAddressIndex[address] != null
- const isMyAddress = (address) => isMyReceive(address) || isMyChange(address)
+ const isMyReceive = (address: string) => externalAddressIndex[address] != null
+ const isMyChange = (address: string) => internalAddressIndex[address] != null
+ const isMyAddress = (address: string) => isMyReceive(address) || isMyChange(address)
- const getPath = (address) => {
+ const getPath = (address: string) => {
if (isMyReceive(address)) {
return intl.formatMessage(messages.addressPrefixReceive, {
idx: externalAddressIndex[address],
@@ -276,23 +276,23 @@ const getShownAddresses = (
const {isHighlightedFrom, isHighlightedTo, filterTo} = {
SENT: {
- isHighlightedFrom: (_address) => false,
- isHighlightedTo: (address) => !isMyAddress(address),
+ isHighlightedFrom: (_address: string) => false,
+ isHighlightedTo: (address: string) => !isMyAddress(address),
filterTo: null,
},
RECEIVED: {
- isHighlightedFrom: (_address) => false,
- isHighlightedTo: (address) => isMyAddress(address),
- filterTo: (address) => isMyAddress(address),
+ isHighlightedFrom: (_address: string) => false,
+ isHighlightedTo: (address: string) => isMyAddress(address),
+ filterTo: (address: string) => isMyAddress(address),
},
SELF: {
- isHighlightedFrom: (_address) => false,
- isHighlightedTo: (address) => !isMyChange(address),
+ isHighlightedFrom: (_address: string) => false,
+ isHighlightedTo: (address: string) => !isMyChange(address),
filterTo: null,
},
MULTI: {
- isHighlightedFrom: (address) => isMyAddress(address),
- isHighlightedTo: (address) => isMyAddress(address),
+ isHighlightedFrom: (address: string) => isMyAddress(address),
+ isHighlightedTo: (address: string) => isMyAddress(address),
filterTo: null,
},
}[transaction.direction] as any
@@ -339,8 +339,8 @@ const useStrings = () => {
memo: intl.formatMessage(messages.memo),
transactionId: intl.formatMessage(messages.transactionId),
txAssuranceLevel: intl.formatMessage(messages.txAssuranceLevel),
- confirmations: (cnt) => intl.formatMessage(messages.confirmations, {cnt}),
- omittedCount: (cnt) => intl.formatMessage(messages.omittedCount, {cnt}),
+ confirmations: (cnt: number) => intl.formatMessage(messages.confirmations, {cnt}),
+ omittedCount: (cnt: number) => intl.formatMessage(messages.omittedCount, {cnt}),
openInExplorer: intl.formatMessage(messages.openInExplorer),
SENT: intl.formatMessage(txTypeMessages.SENT),
RECEIVED: intl.formatMessage(txTypeMessages.RECEIVED),
diff --git a/apps/wallet-mobile/src/TxHistory/TxHistory.tsx b/apps/wallet-mobile/src/TxHistory/TxHistory.tsx
index 4b10e09803..5d90e9f653 100644
--- a/apps/wallet-mobile/src/TxHistory/TxHistory.tsx
+++ b/apps/wallet-mobile/src/TxHistory/TxHistory.tsx
@@ -2,6 +2,7 @@ import {useFocusEffect} from '@react-navigation/native'
import React, {useState} from 'react'
import {defineMessages, useIntl} from 'react-intl'
import {LayoutAnimation, StyleSheet, TouchableOpacity, View} from 'react-native'
+import Animated from 'react-native-reanimated'
import infoIcon from '../assets/img/icon/info-light-green.png'
import {Boundary, ResetErrorRef, Spacer, StatusBar, Text} from '../components'
@@ -16,6 +17,7 @@ import {BalanceBanner} from './BalanceBanner'
import {CollapsibleHeader} from './CollapsibleHeader'
import {LockedDeposit} from './LockedDeposit'
import {TxHistoryList} from './TxHistoryList'
+import {useAnimatedTxHistory} from './useAnimatedTxHistory'
import {useOnScroll} from './useOnScroll'
import {WarningBanner} from './WarningBanner'
@@ -28,6 +30,9 @@ export const TxHistory = () => {
const [showWarning, setShowWarning] = useState(isByron(wallet.walletImplementationId))
const [activeTab, setActiveTab] = useState('transactions')
+
+ const {translateStyles} = useAnimatedTxHistory()
+
const onSelectTab = (tab: Tab) => {
LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut)
setActiveTab(tab)
@@ -49,16 +54,16 @@ export const TxHistory = () => {
return (
-
+
-
+
-
+
{
setExpanded(true)
@@ -81,7 +86,7 @@ export const TxHistory = () => {
-
+
@@ -111,12 +116,14 @@ export const TxHistory = () => {
-
+
)
}
-const Tabs = ({children}: {children: React.ReactNode}) => {children}
+const Tabs = ({children, expanded}: {children: React.ReactNode; expanded: boolean}) => (
+ {children}
+)
const Tab = ({
onPress,
active,
@@ -164,7 +171,7 @@ const warningBannerMessages = defineMessages({
const styles = StyleSheet.create({
scrollView: {
flex: 1,
- backgroundColor: COLORS.BACKGROUND_GRAY,
+ backgroundColor: '#E1EAF6',
},
container: {
flexDirection: 'column',
@@ -179,8 +186,15 @@ const styles = StyleSheet.create({
alignItems: 'center',
justifyContent: 'center',
},
+ borderRadiusNone: {
+ borderTopLeftRadius: 0,
+ borderTopRightRadius: 0,
+ },
tabs: {
flexDirection: 'row',
+ backgroundColor: '#fff',
+ borderTopLeftRadius: 24,
+ borderTopRightRadius: 24,
},
tab: {
alignItems: 'center',
@@ -212,7 +226,5 @@ const styles = StyleSheet.create({
flex: 1,
paddingTop: 8,
backgroundColor: '#fff',
- borderTopLeftRadius: 8,
- borderTopRightRadius: 8,
},
})
diff --git a/apps/wallet-mobile/src/TxHistory/TxHistoryList/ActionsBanner/ActionsBanner.tsx b/apps/wallet-mobile/src/TxHistory/TxHistoryList/ActionsBanner/ActionsBanner.tsx
index 27d4a5de29..e9293b56ab 100644
--- a/apps/wallet-mobile/src/TxHistory/TxHistoryList/ActionsBanner/ActionsBanner.tsx
+++ b/apps/wallet-mobile/src/TxHistory/TxHistoryList/ActionsBanner/ActionsBanner.tsx
@@ -3,6 +3,7 @@ import {StyleSheet, TouchableOpacity, View} from 'react-native'
import {Icon} from '../../../components'
import {features} from '../../../features'
+import {LockedDeposit} from '../../LockedDeposit'
type Props = {
onExport: () => void
@@ -15,13 +16,15 @@ export const ActionsBanner = (props: Props) => {
{features.txHistory.export && (
-
+
)}
+
+
{features.txHistory.search && (
-
+
)}
@@ -35,5 +38,6 @@ const styles = StyleSheet.create({
justifyContent: 'space-between',
flexDirection: 'row',
paddingBottom: 2,
+ alignItems: 'center',
},
})
diff --git a/apps/wallet-mobile/src/TxHistory/TxHistoryList/EmptyHistory.tsx b/apps/wallet-mobile/src/TxHistory/TxHistoryList/EmptyHistory.tsx
index 56ce4bbd74..851cff45b1 100644
--- a/apps/wallet-mobile/src/TxHistory/TxHistoryList/EmptyHistory.tsx
+++ b/apps/wallet-mobile/src/TxHistory/TxHistoryList/EmptyHistory.tsx
@@ -10,11 +10,15 @@ export const EmptyHistory = () => {
return (
+
+
{strings.noTransactions}
+
+
)
}
@@ -23,7 +27,6 @@ const styles = StyleSheet.create({
empty: {
justifyContent: 'center',
alignItems: 'center',
- paddingTop: 122,
},
emptyText: {
fontSize: 16,
diff --git a/apps/wallet-mobile/src/TxHistory/TxHistoryList/TxHistoryList.tsx b/apps/wallet-mobile/src/TxHistory/TxHistoryList/TxHistoryList.tsx
index b65d4c7c68..72c0308bcb 100644
--- a/apps/wallet-mobile/src/TxHistory/TxHistoryList/TxHistoryList.tsx
+++ b/apps/wallet-mobile/src/TxHistory/TxHistoryList/TxHistoryList.tsx
@@ -1,19 +1,17 @@
-import {useNavigation} from '@react-navigation/native'
+import {useFocusEffect, useNavigation} from '@react-navigation/native'
import {isString} from '@yoroi/common'
import _ from 'lodash'
import React from 'react'
import {useIntl} from 'react-intl'
-import {Alert, Platform, SectionList, SectionListProps, StyleSheet, View} from 'react-native'
+import {Platform, SectionList, SectionListProps, StyleSheet, View} from 'react-native'
import {Spacer, Text} from '../../components'
-import {features} from '../../features'
-import {actionMessages} from '../../i18n/global-messages'
+import {ShowBuyBanner} from '../../features/RampOnOff/common/ShowBuyBanner/ShowBuyBanner'
import {formatDateRelative} from '../../legacy/format'
+import {useMetrics} from '../../metrics/metricsManager'
import {useSelectedWallet} from '../../SelectedWallet'
import {useTransactionInfos} from '../../yoroi-wallets/hooks'
import {TransactionInfo} from '../../yoroi-wallets/types'
-import {ActionsBanner} from './ActionsBanner'
-import {EmptyHistory} from './EmptyHistory'
import {TxHistoryListItem} from './TxHistoryListItem'
type ListProps = SectionListProps
@@ -22,30 +20,35 @@ type Props = Partial & {
onScroll: ListProps['onScroll']
}
export const TxHistoryList = (props: Props) => {
- const strings = useStrings()
const key = useRemountOnFocusHack()
const wallet = useSelectedWallet()
+ const {track} = useMetrics()
+
+ useFocusEffect(
+ React.useCallback(() => {
+ track.transactionsPageViewed()
+ }, [track]),
+ )
+
const transactionsInfo = useTransactionInfos(wallet)
const groupedTransactions = getTransactionsByDate(transactionsInfo)
- const handleExport = () => Alert.alert(strings.soon, strings.soon)
- const handleSearch = () => Alert.alert(strings.soon, strings.soon)
-
return (
- {(features.txHistory.export || features.txHistory.search) && (
-
- )}
-
}
+ ListHeaderComponent={}
+ contentContainerStyle={{
+ paddingHorizontal: 18,
+ flexGrow: 1,
+ height: 'auto',
+ }}
renderItem={({item}) => }
ItemSeparatorComponent={() => }
renderSectionHeader={({section: {data}}) => }
sections={groupedTransactions}
+ renderSectionFooter={() => }
keyExtractor={(item) => item.id}
stickySectionHeadersEnabled={false}
nestedScrollEnabled={true}
@@ -107,16 +110,7 @@ const styles = StyleSheet.create({
flex: 1,
},
dayHeaderRoot: {
- paddingTop: 16,
- paddingBottom: 8,
+ paddingBottom: 4,
paddingHorizontal: 20,
},
})
-
-const useStrings = () => {
- const intl = useIntl()
-
- return {
- soon: intl.formatMessage(actionMessages.soon),
- }
-}
diff --git a/apps/wallet-mobile/src/TxHistory/TxHistoryList/TxHistoryListItem.tsx b/apps/wallet-mobile/src/TxHistory/TxHistoryList/TxHistoryListItem.tsx
index dd718fd460..510d330392 100644
--- a/apps/wallet-mobile/src/TxHistory/TxHistoryList/TxHistoryListItem.tsx
+++ b/apps/wallet-mobile/src/TxHistory/TxHistoryList/TxHistoryListItem.tsx
@@ -188,10 +188,13 @@ const messages = defineMessages({
},
})
+type AddressIndexRecord = Record
+
const filtersTxIO = (address: string) => {
- const isMyReceive = (extAddrIdx) => extAddrIdx[address] != null
- const isMyChange = (intAddrIdx) => intAddrIdx[address] != null
- const isMyAddress = (extAddrIdx, intAddrIdx) => isMyReceive(extAddrIdx) || isMyChange(intAddrIdx)
+ const isMyReceive = (extAddrIdx: AddressIndexRecord) => extAddrIdx[address] != null
+ const isMyChange = (intAddrIdx: AddressIndexRecord) => intAddrIdx[address] != null
+ const isMyAddress = (extAddrIdx: AddressIndexRecord, intAddrIdx: AddressIndexRecord) =>
+ isMyReceive(extAddrIdx) || isMyChange(intAddrIdx)
return {
isMyReceive,
isMyChange,
@@ -199,7 +202,7 @@ const filtersTxIO = (address: string) => {
}
}
-const getTxIOMyWallet = (txIO: Array, extAddrIdx, intAddrIdx) => {
+const getTxIOMyWallet = (txIO: Array, extAddrIdx: AddressIndexRecord, intAddrIdx: AddressIndexRecord) => {
const io = _.uniq(txIO).map(({address, assets}) => ({
address,
assets,
diff --git a/apps/wallet-mobile/src/TxHistory/TxHistoryNavigator.tsx b/apps/wallet-mobile/src/TxHistory/TxHistoryNavigator.tsx
index 0d99522307..f69e9476c1 100644
--- a/apps/wallet-mobile/src/TxHistory/TxHistoryNavigator.tsx
+++ b/apps/wallet-mobile/src/TxHistory/TxHistoryNavigator.tsx
@@ -1,5 +1,8 @@
+import {init} from '@emurgo/cross-csl-mobile'
import {useNavigation} from '@react-navigation/native'
import {createStackNavigator} from '@react-navigation/stack'
+import {useStorage} from '@yoroi/common'
+import {resolverApiMaker, resolverManagerMaker, ResolverProvider, resolverStorageMaker} from '@yoroi/resolver'
import {
milkTokenId,
supportedProviders,
@@ -8,7 +11,7 @@ import {
SwapProvider,
swapStorageMaker,
} from '@yoroi/swap'
-import {Swap} from '@yoroi/types'
+import {Resolver, Swap} from '@yoroi/types'
import React from 'react'
import {defineMessages, useIntl} from 'react-intl'
import {StyleSheet, Text, TouchableOpacity, TouchableOpacityProps, View, ViewProps} from 'react-native'
@@ -17,6 +20,7 @@ import {Boundary, Icon, Spacer} from '../components'
import {claimApiMaker} from '../features/Claim/module/api'
import {ClaimProvider} from '../features/Claim/module/ClaimProvider'
import {ShowSuccessScreen} from '../features/Claim/useCases/ShowSuccessScreen'
+import {RampOnOffScreen} from '../features/RampOnOff/RampOnOffNavigator'
import {CodeScannerButton} from '../features/Scan/common/CodeScannerButton'
import {ScanCodeScreen} from '../features/Scan/useCases/ScanCodeScreen'
import {ShowCameraPermissionDeniedScreen} from '../features/Scan/useCases/ShowCameraPermissionDeniedScreen/ShowCameraPermissionDeniedScreen'
@@ -39,6 +43,7 @@ import {
} from '../features/Swap/useCases'
import {SelectBuyTokenFromListScreen} from '../features/Swap/useCases/StartSwapScreen/CreateOrder/EditBuyAmount/SelectBuyTokenFromListScreen/SelectBuyTokenFromListScreen'
import {SelectSellTokenFromListScreen} from '../features/Swap/useCases/StartSwapScreen/CreateOrder/EditSellAmount/SelectSellTokenFromListScreen/SelectSellTokenFromListScreen'
+import {CONFIG} from '../legacy/config'
import {
BackButton,
defaultStackNavigationOptions,
@@ -50,6 +55,7 @@ import {ReceiveScreen} from '../Receive/ReceiveScreen'
import {useSelectedWallet} from '../SelectedWallet'
import {COLORS} from '../theme'
import {useFrontendFees, useStakingKey, useWalletName} from '../yoroi-wallets/hooks'
+import {isMainnetNetworkId} from '../yoroi-wallets/utils'
import {ModalInfo} from './ModalInfo'
import {TxDetails} from './TxDetails'
import {TxHistory} from './TxHistory'
@@ -61,6 +67,7 @@ export const TxHistoryNavigator = () => {
const strings = useStrings()
const wallet = useSelectedWallet()
const walletName = useWalletName(wallet)
+ const storage = useStorage()
// modal
const [isModalInfoVisible, setIsModalInfoVisible] = React.useState(false)
@@ -69,12 +76,12 @@ export const TxHistoryNavigator = () => {
// swap
const {frontendFees} = useFrontendFees(wallet)
- const aggregatorTokenId = wallet.networkId !== 300 ? milkTokenId.mainnet : milkTokenId.preprod
+ const aggregatorTokenId = isMainnetNetworkId(wallet.networkId) ? milkTokenId.mainnet : milkTokenId.preprod
const stakingKey = useStakingKey(wallet)
const swapManager = React.useMemo(() => {
const swapStorage = swapStorageMaker()
const swapApi = swapApiMaker({
- isMainnet: wallet.networkId !== 300,
+ isMainnet: isMainnetNetworkId(wallet.networkId),
stakingKey,
primaryTokenId: wallet.primaryTokenInfo.id,
supportedProviders,
@@ -83,6 +90,21 @@ export const TxHistoryNavigator = () => {
return swapManagerMaker({swapStorage, swapApi, frontendFeeTiers, aggregator, aggregatorTokenId})
}, [wallet.networkId, wallet.primaryTokenInfo.id, stakingKey, frontendFees, aggregatorTokenId])
+ // resolver
+ const resolverManager = React.useMemo(() => {
+ const resolverApi = resolverApiMaker({
+ apiConfig: {
+ [Resolver.NameServer.Unstoppable]: {
+ apiKey: CONFIG.UNSTOPPABLE_API_KEY,
+ },
+ },
+ cslFactory: init,
+ })
+ const walletStorage = storage.join(`wallet/${wallet.id}/`)
+ const resolverStorage = resolverStorageMaker({storage: walletStorage})
+ return resolverManagerMaker(resolverStorage, resolverApi)
+ }, [storage, wallet.id])
+
// claim
const claimApi = React.useMemo(() => {
return claimApiMaker({
@@ -97,218 +119,233 @@ export const TxHistoryNavigator = () => {
return (
-
-
-
-
-
-
- {() => (
-
-
-
- )}
-
-
- ,
- headerStyle: {
- elevation: 0,
- shadowOpacity: 0,
- backgroundColor: '#fff',
- },
- }}
- />
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {() => (
-
-
-
- )}
-
-
-
- {() => (
-
-
-
- )}
-
-
-
- {() => (
-
-
-
- )}
-
-
-
+
+
+
- {() => (
-
-
-
- )}
-
-
-
-
-
-
-
-
- ,
- }}
- />
-
-
-
- null}}
- />
-
-
-
- {strings.receiveInfoText}
-
-
-
+
+
+
+ {() => (
+
+
+
+ )}
+
+
+ ,
+ headerStyle: {
+ elevation: 0,
+ shadowOpacity: 0,
+ backgroundColor: '#fff',
+ },
+ }}
+ />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {() => (
+
+
+
+ )}
+
+
+
+ {() => (
+
+
+
+ )}
+
+
+
+ {() => (
+
+
+
+ )}
+
+
+
+ {() => (
+
+
+
+ )}
+
+
+
+
+
+
+
+
+ ,
+ }}
+ />
+
+
+
+ null}}
+ />
+
+
+
+ {strings.receiveInfoText}
+
+
+
+
)
@@ -418,7 +455,7 @@ const ModalInfoIconButton = (props: TouchableOpacityProps) => {
const SettingsIconButton = (props: TouchableOpacityProps) => {
return (
-
+
)
}
@@ -429,12 +466,12 @@ const HeaderRightHistory = React.memo(() => {
const navigation = useNavigation()
return (
-
+
{!wallet.isReadOnly && (
<>
navigation.navigate('scan-start', {insideFeature: 'scan'})}
- color={COLORS.ACTION_GRAY}
+ color={COLORS.BLACK}
/>
diff --git a/apps/wallet-mobile/src/TxHistory/useAnimatedTxHistory.ts b/apps/wallet-mobile/src/TxHistory/useAnimatedTxHistory.ts
new file mode 100644
index 0000000000..48dfdcca7d
--- /dev/null
+++ b/apps/wallet-mobile/src/TxHistory/useAnimatedTxHistory.ts
@@ -0,0 +1,44 @@
+import {useNavigation} from '@react-navigation/native'
+import React from 'react'
+import {useAnimatedStyle, useSharedValue, withSpring} from 'react-native-reanimated'
+
+const initialTranslateYOffset = -2000
+const animatedConfig = {
+ mass: 1,
+ damping: 30,
+ stiffness: 250,
+ overshootClamping: false,
+ restDisplacementThreshold: 0.01,
+ restSpeedThreshold: 2,
+}
+
+const useAnimatedTxHistory = () => {
+ const navigation = useNavigation()
+
+ const translateYOffset = useSharedValue(initialTranslateYOffset)
+ const translateStyles = useAnimatedStyle(() => ({
+ transform: [{translateY: translateYOffset.value}],
+ }))
+
+ React.useLayoutEffect(() => {
+ translateYOffset.value = withSpring(0, animatedConfig)
+
+ const cleanUpFocus = navigation.addListener('focus', () => {
+ translateYOffset.value = withSpring(0, animatedConfig)
+ })
+
+ const cleanUpBlur = navigation.addListener('blur', () => {
+ translateYOffset.value = withSpring(initialTranslateYOffset, animatedConfig)
+ })
+
+ return () => {
+ cleanUpFocus()
+ cleanUpBlur()
+ }
+ // eslint-disable-next-line react-hooks/exhaustive-deps
+ }, [])
+
+ return {translateStyles}
+}
+
+export {useAnimatedTxHistory}
diff --git a/apps/wallet-mobile/src/WalletInit/CheckNanoX/CheckNanoXScreen.tsx b/apps/wallet-mobile/src/WalletInit/CheckNanoX/CheckNanoXScreen.tsx
index a271c7dd36..8318bb09ba 100644
--- a/apps/wallet-mobile/src/WalletInit/CheckNanoX/CheckNanoXScreen.tsx
+++ b/apps/wallet-mobile/src/WalletInit/CheckNanoX/CheckNanoXScreen.tsx
@@ -1,7 +1,7 @@
import {RouteProp, useNavigation, useRoute} from '@react-navigation/native'
import React from 'react'
import {defineMessages, useIntl} from 'react-intl'
-import {Image, Platform, ScrollView, StyleSheet, View} from 'react-native'
+import {Image, Platform, ScrollView, StyleSheet, View, ViewProps} from 'react-native'
import {SafeAreaView} from 'react-native-safe-area-context'
import image from '../../assets/img/ledger_1.png'
@@ -56,7 +56,7 @@ export const CheckNanoXScreen = () => {
)
}
-const Actions = (props) =>
+const Actions = (props: ViewProps) =>
const messages = defineMessages({
introline: {
diff --git a/apps/wallet-mobile/src/WalletInit/ConnectNanoX/ConnectNanoXScreen.tsx b/apps/wallet-mobile/src/WalletInit/ConnectNanoX/ConnectNanoXScreen.tsx
index 3c54927888..47f4e0c215 100644
--- a/apps/wallet-mobile/src/WalletInit/ConnectNanoX/ConnectNanoXScreen.tsx
+++ b/apps/wallet-mobile/src/WalletInit/ConnectNanoX/ConnectNanoXScreen.tsx
@@ -12,7 +12,7 @@ import LocalizableError from '../../i18n/LocalizableError'
import {Logger} from '../../legacy/logging'
import {WalletInitRouteNavigation, WalletInitRoutes} from '../../navigation'
import {getHWDeviceInfo} from '../../yoroi-wallets/cardano/hw'
-import {DeviceId, DeviceObj} from '../../yoroi-wallets/hw'
+import {DeviceId, DeviceObj, HWDeviceInfo} from '../../yoroi-wallets/hw'
import {Device, NetworkId, WalletImplementationId} from '../../yoroi-wallets/types'
export type Params = {
@@ -32,14 +32,14 @@ export const ConnectNanoXScreen = ({defaultDevices}: Props) => {
const route = useRoute>()
const {walletImplementationId, useUSB, networkId} = route.params
- const onSuccess = (hwDeviceInfo) =>
+ const onSuccess = (hwDeviceInfo: HWDeviceInfo) =>
navigation.navigate('save-nano-x', {
hwDeviceInfo,
networkId,
walletImplementationId,
})
- const onError = (error) => {
+ const onError = (error: Error) => {
if (error instanceof LocalizableError) {
showErrorDialog(errorMessages.generalLocalizableError, intl, {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
diff --git a/apps/wallet-mobile/src/WalletInit/ImportReadOnlyWallet/ImportReadOnlyWalletScreen.tsx b/apps/wallet-mobile/src/WalletInit/ImportReadOnlyWallet/ImportReadOnlyWalletScreen.tsx
index 741ac1db8a..5ce033a2bc 100644
--- a/apps/wallet-mobile/src/WalletInit/ImportReadOnlyWallet/ImportReadOnlyWalletScreen.tsx
+++ b/apps/wallet-mobile/src/WalletInit/ImportReadOnlyWallet/ImportReadOnlyWalletScreen.tsx
@@ -86,7 +86,7 @@ const useStrings = () => {
return {
paragraph: intl.formatMessage(messages.paragraph),
line1: intl.formatMessage(messages.line1),
- line2: (options) => intl.formatMessage(messages.line2, options),
+ line2: (options: {buttonType: string}) => intl.formatMessage(messages.line2, options),
buttonType: intl.formatMessage(messages.buttonType),
}
}
diff --git a/apps/wallet-mobile/src/WalletInit/MnemonicCheck/MnemonicCheckScreen.stories.tsx b/apps/wallet-mobile/src/WalletInit/MnemonicCheck/MnemonicCheckScreen.stories.tsx
index 5123db5edd..579ed03e0e 100644
--- a/apps/wallet-mobile/src/WalletInit/MnemonicCheck/MnemonicCheckScreen.stories.tsx
+++ b/apps/wallet-mobile/src/WalletInit/MnemonicCheck/MnemonicCheckScreen.stories.tsx
@@ -84,7 +84,7 @@ storiesOf('MnemonicCheckScreen', module)
walletManager={
{
...walletManager,
- createWallet: (...args) => {
+ createWallet: (...args: unknown[]) => {
action('create wallet')(...args)
throw new NetworkError()
},
diff --git a/apps/wallet-mobile/src/WalletInit/MnemonicCheck/MnemonicCheckScreen.tsx b/apps/wallet-mobile/src/WalletInit/MnemonicCheck/MnemonicCheckScreen.tsx
index ad7509164d..14b04d611e 100644
--- a/apps/wallet-mobile/src/WalletInit/MnemonicCheck/MnemonicCheckScreen.tsx
+++ b/apps/wallet-mobile/src/WalletInit/MnemonicCheck/MnemonicCheckScreen.tsx
@@ -11,15 +11,6 @@ import {useWalletNavigation, WalletInitRoutes} from '../../navigation'
import {COLORS} from '../../theme'
import {NetworkError} from '../../yoroi-wallets/cardano/errors'
import {useCreateWallet} from '../../yoroi-wallets/hooks'
-import {NetworkId, WalletImplementationId} from '../../yoroi-wallets/types'
-
-export type Params = {
- mnemonic: string
- password: string
- name: string
- networkId: NetworkId
- walletImplementationId: WalletImplementationId
-}
export const MnemonicCheckScreen = () => {
const strings = useStrings()
@@ -111,18 +102,14 @@ const MnemonicInput = ({userEntries, error, onPress}: MnemonicInputProps) => {
const Instructions = () => {
const strings = useStrings()
- return (
-
- {strings.instructions}
-
- )
+ return {strings.instructions}
}
const ErrorMessage = ({visible}: {visible: boolean}) => {
const strings = useStrings()
return (
-
+
{strings.mnemonicWordsInputInvalidPhrase}
)
@@ -133,6 +120,7 @@ type WordBadgesProps = {
userEntries: Array
onPress: (wordEntry: Entry) => void
}
+
const WordBadges = ({mnemonicEntries, userEntries, onPress}: WordBadgesProps) => {
const isWordUsed = (entryId: number) => userEntries.some((entry) => entry.id === entryId)
@@ -197,33 +185,26 @@ const styles = StyleSheet.create({
safeAreaView: {
backgroundColor: COLORS.WHITE,
flex: 1,
+ paddingHorizontal: 16,
},
scrollViewContentContainer: {
- paddingHorizontal: 16,
paddingBottom: 16,
},
- instructions: {
- paddingHorizontal: 16,
- },
recoveryPhrase: {
- height: 26 * 7,
- paddingHorizontal: 16,
- },
- recoveryPhraseOutline: {
- flex: 1,
+ padding: 8,
+ minHeight: 182,
borderRadius: 8,
borderColor: COLORS.DARK_GRAY,
borderWidth: 1,
+ overflow: 'hidden',
+ },
+ recoveryPhraseOutline: {
flexDirection: 'row',
flexWrap: 'wrap',
- padding: 8,
},
recoveryPhraseError: {
borderColor: COLORS.RED,
},
- error: {
- paddingHorizontal: 16,
- },
errorMessage: {
color: COLORS.ERROR_TEXT_COLOR,
},
@@ -234,7 +215,7 @@ const styles = StyleSheet.create({
},
buttons: {
flexDirection: 'row',
- padding: 16,
+ paddingVertical: 16,
},
confirmButton: {
paddingLeft: 12,
diff --git a/apps/wallet-mobile/src/WalletInit/MnemonicInput/MnemonicInput.tsx b/apps/wallet-mobile/src/WalletInit/MnemonicInput/MnemonicInput.tsx
index fb9b31ca98..6b801cca26 100644
--- a/apps/wallet-mobile/src/WalletInit/MnemonicInput/MnemonicInput.tsx
+++ b/apps/wallet-mobile/src/WalletInit/MnemonicInput/MnemonicInput.tsx
@@ -171,7 +171,7 @@ const normalizeText = (text: string) => {
const getMatchingWords = (targetWord: string) =>
(wordlists.EN as Array).filter((word) => word.startsWith(normalizeText(targetWord)))
-const useAutoFocus = (ref) =>
+const useAutoFocus = (ref: React.RefObject) =>
React.useEffect(() => {
const timeout = setTimeout(() => ref.current?.focus(), 100)
diff --git a/apps/wallet-mobile/src/WalletInit/RestoreWallet/RestoreWalletScreen.tsx b/apps/wallet-mobile/src/WalletInit/RestoreWallet/RestoreWalletScreen.tsx
index 5b92ecc0a9..6e7b2637f6 100644
--- a/apps/wallet-mobile/src/WalletInit/RestoreWallet/RestoreWalletScreen.tsx
+++ b/apps/wallet-mobile/src/WalletInit/RestoreWallet/RestoreWalletScreen.tsx
@@ -1,10 +1,10 @@
import {RouteProp, useNavigation, useRoute} from '@react-navigation/native'
import React from 'react'
import {defineMessages, useIntl} from 'react-intl'
-import {View} from 'react-native'
+import {View, ViewProps} from 'react-native'
import {SafeAreaView} from 'react-native-safe-area-context'
-import {Button, KeyboardSpacer, ScrollableView, Spacer, StatusBar, Text} from '../../components'
+import {Button, KeyboardAvoidingView, KeyboardSpacer, ScrollableView, Spacer, StatusBar, Text} from '../../components'
import {WalletInitRouteNavigation, WalletInitRoutes} from '../../navigation'
import {isEmptyString} from '../../utils/utils'
import {getWalletConfigById} from '../../yoroi-wallets/cardano/utils'
@@ -29,32 +29,34 @@ export const RestoreWalletScreen = () => {
-
-
+
+
+
- {strings.instructions({mnemonicLength})}
+ {strings.instructions({mnemonicLength})}
-
+
-
+
-
-
+
+
-
-
-
+
+
+
+
)
}
-const Instructions = (props) =>
-const Actions = (props) =>
+const Instructions = (props: ViewProps) =>
+const Actions = (props: ViewProps) =>
const messages = defineMessages({
restoreButton: {
diff --git a/apps/wallet-mobile/src/WalletInit/SaveNanoX/SaveNanoXScreen.stories.tsx b/apps/wallet-mobile/src/WalletInit/SaveNanoX/SaveNanoXScreen.stories.tsx
index 537da2cf2b..9ab7f7cb5f 100644
--- a/apps/wallet-mobile/src/WalletInit/SaveNanoX/SaveNanoXScreen.stories.tsx
+++ b/apps/wallet-mobile/src/WalletInit/SaveNanoX/SaveNanoXScreen.stories.tsx
@@ -48,7 +48,7 @@ storiesOf('SaveNanoXScreen', module)
walletManager={
{
...walletManager,
- createWalletWithBip44Account: async (...args) => {
+ createWalletWithBip44Account: async (...args: unknown[]) => {
action('createWalletWithBip44Account')(...args)
await new Promise((resolve) => setTimeout(resolve, 1000))
throw new NetworkError()
diff --git a/apps/wallet-mobile/src/WalletInit/SaveReadOnlyWallet/SaveReadOnlyWalletScreen.stories.tsx b/apps/wallet-mobile/src/WalletInit/SaveReadOnlyWallet/SaveReadOnlyWalletScreen.stories.tsx
index 6a0f4c06d9..691150d111 100644
--- a/apps/wallet-mobile/src/WalletInit/SaveReadOnlyWallet/SaveReadOnlyWalletScreen.stories.tsx
+++ b/apps/wallet-mobile/src/WalletInit/SaveReadOnlyWallet/SaveReadOnlyWalletScreen.stories.tsx
@@ -47,7 +47,7 @@ storiesOf('SaveReadOnlyWalletScreen', module)
walletManager={
{
...walletManager,
- createWalletWithBip44Account: async (...args) => {
+ createWalletWithBip44Account: async (...args: unknown[]) => {
action('createWalletWithBip44Account')(...args)
await new Promise((resolve) => setTimeout(resolve, 1000))
throw new NetworkError()
diff --git a/apps/wallet-mobile/src/WalletInit/SaveReadOnlyWallet/SaveReadOnlyWalletScreen.tsx b/apps/wallet-mobile/src/WalletInit/SaveReadOnlyWallet/SaveReadOnlyWalletScreen.tsx
index 37f696609a..1e737b9056 100644
--- a/apps/wallet-mobile/src/WalletInit/SaveReadOnlyWallet/SaveReadOnlyWalletScreen.tsx
+++ b/apps/wallet-mobile/src/WalletInit/SaveReadOnlyWallet/SaveReadOnlyWalletScreen.tsx
@@ -43,7 +43,7 @@ export const SaveReadOnlyWalletScreen = () => {
},
})
- const onSubmit = ({name}) => {
+ const onSubmit = ({name}: {name: string}) => {
createWallet({
name,
networkId,
diff --git a/apps/wallet-mobile/src/WalletInit/VerifyRestoredWallet/VerifyRestoredWalletScreen.tsx b/apps/wallet-mobile/src/WalletInit/VerifyRestoredWallet/VerifyRestoredWalletScreen.tsx
index 6a4de494d9..b336896085 100644
--- a/apps/wallet-mobile/src/WalletInit/VerifyRestoredWallet/VerifyRestoredWalletScreen.tsx
+++ b/apps/wallet-mobile/src/WalletInit/VerifyRestoredWallet/VerifyRestoredWalletScreen.tsx
@@ -1,7 +1,7 @@
import {RouteProp, useNavigation, useRoute} from '@react-navigation/native'
import React, {useEffect, useState} from 'react'
import {defineMessages, useIntl} from 'react-intl'
-import {ActivityIndicator, ScrollView, StyleSheet, View} from 'react-native'
+import {ActivityIndicator, ScrollView, StyleSheet, View, ViewProps} from 'react-native'
import {SafeAreaView} from 'react-native-safe-area-context'
import {BulletPointItem, Button, Icon, Spacer, StatusBar, Text} from '../../components'
@@ -95,11 +95,11 @@ export const VerifyRestoredWalletScreen = () => {
)
}
-const WalletInfo = (props) =>
-const Plate = (props) =>
-const Instructions = (props) =>
-const Addresses = (props) =>
-const Actions = (props) =>
+const WalletInfo = (props: ViewProps) =>
+const Plate = (props: ViewProps) =>
+const Instructions = (props: ViewProps) =>
+const Addresses = (props: ViewProps) =>
+const Actions = (props: ViewProps) =>
const messages = defineMessages({
checksumLabel: {
diff --git a/apps/wallet-mobile/src/WalletInit/WalletCredentials/WalletCredentialsScreen.stories.tsx b/apps/wallet-mobile/src/WalletInit/WalletCredentials/WalletCredentialsScreen.stories.tsx
index 8bbc52786a..d048854e27 100644
--- a/apps/wallet-mobile/src/WalletInit/WalletCredentials/WalletCredentialsScreen.stories.tsx
+++ b/apps/wallet-mobile/src/WalletInit/WalletCredentials/WalletCredentialsScreen.stories.tsx
@@ -27,7 +27,7 @@ storiesOf('WalletCredentialsScreen', module)
walletManager={
{
...walletManager,
- createWallet: (...args) => {
+ createWallet: (...args: unknown[]) => {
action('create wallet')(...args)
},
} as unknown as WalletManager
@@ -56,7 +56,7 @@ storiesOf('WalletCredentialsScreen', module)
walletManager={
{
...walletManager,
- createWallet: (...args) => {
+ createWallet: (...args: unknown[]) => {
action('create wallet')(...args)
throw new NetworkError()
},
diff --git a/apps/wallet-mobile/src/WalletInit/WalletForm.tsx b/apps/wallet-mobile/src/WalletInit/WalletForm.tsx
index e3d4e0d515..305c6ceb32 100644
--- a/apps/wallet-mobile/src/WalletInit/WalletForm.tsx
+++ b/apps/wallet-mobile/src/WalletInit/WalletForm.tsx
@@ -1,8 +1,8 @@
import React from 'react'
import {defineMessages, useIntl} from 'react-intl'
-import {ScrollView, StyleSheet, TextInput as RNTextInput, View} from 'react-native'
+import {ScrollView, StyleSheet, TextInput as RNTextInput, View, ViewProps} from 'react-native'
-import {Button, Checkmark, Spacer, TextInput} from '../components'
+import {Button, Checkmark, KeyboardAvoidingView, Spacer, TextInput} from '../components'
import {debugWalletInfo, features} from '../features'
import globalMessages from '../i18n/global-messages'
import {COLORS} from '../theme'
@@ -48,76 +48,78 @@ export const WalletForm = ({onSubmit}: Props) => {
return (
-
- setName(walletName)}
- errorText={!isEmptyString(walletNameErrorText) ? walletNameErrorText : undefined}
- errorDelay={0}
- returnKeyType="next"
- onSubmitEditing={() => passwordRef.current?.focus()}
- testID="walletNameInput"
- autoComplete="off"
- showErrorOnBlur
- />
-
-
-
- : undefined}
- onSubmitEditing={() => passwordConfirmationRef.current?.focus()}
- testID="walletPasswordInput"
- autoComplete="off"
- showErrorOnBlur
- />
-
-
-
- : undefined
- }
- testID="walletRepeatPasswordInput"
- autoComplete="off"
- showErrorOnBlur
- />
-
-
-
-
+
+
+ setName(walletName)}
+ errorText={!isEmptyString(walletNameErrorText) ? walletNameErrorText : undefined}
+ errorDelay={0}
+ returnKeyType="next"
+ onSubmitEditing={() => passwordRef.current?.focus()}
+ testID="walletNameInput"
+ autoComplete="off"
+ showErrorOnBlur
+ />
+
+
+
+ : undefined}
+ onSubmitEditing={() => passwordConfirmationRef.current?.focus()}
+ testID="walletPasswordInput"
+ autoComplete="off"
+ showErrorOnBlur
+ />
+
+
+
+ : undefined
+ }
+ testID="walletRepeatPasswordInput"
+ autoComplete="off"
+ showErrorOnBlur
+ />
+
+
+
+
+
)
}
@@ -125,7 +127,7 @@ export const WalletForm = ({onSubmit}: Props) => {
const WalletNameInput = TextInput
const PasswordInput = TextInput
const PasswordConfirmationInput = TextInput
-const Actions = (props) =>
+const Actions = (props: ViewProps) =>
const messages = defineMessages({
walletNameInputLabel: {
@@ -161,7 +163,8 @@ const useStrings = () => {
walletNameInputLabel: intl.formatMessage(messages.walletNameInputLabel),
newPasswordInput: intl.formatMessage(messages.newPasswordInput),
continueButton: intl.formatMessage(messages.continueButton),
- passwordStrengthRequirement: (options) => intl.formatMessage(messages.passwordStrengthRequirement, options),
+ passwordStrengthRequirement: (options: {requiredPasswordLength: number}) =>
+ intl.formatMessage(messages.passwordStrengthRequirement, options),
repeatPasswordInputLabel: intl.formatMessage(messages.repeatPasswordInputLabel),
repeatPasswordInputError: intl.formatMessage(messages.repeatPasswordInputError),
tooLong: intl.formatMessage(globalMessages.walletNameErrorTooLong),
diff --git a/apps/wallet-mobile/src/WalletInit/WalletInit/WalletInitScreen.tsx b/apps/wallet-mobile/src/WalletInit/WalletInit/WalletInitScreen.tsx
index 8d3bc944ad..8cf3b7b1e2 100644
--- a/apps/wallet-mobile/src/WalletInit/WalletInit/WalletInitScreen.tsx
+++ b/apps/wallet-mobile/src/WalletInit/WalletInit/WalletInitScreen.tsx
@@ -177,21 +177,22 @@ const useStrings = () => {
const intl = useIntl()
return {
- createWalletButton: ({networkId}) =>
+ createWalletButton: ({networkId}: {networkId: NetworkId}) =>
isJormungandr(networkId)
? intl.formatMessage(messages.createWalletButton) + ' (ITN)'
: intl.formatMessage(messages.createWalletButton),
- restoreWalletButton: ({networkId}) =>
+ restoreWalletButton: ({networkId}: {networkId: NetworkId}) =>
isJormungandr(networkId)
? intl.formatMessage(messages.restoreWalletButton) + ' (ITN)'
: intl.formatMessage(messages.restoreWalletButton),
- createWalletWithLedgerButton: ({networkId}) =>
+ createWalletWithLedgerButton: ({networkId}: {networkId: NetworkId}) =>
isJormungandr(networkId)
? intl.formatMessage(messages.createWalletWithLedgerButton) + ' (ITN)'
: intl.formatMessage(messages.createWalletWithLedgerButton),
restoreNormalWalletLabel: intl.formatMessage(messages.restoreNormalWalletLabel),
learnMore: intl.formatMessage(globalMessages.learnMore),
- restoreNWordWalletExplanation: (options) => intl.formatMessage(messages.restoreNWordWalletExplanation, options),
+ restoreNWordWalletExplanation: (options: {mnemonicLength: number}) =>
+ intl.formatMessage(messages.restoreNWordWalletExplanation, options),
restore24WordWalletLabel: intl.formatMessage(messages.restore24WordWalletLabel),
importReadOnlyWalletLabel: intl.formatMessage(messages.importReadOnlyWalletLabel),
importReadOnlyWalletExplanation: intl.formatMessage(messages.importReadOnlyWalletExplanation),
diff --git a/apps/wallet-mobile/src/WalletInit/WalletNameForm/WalletNameForm.tsx b/apps/wallet-mobile/src/WalletInit/WalletNameForm/WalletNameForm.tsx
index b20b309bf5..52768b3a31 100644
--- a/apps/wallet-mobile/src/WalletInit/WalletNameForm/WalletNameForm.tsx
+++ b/apps/wallet-mobile/src/WalletInit/WalletNameForm/WalletNameForm.tsx
@@ -1,9 +1,9 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import React from 'react'
import {defineMessages, useIntl} from 'react-intl'
-import {ActivityIndicator, Image, ImageSourcePropType, StyleSheet, View, ViewStyle} from 'react-native'
+import {ActivityIndicator, Image, ImageSourcePropType, ScrollView, StyleSheet, View, ViewStyle} from 'react-native'
-import {Button, ProgressStep, TextInput} from '../../components'
+import {Button, KeyboardAvoidingView, ProgressStep, TextInput} from '../../components'
import globalMessages from '../../i18n/global-messages'
import {spacing} from '../../theme'
import {useWalletManager} from '../../WalletManager'
@@ -51,42 +51,46 @@ export const WalletNameForm = ({
return (
- {progress != null && (
-
- )}
+
+ {progress != null && (
+
+ )}
-
- {image != null && }
+
+
+ {image != null && }
- {topContent}
+ {topContent}
- setName(walletName)}
- errorText={walletNameErrorText}
- disabled={isWaiting}
- autoComplete="off"
- testID="walletNameInput"
- />
+ setName(walletName)}
+ errorText={walletNameErrorText}
+ disabled={isWaiting}
+ autoComplete="off"
+ testID="walletNameInput"
+ />
- {bottomContent}
-
+ {bottomContent}
+
+
-
-
+
+
- {isWaiting && }
+ {isWaiting && }
+
)
}
diff --git a/apps/wallet-mobile/src/WalletNavigator.tsx b/apps/wallet-mobile/src/WalletNavigator.tsx
index 51032ee34a..6abd6d67fb 100644
--- a/apps/wallet-mobile/src/WalletNavigator.tsx
+++ b/apps/wallet-mobile/src/WalletNavigator.tsx
@@ -1,5 +1,5 @@
import {createBottomTabNavigator} from '@react-navigation/bottom-tabs'
-import {getFocusedRouteNameFromRoute} from '@react-navigation/native'
+import {getFocusedRouteNameFromRoute, useFocusEffect} from '@react-navigation/native'
import {createStackNavigator} from '@react-navigation/stack'
import React from 'react'
import {defineMessages, useIntl} from 'react-intl'
@@ -10,7 +10,9 @@ import {Icon, OfflineBanner} from './components'
import {DashboardNavigator} from './Dashboard'
import {MenuNavigator} from './features/Menu'
import {SettingsScreenNavigator} from './features/Settings'
+import {GovernanceNavigator} from './features/Staking/Governance'
import {ToggleAnalyticsSettingsNavigator} from './features/ToggleAnalyticsSettings'
+import {useMetrics} from './metrics/metricsManager'
import {WalletStackRoutes, WalletTabRoutes} from './navigation'
import {NftDetailsNavigator} from './NftDetails/NftDetailsNavigator'
import {NftsNavigator} from './Nfts/NftsNavigator'
@@ -44,6 +46,14 @@ const WalletTabNavigator = () => {
}
}, [])
+ const {track} = useMetrics()
+
+ useFocusEffect(
+ React.useCallback(() => {
+ track.walletPageViewed()
+ }, [track]),
+ )
+
return (
<>
@@ -129,7 +139,12 @@ const WalletTabNavigator = () => {
name="menu"
component={MenuNavigator}
options={{
- tabBarIcon: ({focused}) => ,
+ tabBarIcon: ({focused}) => (
+
+ ),
tabBarLabel: strings.menuTabBarLabel,
tabBarTestID: 'menuTabBarButton',
}}
@@ -158,6 +173,8 @@ export const WalletNavigator = () => (
+
+
)
diff --git a/apps/wallet-mobile/src/YoroiApp.tsx b/apps/wallet-mobile/src/YoroiApp.tsx
index f001df7517..15c2bd3618 100644
--- a/apps/wallet-mobile/src/YoroiApp.tsx
+++ b/apps/wallet-mobile/src/YoroiApp.tsx
@@ -1,4 +1,5 @@
import {rootStorage, StorageProvider} from '@yoroi/common'
+import {ThemeProvider} from '@yoroi/theme'
import React from 'react'
import {LogBox, Platform, StyleSheet, UIManager} from 'react-native'
import Config from 'react-native-config'
@@ -17,7 +18,6 @@ import {CONFIG} from './legacy/config'
import {setLogLevel} from './legacy/logging'
import {makeMetricsManager, MetricsProvider} from './metrics/metricsManager'
import {SelectedWalletMetaProvider, SelectedWalletProvider} from './SelectedWallet/Context'
-import {ThemeProvider} from './theme'
import {WalletManagerProvider} from './WalletManager'
import {useMigrations} from './yoroi-wallets/migrations'
import {walletManager} from './yoroi-wallets/walletManager'
@@ -41,7 +41,6 @@ const metricsManager = makeMetricsManager()
export const YoroiApp = () => {
const migrated = useMigrations(rootStorage)
-
// eslint-disable-next-line @typescript-eslint/strict-boolean-expressions
return migrated ? (
diff --git a/apps/wallet-mobile/src/assets/img/banxa.png b/apps/wallet-mobile/src/assets/img/banxa.png
new file mode 100644
index 0000000000..3cf7155ed2
Binary files /dev/null and b/apps/wallet-mobile/src/assets/img/banxa.png differ
diff --git a/apps/wallet-mobile/src/assets/img/banxa@2x.png b/apps/wallet-mobile/src/assets/img/banxa@2x.png
new file mode 100644
index 0000000000..c47ab50350
Binary files /dev/null and b/apps/wallet-mobile/src/assets/img/banxa@2x.png differ
diff --git a/apps/wallet-mobile/src/assets/img/banxa@3x.png b/apps/wallet-mobile/src/assets/img/banxa@3x.png
new file mode 100644
index 0000000000..06ce42d6ec
Binary files /dev/null and b/apps/wallet-mobile/src/assets/img/banxa@3x.png differ
diff --git a/apps/wallet-mobile/src/components/AmountItem/AmountItem.tsx b/apps/wallet-mobile/src/components/AmountItem/AmountItem.tsx
index 9aa547e05f..9e2d9877d2 100644
--- a/apps/wallet-mobile/src/components/AmountItem/AmountItem.tsx
+++ b/apps/wallet-mobile/src/components/AmountItem/AmountItem.tsx
@@ -1,7 +1,10 @@
import {Balance} from '@yoroi/types'
+import {SwapOrderType} from '@yoroi/types/lib/swap/order'
import * as React from 'react'
import {StyleSheet, View, ViewProps} from 'react-native'
+import {usePriceImpactRiskTheme} from '../../features/Swap/common/helpers'
+import {SwapPriceImpactRisk} from '../../features/Swap/common/types'
import {COLORS} from '../../theme'
import {isEmptyString} from '../../utils'
import {YoroiWallet} from '../../yoroi-wallets/cardano/types'
@@ -18,9 +21,20 @@ export type AmountItemProps = {
status?: string
inWallet?: boolean
variant?: 'swap'
+ priceImpactRisk?: SwapPriceImpactRisk
+ orderType?: SwapOrderType
}
-export const AmountItem = ({isPrivacyOff, wallet, style, amount, inWallet, variant}: AmountItemProps) => {
+export const AmountItem = ({
+ isPrivacyOff,
+ wallet,
+ style,
+ amount,
+ inWallet,
+ variant,
+ priceImpactRisk,
+ orderType,
+}: AmountItemProps) => {
const {quantity, tokenId} = amount
const tokenInfo = useTokenInfo({wallet, tokenId})
@@ -30,8 +44,9 @@ export const AmountItem = ({isPrivacyOff, wallet, style, amount, inWallet, varia
const detail = isPrimary ? tokenInfo.description : tokenInfo.fingerprint
const formattedQuantity = Quantities.format(quantity, tokenInfo.decimals ?? 0)
-
const showSwapDetails = !isPrimary && variant === 'swap'
+ const priceImpactRiskTheme = usePriceImpactRiskTheme(priceImpactRisk ?? 'none')
+ const priceImpactRiskTextColor = orderType === 'market' ? priceImpactRiskTheme.text : styles.text.color
return (
@@ -43,7 +58,7 @@ export const AmountItem = ({isPrivacyOff, wallet, style, amount, inWallet, varia
-
+
{nameLabel}
@@ -63,9 +78,15 @@ export const AmountItem = ({isPrivacyOff, wallet, style, amount, inWallet, varia
{tokenInfo.kind !== 'nft' && variant !== 'swap' && (
-
- {isPrivacyOff ? '**.*******' : formattedQuantity}
-
+
+ {priceImpactRisk === 'moderate' && }
+
+ {priceImpactRisk === 'high' && }
+
+
+ {isPrivacyOff ? '**.*******' : formattedQuantity}
+
+
)}
{isPrimary && variant !== 'swap' && (
@@ -136,9 +157,14 @@ const styles = StyleSheet.create({
textAlign: 'right',
fontSize: 16,
fontFamily: 'Rubik-Regular',
+ flexGrow: 1,
},
row: {
+ display: 'flex',
flexDirection: 'row',
alignItems: 'center',
},
+ text: {
+ color: '#242838',
+ },
})
diff --git a/apps/wallet-mobile/src/components/Analytics/Analytics.tsx b/apps/wallet-mobile/src/components/Analytics/Analytics.tsx
index 0bd8cfffd4..7231453fa3 100644
--- a/apps/wallet-mobile/src/components/Analytics/Analytics.tsx
+++ b/apps/wallet-mobile/src/components/Analytics/Analytics.tsx
@@ -1,4 +1,4 @@
-import React from 'react'
+import React, {ReactNode} from 'react'
import {defineMessages, useIntl} from 'react-intl'
import {StyleSheet, Switch, TouchableOpacity, useWindowDimensions, View} from 'react-native'
import {ScrollView} from 'react-native-gesture-handler'
@@ -252,7 +252,7 @@ const list = [
{style: styles.cross, icon: '✕', key: 'nosell'},
] as const
-const bold = {b: (text) => {text}}
+const bold = {b: (text: ReactNode) => {text}}
const useStrings = () => {
const intl = useIntl()
diff --git a/apps/wallet-mobile/src/components/Button/Button.stories.tsx b/apps/wallet-mobile/src/components/Button/Button.stories.tsx
index 7f2b45a44e..2b7b614ecd 100644
--- a/apps/wallet-mobile/src/components/Button/Button.stories.tsx
+++ b/apps/wallet-mobile/src/components/Button/Button.stories.tsx
@@ -1,7 +1,7 @@
import {action} from '@storybook/addon-actions'
import {storiesOf} from '@storybook/react-native'
import React from 'react'
-import {ScrollView, StyleSheet, View} from 'react-native'
+import {ScrollView, StyleSheet, View, ViewProps} from 'react-native'
import icon from '../../assets/img/icon/dashboard.png'
import {Button} from './Button'
@@ -38,7 +38,7 @@ storiesOf('Button', module).add('default', () => (
))
-const Row = (props) =>
+const Row = (props: ViewProps) =>
const styles = StyleSheet.create({
row: {
diff --git a/apps/wallet-mobile/src/components/Button/Button.tsx b/apps/wallet-mobile/src/components/Button/Button.tsx
index a24536d4fe..b70fce2a99 100644
--- a/apps/wallet-mobile/src/components/Button/Button.tsx
+++ b/apps/wallet-mobile/src/components/Button/Button.tsx
@@ -68,7 +68,7 @@ export const Button = (props: ButtonProps) => {
}
const buttonOutline = {
- borderWidth: 1,
+ borderWidth: 2,
borderColor: '#fff',
backgroundColor: 'transparent',
}
diff --git a/apps/wallet-mobile/src/components/Button/SettingsButton.tsx b/apps/wallet-mobile/src/components/Button/SettingsButton.tsx
index ef8c48219e..5e06ddeb46 100644
--- a/apps/wallet-mobile/src/components/Button/SettingsButton.tsx
+++ b/apps/wallet-mobile/src/components/Button/SettingsButton.tsx
@@ -1,9 +1,15 @@
import * as React from 'react'
+import {StyleProp, ViewStyle} from 'react-native'
import {TouchableOpacity} from 'react-native-gesture-handler'
import {Icon} from '../Icon'
-export const SettingsButton = (props) => {
+type Props = {
+ style: StyleProp
+ onPress: () => void
+}
+
+export const SettingsButton = (props: Props) => {
return (
diff --git a/apps/wallet-mobile/src/components/CameraCodeScanner/CameraCodeScanner.stories.tsx b/apps/wallet-mobile/src/components/CameraCodeScanner/CameraCodeScanner.stories.tsx
index 2b7894b14b..5c5b75f07e 100644
--- a/apps/wallet-mobile/src/components/CameraCodeScanner/CameraCodeScanner.stories.tsx
+++ b/apps/wallet-mobile/src/components/CameraCodeScanner/CameraCodeScanner.stories.tsx
@@ -1,5 +1,6 @@
import {action} from '@storybook/addon-actions'
import {storiesOf} from '@storybook/react-native'
+import {BarCodeScannerResult} from 'expo-barcode-scanner'
import {Camera} from 'expo-camera'
import React from 'react'
import {Text, View} from 'react-native'
@@ -16,7 +17,7 @@ const Wrapper = () => {
const [path, setPath] = React.useState(null)
const [withMask, setWithMask] = React.useState(true)
- const handleOnRead = async ({data}) => {
+ const handleOnRead = async ({data}: BarCodeScannerResult) => {
const parsedData = JSON.parse(data)
setPublicKeyHex(parsedData.publicKeyHex)
@@ -61,4 +62,4 @@ const Wrapper = () => {
)
}
-const Info = ({text}) => {text}
+const Info = ({text}: {text: string}) => {text}
diff --git a/apps/wallet-mobile/src/components/CameraCodeScanner/CameraCodeScanner.tsx b/apps/wallet-mobile/src/components/CameraCodeScanner/CameraCodeScanner.tsx
index bb974391a7..da03f7aab5 100644
--- a/apps/wallet-mobile/src/components/CameraCodeScanner/CameraCodeScanner.tsx
+++ b/apps/wallet-mobile/src/components/CameraCodeScanner/CameraCodeScanner.tsx
@@ -3,7 +3,7 @@ import {BarCodeBounds, BarCodeScanner, BarCodeScannerResult} from 'expo-barcode-
import {Camera} from 'expo-camera'
import * as React from 'react'
import {StyleSheet, Text, useWindowDimensions, View} from 'react-native'
-import {Path, Svg} from 'react-native-svg'
+import {Path, Svg, SvgProps} from 'react-native-svg'
export type CameraCodeScannerMethods = {
continueScanning: () => void
@@ -41,7 +41,7 @@ export const CameraCodeScanner = React.forwardRef {
+ (event: BarCodeScannerResult & {boundingBox?: BarCodeBounds}) => {
const scannerBounds = getScannerBounds({deviceHeight, deviceWidth})
const isQrInsideScannerBounds =
withMask && (event.bounds !== undefined || event.boundingBox !== undefined)
@@ -142,21 +142,13 @@ const BottomLeftCorner = () =>
const MaskText = ({children}: {children?: React.ReactNode}) => {children}
-const Corner = ({style}) => {
- return
+const Corner = ({style}: SvgProps) => {
+ return
}
-const ArcSvg = (props) => {
+const ArcSvg = (props: SvgProps) => {
return (
-