From a6ceba11a88b74b9e3c88acdc4533d6a48f0a13f Mon Sep 17 00:00:00 2001 From: Javier Bueno Date: Mon, 20 May 2024 13:10:16 +0200 Subject: [PATCH] CR: update --- .../src/TxHistory/TxHistoryNavigator.tsx | 12 ++- .../src/TxHistory/TxHistoryNavigator.json | 84 +++++++++---------- 2 files changed, 47 insertions(+), 49 deletions(-) diff --git a/apps/wallet-mobile/src/TxHistory/TxHistoryNavigator.tsx b/apps/wallet-mobile/src/TxHistory/TxHistoryNavigator.tsx index 1ef7a0b370..4858e2beec 100644 --- a/apps/wallet-mobile/src/TxHistory/TxHistoryNavigator.tsx +++ b/apps/wallet-mobile/src/TxHistory/TxHistoryNavigator.tsx @@ -62,7 +62,6 @@ import { } from '../navigation' 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' @@ -77,7 +76,6 @@ export const TxHistoryNavigator = () => { const storage = useAsyncStorage() const {atoms, color} = useTheme() const {styles} = useStyles() - const isMainnet = isMainnetNetworkId(wallet.networkId) // modal const [isModalInfoVisible, setIsModalInfoVisible] = React.useState(false) @@ -87,17 +85,17 @@ export const TxHistoryNavigator = () => { const {frontendFees} = useFrontendFees(wallet) const stakingKey = useStakingKey(wallet) const swapManager = React.useMemo(() => { - const aggregatorTokenId = isMainnet ? milkTokenId.mainnet : milkTokenId.preprod + const aggregatorTokenId = wallet.isMainnet ? milkTokenId.mainnet : milkTokenId.preprod const swapStorage = swapStorageMaker() const swapApi = swapApiMaker({ - isMainnet, + isMainnet: wallet.isMainnet, stakingKey, primaryTokenId: wallet.primaryTokenInfo.id, supportedProviders, }) const frontendFeeTiers = frontendFees?.[aggregator] ?? ([] as const) return swapManagerMaker({swapStorage, swapApi, frontendFeeTiers, aggregator, aggregatorTokenId}) - }, [isMainnet, stakingKey, wallet.primaryTokenInfo.id, frontendFees]) + }, [wallet.isMainnet, wallet.primaryTokenInfo.id, stakingKey, frontendFees]) // resolver const resolverManager = React.useMemo(() => { @@ -108,12 +106,12 @@ export const TxHistoryNavigator = () => { }, }, cslFactory: init, - isMainnet, + isMainnet: wallet.isMainnet, }) const walletStorage = storage.join(`wallet/${wallet.id}/`) const resolverStorage = resolverStorageMaker({storage: walletStorage}) return resolverManagerMaker(resolverStorage, resolverApi) - }, [storage, wallet.id, isMainnet]) + }, [storage, wallet.id, wallet.isMainnet]) // claim const claimApi = React.useMemo(() => { diff --git a/apps/wallet-mobile/translations/messages/src/TxHistory/TxHistoryNavigator.json b/apps/wallet-mobile/translations/messages/src/TxHistory/TxHistoryNavigator.json index 211b8210f4..e4fb22205a 100644 --- a/apps/wallet-mobile/translations/messages/src/TxHistory/TxHistoryNavigator.json +++ b/apps/wallet-mobile/translations/messages/src/TxHistory/TxHistoryNavigator.json @@ -6,12 +6,12 @@ "start": { "line": 435, "column": 16, - "index": 17003 + "index": 16958 }, "end": { "line": 438, "column": 3, - "index": 17092 + "index": 17047 } }, { @@ -21,12 +21,12 @@ "start": { "line": 439, "column": 32, - "index": 17126 + "index": 17081 }, "end": { "line": 442, "column": 3, - "index": 17239 + "index": 17194 } }, { @@ -36,12 +36,12 @@ "start": { "line": 443, "column": 13, - "index": 17254 + "index": 17209 }, "end": { "line": 446, "column": 3, - "index": 17327 + "index": 17282 } }, { @@ -51,12 +51,12 @@ "start": { "line": 447, "column": 17, - "index": 17346 + "index": 17301 }, "end": { "line": 450, "column": 3, - "index": 17423 + "index": 17378 } }, { @@ -66,12 +66,12 @@ "start": { "line": 451, "column": 15, - "index": 17440 + "index": 17395 }, "end": { "line": 454, "column": 3, - "index": 17513 + "index": 17468 } }, { @@ -81,12 +81,12 @@ "start": { "line": 455, "column": 21, - "index": 17536 + "index": 17491 }, "end": { "line": 458, "column": 3, - "index": 17631 + "index": 17586 } }, { @@ -96,12 +96,12 @@ "start": { "line": 459, "column": 14, - "index": 17647 + "index": 17602 }, "end": { "line": 462, "column": 3, - "index": 17728 + "index": 17683 } }, { @@ -111,12 +111,12 @@ "start": { "line": 463, "column": 13, - "index": 17743 + "index": 17698 }, "end": { "line": 466, "column": 3, - "index": 17823 + "index": 17778 } }, { @@ -126,12 +126,12 @@ "start": { "line": 467, "column": 18, - "index": 17843 + "index": 17798 }, "end": { "line": 470, "column": 3, - "index": 17944 + "index": 17899 } }, { @@ -141,12 +141,12 @@ "start": { "line": 471, "column": 20, - "index": 17966 + "index": 17921 }, "end": { "line": 474, "column": 3, - "index": 18055 + "index": 18010 } }, { @@ -156,12 +156,12 @@ "start": { "line": 475, "column": 26, - "index": 18083 + "index": 18038 }, "end": { "line": 478, "column": 3, - "index": 18187 + "index": 18142 } }, { @@ -171,12 +171,12 @@ "start": { "line": 479, "column": 19, - "index": 18208 + "index": 18163 }, "end": { "line": 482, "column": 3, - "index": 18301 + "index": 18256 } }, { @@ -186,12 +186,12 @@ "start": { "line": 483, "column": 16, - "index": 18319 + "index": 18274 }, "end": { "line": 486, "column": 3, - "index": 18405 + "index": 18360 } }, { @@ -201,12 +201,12 @@ "start": { "line": 487, "column": 19, - "index": 18426 + "index": 18381 }, "end": { "line": 493, "column": 3, - "index": 18664 + "index": 18619 } }, { @@ -216,12 +216,12 @@ "start": { "line": 494, "column": 27, - "index": 18693 + "index": 18648 }, "end": { "line": 497, "column": 3, - "index": 18786 + "index": 18741 } }, { @@ -231,12 +231,12 @@ "start": { "line": 498, "column": 13, - "index": 18801 + "index": 18756 }, "end": { "line": 501, "column": 3, - "index": 18876 + "index": 18831 } }, { @@ -246,12 +246,12 @@ "start": { "line": 502, "column": 25, - "index": 18903 + "index": 18858 }, "end": { "line": 505, "column": 3, - "index": 18977 + "index": 18932 } }, { @@ -261,12 +261,12 @@ "start": { "line": 506, "column": 18, - "index": 18997 + "index": 18952 }, "end": { "line": 509, "column": 3, - "index": 19111 + "index": 19066 } }, { @@ -276,12 +276,12 @@ "start": { "line": 510, "column": 28, - "index": 19141 + "index": 19096 }, "end": { "line": 513, "column": 3, - "index": 19237 + "index": 19192 } }, { @@ -291,12 +291,12 @@ "start": { "line": 514, "column": 29, - "index": 19268 + "index": 19223 }, "end": { "line": 517, "column": 3, - "index": 19376 + "index": 19331 } }, { @@ -306,12 +306,12 @@ "start": { "line": 518, "column": 30, - "index": 19408 + "index": 19363 }, "end": { "line": 521, "column": 3, - "index": 19518 + "index": 19473 } } ] \ No newline at end of file