Skip to content

Commit

Permalink
Merge pull request #7551 from roiLeo/fix/offer/highestOffer
Browse files Browse the repository at this point in the history
🔧 highest offer
  • Loading branch information
roiLeo authored Oct 8, 2023
2 parents 270f11c + 65f144d commit 1c3f63f
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,12 @@ const priceChain = ref('0')
const priceUsd = ref('0')
watchEffect(async () => {
const tokenPrice = await getApproximatePriceOf(chainSymbol.value)
const price = roundTo(format(props.price || '0', decimals.value, ''), 4)
priceChain.value = `${price} ${chainSymbol.value}`
priceUsd.value = `${Math.round(parseInt(price) * tokenPrice)}`
if (props.price) {
const tokenPrice = await getApproximatePriceOf(chainSymbol.value)
const price = roundTo(format(props.price || '0', decimals.value, ''), 4)
priceChain.value = `${price} ${chainSymbol.value}`
priceUsd.value = `${Math.round(parseInt(price) * tokenPrice)}`
}
})
</script>

Expand Down

0 comments on commit 1c3f63f

Please sign in to comment.