Skip to content

Commit

Permalink
Get market price of each pool, not the selected
Browse files Browse the repository at this point in the history
  • Loading branch information
jorbuedo committed Oct 11, 2023
1 parent 5b5872d commit 412fea9
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {useSwap} from '@yoroi/swap'
import {getMarketPrice, useSwap} from '@yoroi/swap'
import {Swap} from '@yoroi/types'
import React, {useState} from 'react'
import {StyleSheet, Text, TouchableOpacity, View} from 'react-native'
Expand Down Expand Up @@ -79,7 +79,7 @@ export const SelectPoolFromList = ({pools = []}: Props) => {

<Text style={styles.infoValue}>
{Quantities.format(
orderData.selectedPoolCalculation?.prices.market ?? Quantities.zero,
getMarketPrice(pool, orderData.amounts.sell) ?? Quantities.zero,
denomination,
PRECISION,
)}
Expand Down

0 comments on commit 412fea9

Please sign in to comment.