From 6c7f578d5d3e9baed56357fc9518f62e97bf2168 Mon Sep 17 00:00:00 2001 From: philbow61 <80156619+philbow61@users.noreply.github.com> Date: Fri, 31 May 2024 15:03:56 +0200 Subject: [PATCH] feat: USDT/cUSD pools (#132) --- src/config/exchanges.ts | 78 +++++++++++++++++++++------------ src/config/tokens.ts | 12 +++++ src/features/chart/types.ts | 1 - src/images/tokens/TokenIcon.tsx | 2 + src/images/tokens/USDT.svg | 3 ++ 5 files changed, 68 insertions(+), 28 deletions(-) create mode 100644 src/images/tokens/USDT.svg diff --git a/src/config/exchanges.ts b/src/config/exchanges.ts index 5f70aa7..26e4685 100644 --- a/src/config/exchanges.ts +++ b/src/config/exchanges.ts @@ -34,10 +34,10 @@ export const AlfajoresExchanges: Exchange[] = [ }, { providerAddr: '0x9B64E8EaBD1a035b148cE970d3319c5C3Ad53EC3', - id: '0xf77561650ba043a244ae9c58f778c141532c4afdb7cae5e6fd623b565c5584a0', + id: '0xe8693b17c0f002f6a2fe839525557cef10dfeacef9e16c9bbdcb01c57933ce58', assets: [ - '0x874069Fa1Eb16D44d622F2e0Ca25eeA172369bC1', - '0x87D61dA3d668797786D73BC674F053f87111570d', + '0xE4D517785D091D3c54818832dB6094bcc2744545', + '0x2F25deB3848C207fc8E0c34035B3Ba7fC157602B', ], }, { @@ -82,10 +82,10 @@ export const AlfajoresExchanges: Exchange[] = [ }, { providerAddr: '0x9B64E8EaBD1a035b148cE970d3319c5C3Ad53EC3', - id: '0xacc988382b66ee5456086643dcfd9a5ca43dd8f428f6ef22503d8b8013bcffd7', + id: '0x89de88b8eb790de26f4649f543cb6893d93635c728ac857f0926e842fb0d298b', assets: [ '0x874069Fa1Eb16D44d622F2e0Ca25eeA172369bC1', - '0x2F25deB3848C207fc8E0c34035B3Ba7fC157602B', + '0x1E0433C1769271ECcF4CFF9FDdD515eefE6CdF92', ], }, { @@ -98,18 +98,26 @@ export const AlfajoresExchanges: Exchange[] = [ }, { providerAddr: '0x9B64E8EaBD1a035b148cE970d3319c5C3Ad53EC3', - id: '0xe8693b17c0f002f6a2fe839525557cef10dfeacef9e16c9bbdcb01c57933ce58', + id: '0xacc988382b66ee5456086643dcfd9a5ca43dd8f428f6ef22503d8b8013bcffd7', assets: [ - '0xE4D517785D091D3c54818832dB6094bcc2744545', + '0x874069Fa1Eb16D44d622F2e0Ca25eeA172369bC1', '0x2F25deB3848C207fc8E0c34035B3Ba7fC157602B', ], }, { providerAddr: '0x9B64E8EaBD1a035b148cE970d3319c5C3Ad53EC3', - id: '0x89de88b8eb790de26f4649f543cb6893d93635c728ac857f0926e842fb0d298b', + id: '0xf77561650ba043a244ae9c58f778c141532c4afdb7cae5e6fd623b565c5584a0', assets: [ '0x874069Fa1Eb16D44d622F2e0Ca25eeA172369bC1', - '0x1E0433C1769271ECcF4CFF9FDdD515eefE6CdF92', + '0x87D61dA3d668797786D73BC674F053f87111570d', + ], + }, + { + providerAddr: '0x9B64E8EaBD1a035b148cE970d3319c5C3Ad53EC3', + id: '0x36e12d20b7a59b463a1a113caf338cbad9d64ee017548d00a791681f2fbf0763', + assets: [ + '0x874069Fa1Eb16D44d622F2e0Ca25eeA172369bC1', + '0xBba91F588d031469ABCCA566FE80fB1Ad8Ee3287', ], }, ] @@ -141,10 +149,10 @@ export const BaklavaExchanges: Exchange[] = [ }, { providerAddr: '0xFF9a3da00F42839CD6D33AD7adf50bCc97B41411', - id: '0xf77561650ba043a244ae9c58f778c141532c4afdb7cae5e6fd623b565c5584a0', + id: '0xbfd96ed0ed5098d2b2bff8b9d8423dc47001fccf2391ee6e532618ef79c12075', assets: [ - '0x62492A644A588FD904270BeD06ad52B9abfEA1aE', - '0xD4079B322c392D6b196f90AA4c439fC2C16d6770', + '0x6a0EEf2bed4C30Dc2CB42fe6c5f01F80f7EF16d1', + '0xB407D37d76c417B6343310D42611FCA106B2abB8', ], }, { @@ -189,10 +197,10 @@ export const BaklavaExchanges: Exchange[] = [ }, { providerAddr: '0xFF9a3da00F42839CD6D33AD7adf50bCc97B41411', - id: '0xd8573fd7c4151f38cde9b2349a26a6bb03be4b3791105bc625731ad2d71c54ba', + id: '0x89de88b8eb790de26f4649f543cb6893d93635c728ac857f0926e842fb0d298b', assets: [ '0x62492A644A588FD904270BeD06ad52B9abfEA1aE', - '0xB407D37d76c417B6343310D42611FCA106B2abB8', + '0x8813Ae180017057d0Cf98C930cED1E7101B97370', ], }, { @@ -205,18 +213,26 @@ export const BaklavaExchanges: Exchange[] = [ }, { providerAddr: '0xFF9a3da00F42839CD6D33AD7adf50bCc97B41411', - id: '0xbfd96ed0ed5098d2b2bff8b9d8423dc47001fccf2391ee6e532618ef79c12075', + id: '0xd8573fd7c4151f38cde9b2349a26a6bb03be4b3791105bc625731ad2d71c54ba', assets: [ - '0x6a0EEf2bed4C30Dc2CB42fe6c5f01F80f7EF16d1', + '0x62492A644A588FD904270BeD06ad52B9abfEA1aE', '0xB407D37d76c417B6343310D42611FCA106B2abB8', ], }, { providerAddr: '0xFF9a3da00F42839CD6D33AD7adf50bCc97B41411', - id: '0x89de88b8eb790de26f4649f543cb6893d93635c728ac857f0926e842fb0d298b', + id: '0xf77561650ba043a244ae9c58f778c141532c4afdb7cae5e6fd623b565c5584a0', assets: [ '0x62492A644A588FD904270BeD06ad52B9abfEA1aE', - '0x8813Ae180017057d0Cf98C930cED1E7101B97370', + '0xD4079B322c392D6b196f90AA4c439fC2C16d6770', + ], + }, + { + providerAddr: '0xFF9a3da00F42839CD6D33AD7adf50bCc97B41411', + id: '0x36e12d20b7a59b463a1a113caf338cbad9d64ee017548d00a791681f2fbf0763', + assets: [ + '0x62492A644A588FD904270BeD06ad52B9abfEA1aE', + '0x27c586469038A1749B27BF5914DAff7A14227AfB', ], }, ] @@ -248,10 +264,10 @@ export const CeloExchanges: Exchange[] = [ }, { providerAddr: '0x22d9db95E6Ae61c104A7B6F6C78D7993B94ec901', - id: '0x0d739efbfc30f303e8d1976c213b4040850d1af40f174f4169b846f6fd3d2f20', + id: '0xe8693b17c0f002f6a2fe839525557cef10dfeacef9e16c9bbdcb01c57933ce58', assets: [ - '0x765DE816845861e75A25fCA122bb6898B8B1282a', - '0xEB466342C4d449BC9f53A865D5Cb90586f405215', + '0xe8537a3d056DA446677B9E9d6c5dB704EaAb4787', + '0xcebA9300f2b948710d2653dD7B07f33A8B32118C', ], }, { @@ -296,10 +312,10 @@ export const CeloExchanges: Exchange[] = [ }, { providerAddr: '0x22d9db95E6Ae61c104A7B6F6C78D7993B94ec901', - id: '0xacc988382b66ee5456086643dcfd9a5ca43dd8f428f6ef22503d8b8013bcffd7', + id: '0x89de88b8eb790de26f4649f543cb6893d93635c728ac857f0926e842fb0d298b', assets: [ '0x765DE816845861e75A25fCA122bb6898B8B1282a', - '0xcebA9300f2b948710d2653dD7B07f33A8B32118C', + '0x456a3D042C0DbD3db53D5489e98dFb038553B0d0', ], }, { @@ -312,18 +328,26 @@ export const CeloExchanges: Exchange[] = [ }, { providerAddr: '0x22d9db95E6Ae61c104A7B6F6C78D7993B94ec901', - id: '0xe8693b17c0f002f6a2fe839525557cef10dfeacef9e16c9bbdcb01c57933ce58', + id: '0xacc988382b66ee5456086643dcfd9a5ca43dd8f428f6ef22503d8b8013bcffd7', assets: [ - '0xe8537a3d056DA446677B9E9d6c5dB704EaAb4787', + '0x765DE816845861e75A25fCA122bb6898B8B1282a', '0xcebA9300f2b948710d2653dD7B07f33A8B32118C', ], }, { providerAddr: '0x22d9db95E6Ae61c104A7B6F6C78D7993B94ec901', - id: '0x89de88b8eb790de26f4649f543cb6893d93635c728ac857f0926e842fb0d298b', + id: '0x0d739efbfc30f303e8d1976c213b4040850d1af40f174f4169b846f6fd3d2f20', assets: [ '0x765DE816845861e75A25fCA122bb6898B8B1282a', - '0x456a3D042C0DbD3db53D5489e98dFb038553B0d0', + '0xEB466342C4d449BC9f53A865D5Cb90586f405215', + ], + }, + { + providerAddr: '0x22d9db95E6Ae61c104A7B6F6C78D7993B94ec901', + id: '0x773bcec109cee923b5e04706044fd9d6a5121b1a6a4c059c36fdbe5b845d4e9b', + assets: [ + '0x765DE816845861e75A25fCA122bb6898B8B1282a', + '0x48065fbBE25f71C9282ddf5e1cD6D6A887483D5e', ], }, ] diff --git a/src/config/tokens.ts b/src/config/tokens.ts index 0cb6a11..795e7ce 100644 --- a/src/config/tokens.ts +++ b/src/config/tokens.ts @@ -21,6 +21,7 @@ export enum TokenId { cEUR = 'cEUR', cREAL = 'cREAL', USDC = 'USDC', + USDT = 'USDT', axlUSDC = 'axlUSDC', axlEUROC = 'axlEUROC', eXOF = 'eXOF', @@ -66,6 +67,13 @@ export const USDC: Token = Object.freeze({ color: Color.usdcBlue, decimals: 6, }) +export const USDT: Token = Object.freeze({ + id: TokenId.USDT, + symbol: TokenId.USDT, + name: 'USDT', + color: Color.usdcBlue, + decimals: 6, +}) export const axlUSDC: Token = Object.freeze({ id: TokenId.axlUSDC, symbol: TokenId.axlUSDC, @@ -102,6 +110,7 @@ export const Tokens: Record = { cEUR, cREAL, USDC, + USDT, axlUSDC, axlEUROC, eXOF, @@ -115,6 +124,7 @@ export const TokenAddresses: Record> = Object. [TokenId.cEUR]: '0x10c892A6EC43a53E45D0B916B4b7D383B1b78C0F', [TokenId.cREAL]: '0xE4D517785D091D3c54818832dB6094bcc2744545', [TokenId.USDC]: '0x2F25deB3848C207fc8E0c34035B3Ba7fC157602B', + [TokenId.USDT]: '0xBba91F588d031469ABCCA566FE80fB1Ad8Ee3287', [TokenId.axlUSDC]: '0x87D61dA3d668797786D73BC674F053f87111570d', [TokenId.axlEUROC]: '0x6e673502c5b55F3169657C004e5797fFE5be6653', [TokenId.eXOF]: '0xB0FA15e002516d0301884059c0aaC0F0C72b019D', @@ -126,6 +136,7 @@ export const TokenAddresses: Record> = Object. [TokenId.cEUR]: '0xf9ecE301247aD2CE21894941830A2470f4E774ca', [TokenId.cREAL]: '0x6a0EEf2bed4C30Dc2CB42fe6c5f01F80f7EF16d1', [TokenId.USDC]: '0xB407D37d76c417B6343310D42611FCA106B2abB8', + [TokenId.USDT]: '0x27c586469038A1749B27BF5914DAff7A14227AfB', [TokenId.axlUSDC]: '0xD4079B322c392D6b196f90AA4c439fC2C16d6770', [TokenId.axlEUROC]: '0x6f90ac394b1F45290d3023e4Ba0203005cAF2A4B', [TokenId.eXOF]: '0x64c1D812673E93Bc036AdC3D547d9950696DA5Af', @@ -137,6 +148,7 @@ export const TokenAddresses: Record> = Object. [TokenId.cEUR]: '0xD8763CBa276a3738E6DE85b4b3bF5FDed6D6cA73', [TokenId.cREAL]: '0xe8537a3d056DA446677B9E9d6c5dB704EaAb4787', [TokenId.USDC]: '0xcebA9300f2b948710d2653dD7B07f33A8B32118C', + [TokenId.USDT]: '0x48065fbBE25f71C9282ddf5e1cD6D6A887483D5e', [TokenId.axlUSDC]: '0xEB466342C4d449BC9f53A865D5Cb90586f405215', [TokenId.axlEUROC]: '0x061cc5a2C863E0C1Cb404006D559dB18A34C762d', [TokenId.eXOF]: '0x73F93dcc49cB8A239e2032663e9475dd5ef29A08', diff --git a/src/features/chart/types.ts b/src/features/chart/types.ts index 53235ff..00dfe8c 100644 --- a/src/features/chart/types.ts +++ b/src/features/chart/types.ts @@ -3,7 +3,6 @@ import { TokenId } from 'src/config/tokens' export enum ForeignQuoteCurrency { BTC = 'BTC', USD = 'USD', - USDT = 'USDT', } export type QuoteCurrency = TokenId | ForeignQuoteCurrency diff --git a/src/images/tokens/TokenIcon.tsx b/src/images/tokens/TokenIcon.tsx index 94c1df8..5952b8a 100644 --- a/src/images/tokens/TokenIcon.tsx +++ b/src/images/tokens/TokenIcon.tsx @@ -3,6 +3,7 @@ import { memo } from 'react' import { Token, TokenId } from 'src/config/tokens' import CeloIcon from 'src/images/tokens/CELO.svg' import USDCIcon from 'src/images/tokens/USDC.svg' +import USDTIcon from 'src/images/tokens/USDT.svg' import axlEUROCIcon from 'src/images/tokens/axlEUROC.svg' import axlUSDCIcon from 'src/images/tokens/axlUSDC.svg' import cEURIcon from 'src/images/tokens/cEUR.svg' @@ -37,6 +38,7 @@ function _TokenIcon({ token, size = 'm' }: Props) { else if (token?.id === TokenId.cEUR) imgSrc = cEURIcon else if (token?.id === TokenId.cREAL) imgSrc = cREALIcon else if (token?.id === TokenId.USDC) imgSrc = USDCIcon + else if (token?.id === TokenId.USDT) imgSrc = USDTIcon else if (token?.id === TokenId.axlUSDC) imgSrc = axlUSDCIcon else if (token?.id === TokenId.axlEUROC) imgSrc = axlEUROCIcon else if (token?.id === TokenId.eXOF) imgSrc = eXOFIcon diff --git a/src/images/tokens/USDT.svg b/src/images/tokens/USDT.svg new file mode 100644 index 0000000..908769b --- /dev/null +++ b/src/images/tokens/USDT.svg @@ -0,0 +1,3 @@ + + +