From 5559c459fac20373442b9c5d293d145832aa97c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20Gon=C3=A7alves?= Date: Mon, 28 Aug 2023 19:08:55 -0300 Subject: [PATCH] move usdrif token to tokens file --- src/core/setup.ts | 11 ++--------- src/screens/home/TokenImage.tsx | 10 ++++++++++ 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/core/setup.ts b/src/core/setup.ts index bb211cc23..4947167a4 100644 --- a/src/core/setup.ts +++ b/src/core/setup.ts @@ -14,6 +14,7 @@ import { chainTypesById, ChainTypesByIdType, } from 'shared/constants/chainConstants' +import { USDRIF_TESTNET } from 'src/screens/home/TokenImage' import { getWalletSetting } from './config' @@ -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] } diff --git a/src/screens/home/TokenImage.tsx b/src/screens/home/TokenImage.tsx index ec447344a..ec7ab9368 100644 --- a/src/screens/home/TokenImage.tsx +++ b/src/screens/home/TokenImage.tsx @@ -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 @@ -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