Commit 41330ab0 authored by Moody Salem's avatar Moody Salem

fix: price tokens on optimism mainnet using DAI

parent 4ba9d98e
...@@ -30,6 +30,13 @@ export const USDC_ARBITRUM = new Token( ...@@ -30,6 +30,13 @@ export const USDC_ARBITRUM = new Token(
'USDC', 'USDC',
'USD//C' 'USD//C'
) )
export const DAI_OPTIMISM = new Token(
SupportedChainId.OPTIMISM,
'0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1',
18,
'DAI',
'Dai stable coin'
)
export const USDT = new Token( export const USDT = new Token(
SupportedChainId.MAINNET, SupportedChainId.MAINNET,
'0xdAC17F958D2ee523a2206206994597C13D831ec7', '0xdAC17F958D2ee523a2206206994597C13D831ec7',
......
import { Currency, CurrencyAmount, Price, Token } from '@uniswap/sdk-core' import { Currency, CurrencyAmount, Price, Token } from '@uniswap/sdk-core'
import { useMemo } from 'react' import { useMemo } from 'react'
import { SupportedChainId } from '../constants/chains' import { SupportedChainId } from '../constants/chains'
import { USDC, USDC_ARBITRUM } from '../constants/tokens' import { DAI_OPTIMISM, USDC, USDC_ARBITRUM } from '../constants/tokens'
import { useV2TradeExactOut } from './useV2Trade' import { useV2TradeExactOut } from './useV2Trade'
import { useBestV3TradeExactOut } from './useBestV3Trade' import { useBestV3TradeExactOut } from './useBestV3Trade'
import { useActiveWeb3React } from './web3' import { useActiveWeb3React } from './web3'
...@@ -11,6 +11,7 @@ import { useActiveWeb3React } from './web3' ...@@ -11,6 +11,7 @@ import { useActiveWeb3React } from './web3'
const STABLECOIN_AMOUNT_OUT: { [chainId: number]: CurrencyAmount<Token> } = { const STABLECOIN_AMOUNT_OUT: { [chainId: number]: CurrencyAmount<Token> } = {
[SupportedChainId.MAINNET]: CurrencyAmount.fromRawAmount(USDC, 100_000e6), [SupportedChainId.MAINNET]: CurrencyAmount.fromRawAmount(USDC, 100_000e6),
[SupportedChainId.ARBITRUM_ONE]: CurrencyAmount.fromRawAmount(USDC_ARBITRUM, 10_000e6), [SupportedChainId.ARBITRUM_ONE]: CurrencyAmount.fromRawAmount(USDC_ARBITRUM, 10_000e6),
[SupportedChainId.OPTIMISM]: CurrencyAmount.fromRawAmount(DAI_OPTIMISM, 10_000e18),
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment