Skip to content

Commit

Permalink
Merge branch 'main' into fix(frontend)/do-not-show-token-logo-in-toke…
Browse files Browse the repository at this point in the history
…n-transaction-page
  • Loading branch information
AntonioVentilii authored Nov 15, 2024
2 parents 752fc52 + c8bc00a commit 9776e07
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 10 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 0 additions & 9 deletions src/frontend/src/env/tokens.btc.env.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { BTC_MAINNET_ENABLED } from '$env/networks.btc.env';
import { BTC_MAINNET_NETWORK, BTC_REGTEST_NETWORK, BTC_TESTNET_NETWORK } from '$env/networks.env';
import bitcoin from '$icp/assets/bitcoin.svg';
import bitcoinTestnet from '$icp/assets/bitcoin_testnet.svg';
Expand Down Expand Up @@ -52,11 +51,3 @@ export const BTC_REGTEST_TOKEN: Token = {
decimals: BTC_DECIMALS,
icon: bitcoinTestnet
};

// The following tokens are used as fallback for any Bitcoin token defined in the token store.
// That means that the order of the tokens in the array is important, to have a correct fallback chain.
export const SUPPORTED_BITCOIN_TOKENS: [...Token[], Token] = [
...(BTC_MAINNET_ENABLED ? [BTC_MAINNET_TOKEN] : []),
BTC_TESTNET_TOKEN,
BTC_REGTEST_TOKEN
];
12 changes: 11 additions & 1 deletion src/frontend/src/lib/constants/tokens.constants.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
import { SUPPORTED_BITCOIN_TOKENS } from '$env/tokens.btc.env';
import { BTC_MAINNET_ENABLED } from '$env/networks.btc.env';
import { BTC_MAINNET_TOKEN, BTC_REGTEST_TOKEN, BTC_TESTNET_TOKEN } from '$env/tokens.btc.env';
import { SUPPORTED_ETHEREUM_TOKENS } from '$env/tokens.env';
import type { Token } from '$lib/types/token';

export const [DEFAULT_ETHEREUM_TOKEN, _rest] = SUPPORTED_ETHEREUM_TOKENS;

// The following tokens are used as fallback for any Bitcoin token defined in the token store.
// That means that the order of the tokens in the array is important, to have a correct fallback chain.
export const SUPPORTED_BITCOIN_TOKENS: [...Token[], Token] = [
...(BTC_MAINNET_ENABLED ? [BTC_MAINNET_TOKEN] : []),
BTC_TESTNET_TOKEN,
BTC_REGTEST_TOKEN
];

export const [DEFAULT_BITCOIN_TOKEN, _] = SUPPORTED_BITCOIN_TOKENS;

0 comments on commit 9776e07

Please sign in to comment.