A Metamask fork with Infura removed and default networks editable
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
ciphermask/ui/helpers/utils/moonpay.js

19 lines
503 B

import {
BUYABLE_CHAINS_MAP,
CHAIN_IDS,
} from '../../../shared/constants/network';
export const formatMoonpaySymbol = (symbol, chainId = CHAIN_IDS.MAINNET) => {
if (!symbol) {
return symbol;
}
let _symbol = symbol;
if (chainId === CHAIN_IDS.POLYGON || chainId === CHAIN_IDS.BSC) {
_symbol = `${_symbol}_${BUYABLE_CHAINS_MAP?.[
chainId
]?.network.toUpperCase()}`;
} else if (chainId === CHAIN_IDS.AVALANCHE) {
_symbol = `${_symbol}_CCHAIN`;
}
return _symbol;
};