small fix for oracle pool matching

This commit is contained in:
Adrian Brzeziński 2023-08-14 01:06:41 +02:00
parent 0c00c38ca0
commit cf54355c96
1 changed files with 7 additions and 2 deletions

View File

@ -331,9 +331,14 @@ const ListToken = ({ goBack }: { goBack: () => void }) => {
'ExactIn',
true,
)
const marketInfos = swaps.routes.flatMap((x) => x.marketInfos)
const orcaPool = marketInfos.find((x) => x.label === 'Orca')
const raydiumPool = marketInfos.find((x) => x.label === 'Raydium')
const orcaPool = marketInfos.find((x) =>
x.label.toLowerCase().includes('orca'),
)
const raydiumPool = marketInfos.find((x) =>
x.label.toLowerCase().includes('raydium'),
)
setOrcaPoolAddress(orcaPool?.id || '')
setRaydiumPoolAddress(raydiumPool?.id || '')
}