Skip to content

Commit

Permalink
tokenDisplay depending on chainId from url (#683)
Browse files Browse the repository at this point in the history
  • Loading branch information
josojo authored Jun 11, 2021
1 parent c54a633 commit 9879e98
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/components/auction/OrderPlacement/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,7 @@ const OrderPlacement: React.FC<OrderPlacementProps> = (props) => {
}}
/>
<PriceInputPanel
chainId={chainId}
info={priceInfo}
invertPrices={showPriceInverted}
onInvertPrices={onInvertPrices}
Expand Down
5 changes: 2 additions & 3 deletions src/components/form/PriceInputPanel/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React, { useMemo } from 'react'
import styled from 'styled-components'
import { Token } from 'uniswap-xdai-sdk'

import { useActiveWeb3React } from '../../../hooks'
import { getTokenDisplay } from '../../../utils'
import { Tooltip } from '../../common/Tooltip'
import { InvertIcon } from '../../icons/InvertIcon'
Expand Down Expand Up @@ -41,6 +40,7 @@ const InvertButton = styled(FieldRowLineButton)`
`

interface Props {
chainId: number
info?: FieldRowInfoProps
invertPrices: boolean
onInvertPrices: () => void
Expand All @@ -51,6 +51,7 @@ interface Props {

const PriceInputPanel = (props: Props) => {
const {
chainId,
info,
invertPrices,
onInvertPrices,
Expand All @@ -61,8 +62,6 @@ const PriceInputPanel = (props: Props) => {
} = props
const error = info?.type === InfoType.error

const { chainId } = useActiveWeb3React()

const { auctioningTokenDisplay, biddingTokenDisplay } = useMemo(() => {
if (tokens && chainId && tokens.auctioningToken && tokens.biddingToken) {
return {
Expand Down

0 comments on commit 9879e98

Please sign in to comment.