Skip to content

Commit

Permalink
move usdrif token to tokens file
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigoncalves committed Aug 28, 2023
1 parent 564f140 commit cee85d3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src/core/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
chainTypesById,
ChainTypesByIdType,
} from 'shared/constants/chainConstants'
import { USDRIF_TESTNET } from 'src/screens/home/TokenImage'

import { getWalletSetting } from './config'

Expand Down Expand Up @@ -91,15 +92,7 @@ const defaultTestnetTokens: ITokenWithoutLogo[] = Object.keys(testnetContracts)
}
})
export const getDefaultTokens = (chainId: ChainTypesByIdType) => {
const usdRifTestnet = {
decimals: 18,
name: 'RIF US Dollar',
symbol: 'USDRIF',
contractAddress: '0x8dbf326e12a9ff37ed6ddf75ada548c2640a6482',
balance: '0x00',
usdBalance: 0,
} as ITokenWithoutLogo
return chainTypesById[chainId] === ChainTypeEnum.MAINNET
? defaultMainnetTokens
: [...defaultTestnetTokens, usdRifTestnet]
: [...defaultTestnetTokens, USDRIF_TESTNET]
}
10 changes: 10 additions & 0 deletions src/screens/home/TokenImage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {

import { FrownFaceIcon } from 'components/icons'
import { sharedColors } from 'shared/constants'
import { ITokenWithoutLogo } from 'src/redux/slices/balancesSlice/types'

interface Props {
symbol: string
Expand Down Expand Up @@ -278,3 +279,12 @@ export const getIconSource = (
return undefined
}
}

export const USDRIF_TESTNET = {
decimals: 18,
name: 'RIF US Dollar',
symbol: 'USDRIF',
contractAddress: '0x8dbf326e12a9ff37ed6ddf75ada548c2640a6482',
balance: '0x00',
usdBalance: 0,
} as ITokenWithoutLogo

0 comments on commit cee85d3

Please sign in to comment.