Skip to content

Commit

Permalink
fixup@ feat(suite-native): only download token definitions for releva…
Browse files Browse the repository at this point in the history
…nt networks
  • Loading branch information
vytick committed Nov 6, 2024
1 parent 59c0334 commit 6006606
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions suite-native/discovery/src/discoveryMiddleware.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { createMiddlewareWithExtraDeps } from '@suite-common/redux-utils';
import { periodicCheckTokenDefinitionsThunk } from '@suite-common/token-definitions';
import {
deviceActions,
discoveryActions,
Expand All @@ -6,7 +8,6 @@ import {
authorizeDeviceThunk,
accountsActions,
} from '@suite-common/wallet-core';
import { createMiddlewareWithExtraDeps } from '@suite-common/redux-utils';
import { isFirmwareVersionSupported } from '@suite-native/device';

import { startDescriptorPreloadedDiscoveryThunk, discoveryCheckThunk } from './discoveryThunks';
Expand All @@ -17,7 +18,6 @@ import {
setEnabledDiscoveryNetworkSymbols,
toggleEnabledDiscoveryNetworkSymbol,
} from './discoveryConfigSlice';
import { periodicCheckTokenDefinitionsThunk } from '@suite-common/token-definitions';

export const prepareDiscoveryMiddleware = createMiddlewareWithExtraDeps(
(action, { dispatch, next, getState }) => {
Expand Down
1 change: 0 additions & 1 deletion suite-native/state/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
"@suite-native/module-send": "workspace:*",
"@suite-native/settings": "workspace:*",
"@suite-native/storage": "workspace:*",
"@suite-native/tokens": "workspace:*",
"@trezor/transport-native": "workspace:*",
"@trezor/utils": "workspace:*",
"expo-device": "6.0.2",
Expand Down
2 changes: 1 addition & 1 deletion suite-native/state/src/extraDependencies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export const extraDependencies: ExtraDependencies = mergeDeepObject(extraDepende
// otherwise disableAccountsThunk might erase accounts not supported by current device
selectEnabledNetworks: selectEnabledDiscoveryNetworkSymbols,
// todo: this is temporary solution to make token definitions work on native in portfolio tracker
selectTokenDefinitionsEnabledNetworks: selectTokenDefinitionsEnabledNetworks,
selectTokenDefinitionsEnabledNetworks,
selectBitcoinAmountUnit: selectBitcoinUnits,
selectAreSatsAmountUnit,
selectLocalCurrency: selectFiatCurrencyCode,
Expand Down
1 change: 0 additions & 1 deletion suite-native/state/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
{ "path": "../module-send" },
{ "path": "../settings" },
{ "path": "../storage" },
{ "path": "../tokens" },
{
"path": "../../packages/transport-native"
},
Expand Down
1 change: 1 addition & 0 deletions suite-native/tokens/src/tokensSelectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -284,5 +284,6 @@ export const selectNetworkSymbolsOfAccountsWithTokensAllowed = (state: TokensRoo
if (!acc.includes(account.symbol)) {
acc.push(account.symbol);
}

return acc;
}, new Array<NetworkSymbol>());
1 change: 0 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10508,7 +10508,6 @@ __metadata:
"@suite-native/module-send": "workspace:*"
"@suite-native/settings": "workspace:*"
"@suite-native/storage": "workspace:*"
"@suite-native/tokens": "workspace:*"
"@trezor/transport-native": "workspace:*"
"@trezor/utils": "workspace:*"
expo-device: "npm:6.0.2"
Expand Down

0 comments on commit 6006606

Please sign in to comment.