Skip to content

Commit 6006606

Browse files
committed
fixup@ feat(suite-native): only download token definitions for relevant networks
1 parent 59c0334 commit 6006606

File tree

6 files changed

+4
-6
lines changed

6 files changed

+4
-6
lines changed

suite-native/discovery/src/discoveryMiddleware.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { createMiddlewareWithExtraDeps } from '@suite-common/redux-utils';
2+
import { periodicCheckTokenDefinitionsThunk } from '@suite-common/token-definitions';
13
import {
24
deviceActions,
35
discoveryActions,
@@ -6,7 +8,6 @@ import {
68
authorizeDeviceThunk,
79
accountsActions,
810
} from '@suite-common/wallet-core';
9-
import { createMiddlewareWithExtraDeps } from '@suite-common/redux-utils';
1011
import { isFirmwareVersionSupported } from '@suite-native/device';
1112

1213
import { startDescriptorPreloadedDiscoveryThunk, discoveryCheckThunk } from './discoveryThunks';
@@ -17,7 +18,6 @@ import {
1718
setEnabledDiscoveryNetworkSymbols,
1819
toggleEnabledDiscoveryNetworkSymbol,
1920
} from './discoveryConfigSlice';
20-
import { periodicCheckTokenDefinitionsThunk } from '@suite-common/token-definitions';
2121

2222
export const prepareDiscoveryMiddleware = createMiddlewareWithExtraDeps(
2323
(action, { dispatch, next, getState }) => {

suite-native/state/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
"@suite-native/module-send": "workspace:*",
3232
"@suite-native/settings": "workspace:*",
3333
"@suite-native/storage": "workspace:*",
34-
"@suite-native/tokens": "workspace:*",
3534
"@trezor/transport-native": "workspace:*",
3635
"@trezor/utils": "workspace:*",
3736
"expo-device": "6.0.2",

suite-native/state/src/extraDependencies.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export const extraDependencies: ExtraDependencies = mergeDeepObject(extraDepende
3636
// otherwise disableAccountsThunk might erase accounts not supported by current device
3737
selectEnabledNetworks: selectEnabledDiscoveryNetworkSymbols,
3838
// todo: this is temporary solution to make token definitions work on native in portfolio tracker
39-
selectTokenDefinitionsEnabledNetworks: selectTokenDefinitionsEnabledNetworks,
39+
selectTokenDefinitionsEnabledNetworks,
4040
selectBitcoinAmountUnit: selectBitcoinUnits,
4141
selectAreSatsAmountUnit,
4242
selectLocalCurrency: selectFiatCurrencyCode,

suite-native/state/tsconfig.json

-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
{ "path": "../module-send" },
3535
{ "path": "../settings" },
3636
{ "path": "../storage" },
37-
{ "path": "../tokens" },
3837
{
3938
"path": "../../packages/transport-native"
4039
},

suite-native/tokens/src/tokensSelectors.ts

+1
Original file line numberDiff line numberDiff line change
@@ -284,5 +284,6 @@ export const selectNetworkSymbolsOfAccountsWithTokensAllowed = (state: TokensRoo
284284
if (!acc.includes(account.symbol)) {
285285
acc.push(account.symbol);
286286
}
287+
287288
return acc;
288289
}, new Array<NetworkSymbol>());

yarn.lock

-1
Original file line numberDiff line numberDiff line change
@@ -10508,7 +10508,6 @@ __metadata:
1050810508
"@suite-native/module-send": "workspace:*"
1050910509
"@suite-native/settings": "workspace:*"
1051010510
"@suite-native/storage": "workspace:*"
10511-
"@suite-native/tokens": "workspace:*"
1051210511
"@trezor/transport-native": "workspace:*"
1051310512
"@trezor/utils": "workspace:*"
1051410513
expo-device: "npm:6.0.2"

0 commit comments

Comments
 (0)