diff --git a/src/frontend/src/lib/derived/tokens.derived.ts b/src/frontend/src/lib/derived/tokens.derived.ts index 091ffd5d33..5a6b541842 100644 --- a/src/frontend/src/lib/derived/tokens.derived.ts +++ b/src/frontend/src/lib/derived/tokens.derived.ts @@ -1,4 +1,5 @@ import { enabledBitcoinTokens } from '$btc/derived/tokens.derived'; +import { SOLANA_NETWORK_ENABLED } from '$env/networks/networks.sol.env'; import { BTC_MAINNET_TOKEN } from '$env/tokens/tokens.btc.env'; import { ETHEREUM_TOKEN } from '$env/tokens/tokens.eth.env'; import { ICP_TOKEN } from '$env/tokens/tokens.icp.env'; @@ -31,9 +32,9 @@ export const tokens: Readable = derived( ICP_TOKEN, ...$enabledBitcoinTokens, ...$enabledEthereumTokens, + ...$enabledSolanaTokens, ...$erc20Tokens, - ...$icrcTokens, - ...$enabledSolanaTokens + ...$icrcTokens ] ); @@ -43,7 +44,7 @@ export const tokensToPin: Readable = derived( BTC_MAINNET_TOKEN, ETHEREUM_TOKEN, ICP_TOKEN, - SOLANA_TOKEN, + ...(SOLANA_NETWORK_ENABLED ? [SOLANA_TOKEN] : []), ...$icrcChainFusionDefaultTokens ] ); diff --git a/src/frontend/src/tests/lib/derived/tokens.derived.spec.ts b/src/frontend/src/tests/lib/derived/tokens.derived.spec.ts index 71bfc906de..f22bfffeab 100644 --- a/src/frontend/src/tests/lib/derived/tokens.derived.spec.ts +++ b/src/frontend/src/tests/lib/derived/tokens.derived.spec.ts @@ -85,11 +85,11 @@ describe('tokens.derived', () => { ICP_TOKEN, BTC_MAINNET_TOKEN, ETHEREUM_TOKEN, + SOLANA_TOKEN, { ...mockErc20DefaultToken, enabled: false, version: undefined }, mockEr20UserToken, - { ...mockIcrcDefaultToken, enabled: false, version: undefined, id: result[5].id }, - { ...mockIcrcCustomToken, id: result[6].id }, - SOLANA_TOKEN + { ...mockIcrcDefaultToken, enabled: false, version: undefined, id: result[6].id }, + { ...mockIcrcCustomToken, id: result[7].id } ]); });