diff --git a/src/constants/currencies.ts b/src/constants/currencies.ts index 55af765f7..781c90f30 100644 --- a/src/constants/currencies.ts +++ b/src/constants/currencies.ts @@ -1446,7 +1446,7 @@ export const BitpaySupportedEvmCoins: {[key in string]: CurrencyOpts} = { arb: { name: 'Arbitrum', chain: 'arb', - coin: 'arb', + coin: 'eth', feeCurrency: 'eth', unitInfo: { unitName: 'Arbitrum', @@ -1484,7 +1484,7 @@ export const BitpaySupportedEvmCoins: {[key in string]: CurrencyOpts} = { base: { name: 'Base', chain: 'base', - coin: 'base', + coin: 'eth', feeCurrency: 'eth', unitInfo: { unitName: 'Base', diff --git a/src/utils/helper-methods.ts b/src/utils/helper-methods.ts index 9369ab148..8c7b14341 100644 --- a/src/utils/helper-methods.ts +++ b/src/utils/helper-methods.ts @@ -400,6 +400,23 @@ export const getEVMFeeCurrency = (chain: string): string => { } }; +export const getCWCChain = (chain: string): string => { + switch (chain.toLowerCase()) { + case 'eth': + return 'ETHERC20'; + case 'matic': + return 'MATICERC20'; + case 'arb': + return 'ARBERC20'; + case 'base': + return 'BASEERC20'; + case 'op': + return 'OPERC20'; + default: + return 'ETHERC20'; + } +}; + export const getChainUsingSuffix = (symbol: string) => { const suffix = symbol.charAt(symbol.length - 1); switch (suffix) {