Skip to content

Commit

Permalink
Feat: bridged USDC symbol
Browse files Browse the repository at this point in the history
  • Loading branch information
cmgustavo committed Nov 13, 2023
1 parent fc3401d commit 5dc3a76
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 6 deletions.
16 changes: 14 additions & 2 deletions src/constants/SupportedCurrencyOptions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -261,15 +261,27 @@ export const SupportedTokenOptions: Array<SupportedCurrencyOption> = [
{
id: Math.random().toString(),
img: CurrencyListIcons.usdc_m,
currencyName: 'USD Coin',
currencyAbbreviation: 'usdc',
currencyName: 'USD Coin (PoS)',
currencyAbbreviation: 'usdc_1',
chain: 'matic',
isToken: true,
imgSrc: require('../../assets/img/currencies/png/USDC.png'),
badgeSrc: require('../../assets/img/currencies/png/MATIC.png'),
badgeUri: CurrencyListIcons.matic,
tokenAddress: '0x2791bca1f2de4661ed88a30c99a7a9449aa84174',
},
{
id: Math.random().toString(),
img: CurrencyListIcons.usdc_m,
currencyName: 'Native USD Coin (PoS)',
currencyAbbreviation: 'usdc',
chain: 'matic',
isToken: true,
imgSrc: require('../../assets/img/currencies/png/USDC.png'),
badgeSrc: require('../../assets/img/currencies/png/MATIC.png'),
badgeUri: CurrencyListIcons.matic,
tokenAddress: '0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359',
},
{
id: Math.random().toString(),
img: CurrencyListIcons.ape_m,
Expand Down
35 changes: 34 additions & 1 deletion src/constants/currencies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -478,10 +478,43 @@ export const BitpaySupportedMaticTokens: {[key in string]: CurrencyOpts} = {
},
},
'0x2791bca1f2de4661ed88a30c99a7a9449aa84174_m': {
name: 'USD Coin',
name: 'USD Coin (PoS)',
chain: 'matic',
coin: 'usdc',
address: '0x2791bca1f2de4661ed88a30c99a7a9449aa84174',
unitInfo: {
unitName: 'USDC.e',
unitToSatoshi: 1e6,
unitDecimals: 6,
unitCode: 'usdc_1',
},
properties: {
hasMultiSig: false,
hasMultiSend: false,
isUtxo: false,
isERCToken: true,
isStableCoin: true,
singleAddress: true,
},
paymentInfo: {
paymentCode: 'EIP681b',
protocolPrefix: {livenet: 'matic', testnet: 'matic'},
ratesApi: 'https://bws.bitpay.com/bws/api/v3/fiatrates/usdc_m',
blockExplorerUrls: EVM_BLOCKCHAIN_EXPLORERS.matic.livenet,
blockExplorerUrlsTestnet: EVM_BLOCKCHAIN_EXPLORERS.matic.testnet,
},
feeInfo: {
feeUnit: 'Gwei',
feeUnitAmount: 1e9,
blockTime: 0.2,
maxMerchantFee: 'urgent',
},
},
'0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359_m': {
name: 'Native USD Coin (PoS)',
chain: 'matic',
coin: 'usdc',
address: '0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359',
unitInfo: {
unitName: 'USDC',
unitToSatoshi: 1e6,
Expand Down
10 changes: 8 additions & 2 deletions src/constants/tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,16 @@ export const BitpaySupportedEthereumTokenOptsByAddress: TokenOptsType = {
};

export const BitpaySupportedMaticTokenOptsByAddress: TokenOptsType = {
'0x2791bca1f2de4661ed88a30c99a7a9449aa84174_m': {
name: 'USD Coin',
'0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359_m': {
name: 'Native USD Coin (PoS)',
symbol: 'usdc',
decimals: 6,
address: '0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359',
},
'0x2791bca1f2de4661ed88a30c99a7a9449aa84174_m': {
name: 'USD Coin (PoS)',
symbol: 'usdc_1',
decimals: 6,
address: '0x2791bca1f2de4661ed88a30c99a7a9449aa84174',
},
'0xdab529f40e671a1d4bf91361c21bf9f0c9712ab7_m': {
Expand Down
2 changes: 1 addition & 1 deletion src/store/wallet/effects/currencies/currencies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ const populateTokenInfo = ({
}) => {
const tokenAddressWithSuffix = addTokenChainSuffix(token.address, chain);
const tokenData = {
name: token.name.replace('(PoS)', '').trim(),
name: token.name,
chain,
coin: token.symbol.toLowerCase(),
logoURI: token.logoURI,
Expand Down

0 comments on commit 5dc3a76

Please sign in to comment.