mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Ability to buy native currency and tokens on Optimism and Arbitrum, using Transak (#16031)
This commit is contained in:
parent
21c9fe2de9
commit
47f136380f
@ -374,6 +374,7 @@ const SUPPORTED_CURRENCY_SYMBOLS = {
|
|||||||
SHIB: 'SHIB',
|
SHIB: 'SHIB',
|
||||||
SKL: 'SKL',
|
SKL: 'SKL',
|
||||||
SNX: 'SNX',
|
SNX: 'SNX',
|
||||||
|
SPA: 'SPA',
|
||||||
STETH: 'STETH',
|
STETH: 'STETH',
|
||||||
STORJ: 'STORJ',
|
STORJ: 'STORJ',
|
||||||
SUKU: 'SUKU',
|
SUKU: 'SUKU',
|
||||||
@ -577,9 +578,7 @@ export const BUYABLE_CHAINS_MAP: {
|
|||||||
| typeof CHAIN_IDS.LOCALHOST
|
| typeof CHAIN_IDS.LOCALHOST
|
||||||
| typeof CHAIN_IDS.PALM
|
| typeof CHAIN_IDS.PALM
|
||||||
| typeof CHAIN_IDS.HARMONY
|
| typeof CHAIN_IDS.HARMONY
|
||||||
| typeof CHAIN_IDS.OPTIMISM
|
|
||||||
| typeof CHAIN_IDS.OPTIMISM_TESTNET
|
| typeof CHAIN_IDS.OPTIMISM_TESTNET
|
||||||
| typeof CHAIN_IDS.ARBITRUM
|
|
||||||
>]: BuyableChainSettings;
|
>]: BuyableChainSettings;
|
||||||
} = {
|
} = {
|
||||||
[CHAIN_IDS.MAINNET]: {
|
[CHAIN_IDS.MAINNET]: {
|
||||||
@ -844,6 +843,24 @@ export const BUYABLE_CHAINS_MAP: {
|
|||||||
showOnlyCurrencies: [SUPPORTED_CURRENCY_SYMBOLS.CELO],
|
showOnlyCurrencies: [SUPPORTED_CURRENCY_SYMBOLS.CELO],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
[CHAIN_IDS.OPTIMISM]: {
|
||||||
|
nativeCurrency: CURRENCY_SYMBOLS.ETH,
|
||||||
|
network: 'optimism',
|
||||||
|
transakCurrencies: [
|
||||||
|
SUPPORTED_CURRENCY_SYMBOLS.ETH,
|
||||||
|
SUPPORTED_CURRENCY_SYMBOLS.USDC,
|
||||||
|
],
|
||||||
|
},
|
||||||
|
[CHAIN_IDS.ARBITRUM]: {
|
||||||
|
nativeCurrency: CURRENCY_SYMBOLS.ARBITRUM,
|
||||||
|
network: 'arbitrum',
|
||||||
|
transakCurrencies: [
|
||||||
|
SUPPORTED_CURRENCY_SYMBOLS.ARBITRUM,
|
||||||
|
SUPPORTED_CURRENCY_SYMBOLS.SPA,
|
||||||
|
SUPPORTED_CURRENCY_SYMBOLS.USDC,
|
||||||
|
SUPPORTED_CURRENCY_SYMBOLS.USDS,
|
||||||
|
],
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export const FEATURED_RPCS: RPCDefinition[] = [
|
export const FEATURED_RPCS: RPCDefinition[] = [
|
||||||
|
@ -721,7 +721,7 @@ export function getIsBuyableMoonpayToken(state, symbol) {
|
|||||||
const chainId = getCurrentChainId(state);
|
const chainId = getCurrentChainId(state);
|
||||||
const _symbol = formatMoonpaySymbol(symbol, chainId);
|
const _symbol = formatMoonpaySymbol(symbol, chainId);
|
||||||
return Boolean(
|
return Boolean(
|
||||||
BUYABLE_CHAINS_MAP?.[chainId]?.moonPay.showOnlyCurrencies?.includes(
|
BUYABLE_CHAINS_MAP?.[chainId]?.moonPay?.showOnlyCurrencies?.includes(
|
||||||
_symbol,
|
_symbol,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user