From d33ee2b766800ae4c42d3ceae84ea990b3bc4512 Mon Sep 17 00:00:00 2001 From: Juliano Lazzarotto <30806844+stackchain@users.noreply.github.com> Date: Mon, 7 Oct 2024 13:27:22 +0100 Subject: [PATCH] fix(wallet-mobile): qr link full read within yoroi --- .../.storybook/storybook.requires.js | 1 + apps/wallet-mobile/src/WalletNavigator.tsx | 73 ++-- apps/wallet-mobile/src/YoroiApp.tsx | 25 +- .../Settings/SettingsScreenNavigator.tsx | 332 +++++++++--------- .../messages/src/WalletNavigator.json | 96 ++--- .../Settings/SettingsScreenNavigator.json | 160 ++++----- 6 files changed, 341 insertions(+), 346 deletions(-) diff --git a/apps/wallet-mobile/.storybook/storybook.requires.js b/apps/wallet-mobile/.storybook/storybook.requires.js index f593d32e88..7046d09d9b 100644 --- a/apps/wallet-mobile/.storybook/storybook.requires.js +++ b/apps/wallet-mobile/.storybook/storybook.requires.js @@ -75,6 +75,7 @@ const getStories = () => { "./src/components/ExpandableInfoCard/ExpandableInfoCard.stories.tsx": require("../src/components/ExpandableInfoCard/ExpandableInfoCard.stories.tsx"), "./src/components/HideableText/HideableText.stories.tsx": require("../src/components/HideableText/HideableText.stories.tsx"), "./src/components/Icon/Icon.stories.tsx": require("../src/components/Icon/Icon.stories.tsx"), + "./src/components/InfoBanner/InfoBanner.stories.tsx": require("../src/components/InfoBanner/InfoBanner.stories.tsx"), "./src/components/LanguagePicker/LanguagePicker.stories.tsx": require("../src/components/LanguagePicker/LanguagePicker.stories.tsx"), "./src/components/LanguagePicker/LanguagePickerWarning.stories.tsx": require("../src/components/LanguagePicker/LanguagePickerWarning.stories.tsx"), "./src/components/legacy/Modal/Modal.stories.tsx": require("../src/components/legacy/Modal/Modal.stories.tsx"), diff --git a/apps/wallet-mobile/src/WalletNavigator.tsx b/apps/wallet-mobile/src/WalletNavigator.tsx index 31169b7b74..b67c47d16a 100644 --- a/apps/wallet-mobile/src/WalletNavigator.tsx +++ b/apps/wallet-mobile/src/WalletNavigator.tsx @@ -10,7 +10,6 @@ import { swapStorageMaker, } from '@yoroi/swap' import {useTheme} from '@yoroi/theme' -import {TransferProvider} from '@yoroi/transfer' import {Swap} from '@yoroi/types' import React from 'react' import {defineMessages, useIntl} from 'react-intl' @@ -233,51 +232,49 @@ export const WalletNavigator = () => { } return ( - - - + + {children}, }} - > - {children}, - }} - component={SelectWalletFromList} - /> + component={SelectWalletFromList} + /> - + - + - + - CatalystNavigator} - /> + CatalystNavigator} + /> - + - + - - - - + + + ) } diff --git a/apps/wallet-mobile/src/YoroiApp.tsx b/apps/wallet-mobile/src/YoroiApp.tsx index 97c06b05aa..fc98586531 100644 --- a/apps/wallet-mobile/src/YoroiApp.tsx +++ b/apps/wallet-mobile/src/YoroiApp.tsx @@ -2,6 +2,7 @@ import {AsyncStorageProvider} from '@yoroi/common' import {LinksProvider} from '@yoroi/links' import {SetupWalletProvider} from '@yoroi/setup-wallet' import {ThemeProvider} from '@yoroi/theme' +import {TransferProvider} from '@yoroi/transfer' import React from 'react' import {LogBox, StyleSheet} from 'react-native' import * as RNP from 'react-native-paper' @@ -58,17 +59,19 @@ const Yoroi = () => { - - - - - - - - - - - + + + + + + + + + + + + + diff --git a/apps/wallet-mobile/src/features/Settings/SettingsScreenNavigator.tsx b/apps/wallet-mobile/src/features/Settings/SettingsScreenNavigator.tsx index fff982f18a..36384c6b0f 100644 --- a/apps/wallet-mobile/src/features/Settings/SettingsScreenNavigator.tsx +++ b/apps/wallet-mobile/src/features/Settings/SettingsScreenNavigator.tsx @@ -57,176 +57,170 @@ export const SettingsScreenNavigator = () => { ) return ( - - + + + + + + + {children}, + }} + /> + + + + + + + + + + + + + + + + + + ( + + + + ), + }} + /> + + + + + + + + + + + + + + + + null, + }} + component={SubmittedTxScreen} + /> + + - - - - - - - {children}, - }} - /> - - - - - - - - - - - - - - - - - - ( - - - - ), - }} - /> - - - - - - - - - - - - - - - - null, - }} - component={SubmittedTxScreen} - /> - - - - - - + component={FailedTxScreen} + /> + + + ) } diff --git a/apps/wallet-mobile/translations/messages/src/WalletNavigator.json b/apps/wallet-mobile/translations/messages/src/WalletNavigator.json index 0a23067a8f..6e8179e2ac 100644 --- a/apps/wallet-mobile/translations/messages/src/WalletNavigator.json +++ b/apps/wallet-mobile/translations/messages/src/WalletNavigator.json @@ -4,14 +4,14 @@ "defaultMessage": "!!!Transactions", "file": "src/WalletNavigator.tsx", "start": { - "line": 306, + "line": 303, "column": 22, - "index": 10644 + "index": 10476 }, "end": { - "line": 309, + "line": 306, "column": 3, - "index": 10747 + "index": 10579 } }, { @@ -19,14 +19,14 @@ "defaultMessage": "!!!Send", "file": "src/WalletNavigator.tsx", "start": { - "line": 310, + "line": 307, "column": 14, - "index": 10763 + "index": 10595 }, "end": { - "line": 313, + "line": 310, "column": 3, - "index": 10862 + "index": 10694 } }, { @@ -34,14 +34,14 @@ "defaultMessage": "!!!Receive", "file": "src/WalletNavigator.tsx", "start": { - "line": 314, + "line": 311, "column": 17, - "index": 10881 + "index": 10713 }, "end": { - "line": 317, + "line": 314, "column": 3, - "index": 10986 + "index": 10818 } }, { @@ -49,14 +49,14 @@ "defaultMessage": "!!!Dashboard", "file": "src/WalletNavigator.tsx", "start": { - "line": 318, + "line": 315, "column": 19, - "index": 11007 + "index": 10839 }, "end": { - "line": 321, + "line": 318, "column": 3, - "index": 11104 + "index": 10936 } }, { @@ -64,14 +64,14 @@ "defaultMessage": "!!!Delegate", "file": "src/WalletNavigator.tsx", "start": { - "line": 322, + "line": 319, "column": 18, - "index": 11124 + "index": 10956 }, "end": { - "line": 325, + "line": 322, "column": 3, - "index": 11219 + "index": 11051 } }, { @@ -79,14 +79,14 @@ "defaultMessage": "!!!Wallet", "file": "src/WalletNavigator.tsx", "start": { - "line": 326, + "line": 323, "column": 16, - "index": 11237 + "index": 11069 }, "end": { - "line": 329, + "line": 326, "column": 3, - "index": 11335 + "index": 11167 } }, { @@ -94,14 +94,14 @@ "defaultMessage": "!!!Staking", "file": "src/WalletNavigator.tsx", "start": { - "line": 330, + "line": 327, "column": 17, - "index": 11354 + "index": 11186 }, "end": { - "line": 333, + "line": 330, "column": 3, - "index": 11419 + "index": 11251 } }, { @@ -109,14 +109,14 @@ "defaultMessage": "!!!NFT Gallery", "file": "src/WalletNavigator.tsx", "start": { - "line": 334, + "line": 331, "column": 14, - "index": 11435 + "index": 11267 }, "end": { - "line": 337, + "line": 334, "column": 3, - "index": 11529 + "index": 11361 } }, { @@ -124,14 +124,14 @@ "defaultMessage": "!!!Menu", "file": "src/WalletNavigator.tsx", "start": { - "line": 338, + "line": 335, "column": 14, - "index": 11545 + "index": 11377 }, "end": { - "line": 341, + "line": 338, "column": 3, - "index": 11597 + "index": 11429 } }, { @@ -139,14 +139,14 @@ "defaultMessage": "!!!Discover", "file": "src/WalletNavigator.tsx", "start": { - "line": 342, + "line": 339, "column": 18, - "index": 11617 + "index": 11449 }, "end": { - "line": 345, + "line": 342, "column": 3, - "index": 11706 + "index": 11538 } }, { @@ -154,14 +154,14 @@ "defaultMessage": "!!!My wallets", "file": "src/WalletNavigator.tsx", "start": { - "line": 346, + "line": 343, "column": 31, - "index": 11739 + "index": 11571 }, "end": { - "line": 349, + "line": 346, "column": 3, - "index": 11848 + "index": 11680 } }, { @@ -169,14 +169,14 @@ "defaultMessage": "!!!Portfolio", "file": "src/WalletNavigator.tsx", "start": { - "line": 350, + "line": 347, "column": 19, - "index": 11869 + "index": 11701 }, "end": { - "line": 353, + "line": 350, "column": 3, - "index": 11938 + "index": 11770 } } ] \ No newline at end of file diff --git a/apps/wallet-mobile/translations/messages/src/features/Settings/SettingsScreenNavigator.json b/apps/wallet-mobile/translations/messages/src/features/Settings/SettingsScreenNavigator.json index 0b85270988..37f438de71 100644 --- a/apps/wallet-mobile/translations/messages/src/features/Settings/SettingsScreenNavigator.json +++ b/apps/wallet-mobile/translations/messages/src/features/Settings/SettingsScreenNavigator.json @@ -4,14 +4,14 @@ "defaultMessage": "!!!Wallet", "file": "src/features/Settings/SettingsScreenNavigator.tsx", "start": { - "line": 274, + "line": 268, "column": 18, - "index": 8562 + "index": 8177 }, "end": { - "line": 277, + "line": 271, "column": 3, - "index": 8660 + "index": 8275 } }, { @@ -19,14 +19,14 @@ "defaultMessage": "!!!Application", "file": "src/features/Settings/SettingsScreenNavigator.tsx", "start": { - "line": 278, + "line": 272, "column": 15, - "index": 8677 + "index": 8292 }, "end": { - "line": 281, + "line": 275, "column": 3, - "index": 8786 + "index": 8401 } }, { @@ -34,14 +34,14 @@ "defaultMessage": "!!!Change PIN", "file": "src/features/Settings/SettingsScreenNavigator.tsx", "start": { - "line": 282, + "line": 276, "column": 24, - "index": 8812 + "index": 8427 }, "end": { - "line": 285, + "line": 279, "column": 3, - "index": 8921 + "index": 8536 } }, { @@ -49,14 +49,14 @@ "defaultMessage": "!!!Change spending password", "file": "src/features/Settings/SettingsScreenNavigator.tsx", "start": { - "line": 286, + "line": 280, "column": 23, - "index": 8946 + "index": 8561 }, "end": { - "line": 289, + "line": 283, "column": 3, - "index": 9060 + "index": 8675 } }, { @@ -64,14 +64,14 @@ "defaultMessage": "!!!Remove wallet", "file": "src/features/Settings/SettingsScreenNavigator.tsx", "start": { - "line": 290, + "line": 284, "column": 21, - "index": 9083 + "index": 8698 }, "end": { - "line": 293, + "line": 287, "column": 3, - "index": 9184 + "index": 8799 } }, { @@ -79,14 +79,14 @@ "defaultMessage": "!!!Terms of Service Agreement", "file": "src/features/Settings/SettingsScreenNavigator.tsx", "start": { - "line": 294, + "line": 288, "column": 23, - "index": 9209 + "index": 8824 }, "end": { - "line": 297, + "line": 291, "column": 3, - "index": 9325 + "index": 8940 } }, { @@ -94,14 +94,14 @@ "defaultMessage": "!!!Change wallet name", "file": "src/features/Settings/SettingsScreenNavigator.tsx", "start": { - "line": 298, + "line": 292, "column": 25, - "index": 9352 + "index": 8967 }, "end": { - "line": 301, + "line": 295, "column": 3, - "index": 9456 + "index": 9071 } }, { @@ -109,14 +109,14 @@ "defaultMessage": "!!!Support", "file": "src/features/Settings/SettingsScreenNavigator.tsx", "start": { - "line": 302, + "line": 296, "column": 16, - "index": 9474 + "index": 9089 }, "end": { - "line": 305, + "line": 299, "column": 3, - "index": 9565 + "index": 9180 } }, { @@ -124,14 +124,14 @@ "defaultMessage": "!!!Easy confirmation", "file": "src/features/Settings/SettingsScreenNavigator.tsx", "start": { - "line": 306, + "line": 300, "column": 31, - "index": 9598 + "index": 9213 }, "end": { - "line": 309, + "line": 303, "column": 3, - "index": 9713 + "index": 9328 } }, { @@ -139,14 +139,14 @@ "defaultMessage": "!!!Easy confirmation", "file": "src/features/Settings/SettingsScreenNavigator.tsx", "start": { - "line": 310, + "line": 304, "column": 32, - "index": 9747 + "index": 9362 }, "end": { - "line": 313, + "line": 307, "column": 3, - "index": 9863 + "index": 9478 } }, { @@ -154,14 +154,14 @@ "defaultMessage": "!!!Set PIN", "file": "src/features/Settings/SettingsScreenNavigator.tsx", "start": { - "line": 314, + "line": 308, "column": 18, - "index": 9883 + "index": 9498 }, "end": { - "line": 317, + "line": 311, "column": 3, - "index": 9981 + "index": 9596 } }, { @@ -169,14 +169,14 @@ "defaultMessage": "!!!Settings", "file": "src/features/Settings/SettingsScreenNavigator.tsx", "start": { - "line": 318, + "line": 312, "column": 17, - "index": 10000 + "index": 9615 }, "end": { - "line": 321, + "line": 315, "column": 3, - "index": 10103 + "index": 9718 } }, { @@ -184,14 +184,14 @@ "defaultMessage": "!!!Language", "file": "src/features/Settings/SettingsScreenNavigator.tsx", "start": { - "line": 322, + "line": 316, "column": 17, - "index": 10122 + "index": 9737 }, "end": { - "line": 325, + "line": 319, "column": 3, - "index": 10220 + "index": 9835 } }, { @@ -199,14 +199,14 @@ "defaultMessage": "!!!Theming", "file": "src/features/Settings/SettingsScreenNavigator.tsx", "start": { - "line": 326, + "line": 320, "column": 14, - "index": 10236 + "index": 9851 }, "end": { - "line": 329, + "line": 323, "column": 3, - "index": 10330 + "index": 9945 } }, { @@ -214,14 +214,14 @@ "defaultMessage": "!!!Network", "file": "src/features/Settings/SettingsScreenNavigator.tsx", "start": { - "line": 330, + "line": 324, "column": 16, - "index": 10348 + "index": 9963 }, "end": { - "line": 333, + "line": 327, "column": 3, - "index": 10444 + "index": 10059 } }, { @@ -229,14 +229,14 @@ "defaultMessage": "!!!App settings", "file": "src/features/Settings/SettingsScreenNavigator.tsx", "start": { - "line": 334, + "line": 328, "column": 20, - "index": 10466 + "index": 10081 }, "end": { - "line": 337, + "line": 331, "column": 3, - "index": 10584 + "index": 10199 } }, { @@ -244,14 +244,14 @@ "defaultMessage": "!!!About", "file": "src/features/Settings/SettingsScreenNavigator.tsx", "start": { - "line": 338, + "line": 332, "column": 14, - "index": 10600 + "index": 10215 }, "end": { - "line": 341, + "line": 335, "column": 3, - "index": 10700 + "index": 10315 } }, { @@ -259,14 +259,14 @@ "defaultMessage": "!!!Privacy Policy", "file": "src/features/Settings/SettingsScreenNavigator.tsx", "start": { - "line": 342, + "line": 336, "column": 22, - "index": 10724 + "index": 10339 }, "end": { - "line": 345, + "line": 339, "column": 3, - "index": 10827 + "index": 10442 } }, { @@ -274,14 +274,14 @@ "defaultMessage": "!!!Collateral", "file": "src/features/Settings/SettingsScreenNavigator.tsx", "start": { - "line": 346, + "line": 340, "column": 14, - "index": 10843 + "index": 10458 }, "end": { - "line": 349, + "line": 343, "column": 3, - "index": 10914 + "index": 10529 } }, { @@ -289,14 +289,14 @@ "defaultMessage": "!!!Log", "file": "src/features/Settings/SettingsScreenNavigator.tsx", "start": { - "line": 350, + "line": 344, "column": 18, - "index": 10934 + "index": 10549 }, "end": { - "line": 353, + "line": 347, "column": 3, - "index": 10991 + "index": 10606 } } ] \ No newline at end of file