Skip to content

Commit

Permalink
feat: add puso exchange ids (#139)
Browse files Browse the repository at this point in the history
  • Loading branch information
bayological authored Sep 10, 2024
1 parent 09e6291 commit f3ebf0a
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
"[typescript]": {
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": true
"source.organizeImports": "explicit"
},
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescriptreact]": {
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": true
"source.organizeImports": "explicit"
},
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
Expand Down
16 changes: 16 additions & 0 deletions src/config/exchanges.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,14 @@ export const AlfajoresExchanges: Exchange[] = [
'0xBba91F588d031469ABCCA566FE80fB1Ad8Ee3287',
],
},
{
providerAddr: '0x9B64E8EaBD1a035b148cE970d3319c5C3Ad53EC3',
id: '0x7952984d7278ca3417febf52815c321984ac3147ced2c02bb6a02b0bcab08413',
assets: [
'0x874069Fa1Eb16D44d622F2e0Ca25eeA172369bC1',
'0x5E0E3c9419C42a1B04e2525991FB1A2C467AB8bF',
],
},
]

export const BaklavaExchanges: Exchange[] = [
Expand Down Expand Up @@ -350,6 +358,14 @@ export const CeloExchanges: Exchange[] = [
'0x48065fbBE25f71C9282ddf5e1cD6D6A887483D5e',
],
},
{
providerAddr: '0x22d9db95E6Ae61c104A7B6F6C78D7993B94ec901',
id: '0x7952984d7278ca3417febf52815c321984ac3147ced2c02bb6a02b0bcab08413',
assets: [
'0x765DE816845861e75A25fCA122bb6898B8B1282a',
'0x105d4A9306D2E55a71d2Eb95B81553AE1dC20d7B',
],
},
]

export const MentoExchanges: Record<ChainId, Array<Exchange>> = {
Expand Down
13 changes: 13 additions & 0 deletions src/config/tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export enum TokenId {
axlEUROC = 'axlEUROC',
eXOF = 'eXOF',
cKES = 'cKES',
PUSO = 'PUSO',
}

export const NativeStableTokenIds = [TokenId.cUSD, TokenId.cEUR, TokenId.cREAL]
Expand Down Expand Up @@ -104,6 +105,14 @@ export const cKES: Token = Object.freeze({
decimals: 18,
})

export const PUSO: Token = Object.freeze({
id: TokenId.PUSO,
symbol: TokenId.PUSO,
name: 'PUSO',
color: Color.usdcBlue,
decimals: 18,
})

export const Tokens: Record<TokenId, Token> = {
CELO,
cUSD,
Expand All @@ -115,6 +124,7 @@ export const Tokens: Record<TokenId, Token> = {
axlEUROC,
eXOF,
cKES,
PUSO,
}

export const TokenAddresses: Record<ChainId, Record<TokenId, Address>> = Object.freeze({
Expand All @@ -129,6 +139,7 @@ export const TokenAddresses: Record<ChainId, Record<TokenId, Address>> = Object.
[TokenId.axlEUROC]: '0x6e673502c5b55F3169657C004e5797fFE5be6653',
[TokenId.eXOF]: '0xB0FA15e002516d0301884059c0aaC0F0C72b019D',
[TokenId.cKES]: '0x1E0433C1769271ECcF4CFF9FDdD515eefE6CdF92',
[TokenId.PUSO]: '0x5E0E3c9419C42a1B04e2525991FB1A2C467AB8bF',
},
[ChainId.Baklava]: {
[TokenId.CELO]: '0xdDc9bE57f553fe75752D61606B94CBD7e0264eF8',
Expand All @@ -141,6 +152,7 @@ export const TokenAddresses: Record<ChainId, Record<TokenId, Address>> = Object.
[TokenId.axlEUROC]: '0x6f90ac394b1F45290d3023e4Ba0203005cAF2A4B',
[TokenId.eXOF]: '0x64c1D812673E93Bc036AdC3D547d9950696DA5Af',
[TokenId.cKES]: '0x8813Ae180017057d0Cf98C930cED1E7101B97370',
[TokenId.PUSO]: '',
},
[ChainId.Celo]: {
[TokenId.CELO]: '0x471EcE3750Da237f93B8E339c536989b8978a438',
Expand All @@ -153,6 +165,7 @@ export const TokenAddresses: Record<ChainId, Record<TokenId, Address>> = Object.
[TokenId.axlEUROC]: '0x061cc5a2C863E0C1Cb404006D559dB18A34C762d',
[TokenId.eXOF]: '0x73F93dcc49cB8A239e2032663e9475dd5ef29A08',
[TokenId.cKES]: '0x456a3D042C0DbD3db53D5489e98dFb038553B0d0',
[TokenId.PUSO]: '0x105d4A9306D2E55a71d2Eb95B81553AE1dC20d7B',
},
})

Expand Down
13 changes: 13 additions & 0 deletions src/images/tokens/PUSO.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions src/images/tokens/TokenIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import Image from 'next/image'
import { memo } from 'react'
import { Token, TokenId } from 'src/config/tokens'
import CeloIcon from 'src/images/tokens/CELO.svg'
import PUSOIcon from 'src/images/tokens/PUSO.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'
Expand Down Expand Up @@ -43,6 +44,7 @@ function _TokenIcon({ token, size = 'm' }: Props) {
else if (token?.id === TokenId.axlEUROC) imgSrc = axlEUROCIcon
else if (token?.id === TokenId.eXOF) imgSrc = eXOFIcon
else if (token?.id === TokenId.cKES) imgSrc = cKESIcon
else if (token?.id === TokenId.PUSO) imgSrc = PUSOIcon

if (imgSrc) {
return (
Expand Down

0 comments on commit f3ebf0a

Please sign in to comment.