Skip to content

Commit

Permalink
fix chain id
Browse files Browse the repository at this point in the history
  • Loading branch information
onnovisser committed Sep 18, 2023
1 parent fae38b3 commit b5cf966
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions centrifuge-app/src/components/Swaps/Orders.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
parseCurrencyKey,
Rate,
} from '@centrifuge/centrifuge-js'
import { getCurrencyChainId } from '@centrifuge/centrifuge-js/dist/modules/liquidityPools'
import {
truncateAddress,
useBalances,
Expand Down Expand Up @@ -190,10 +191,8 @@ export function SwapAndSendDialog({ open, onClose, order }: { open: boolean; onC
const balanceDec =
(balances && findBalance(balances.currencies, order.buyCurrency.key))?.balance.toDecimal() || Dec(0)
const orderBuyDec = order.buyAmount.toDecimal()
let orderBuyCurrencyEVMChain = order.buyCurrency.location?.V3?.interior?.X3?.find((i: any) => !!i.GlobalConsensus)
?.GlobalConsensus?.Ethereum?.chainId
let orderSellCurrencyEVMChain = order.sellCurrency.location?.V3?.interior?.X3?.find((i: any) => !!i.GlobalConsensus)
?.GlobalConsensus?.Ethereum?.chainId
let orderBuyCurrencyEVMChain = getCurrencyChainId(order.buyCurrency)
let orderSellCurrencyEVMChain = getCurrencyChainId(order.sellCurrency)

console.log('orderBuyCurrencyEVMChain', orderBuyCurrencyEVMChain, orderSellCurrencyEVMChain)

Expand Down

0 comments on commit b5cf966

Please sign in to comment.