update price show for history

This commit is contained in:
CounterFire2023 2024-07-02 15:06:00 +08:00
parent f5c88d4669
commit d7cdb16d4c
3 changed files with 3 additions and 2 deletions

View File

@ -54,6 +54,7 @@ const getHistoryList = async () => {
sub.event.usd = _data.usd sub.event.usd = _data.usd
sub.event.currencyName = _data.currencyName sub.event.currencyName = _data.currencyName
sub.event.amount = _data.amount sub.event.amount = _data.amount
sub.event.decimals = _data.decimals
} }
} }
nftList.value = res.rows nftList.value = res.rows

View File

@ -273,5 +273,5 @@ export const parseTradeEvent = (event) => {
let amount = parseFloat(ethers.utils.formatUnits(amountBn, currencyData.decimals)) let amount = parseFloat(ethers.utils.formatUnits(amountBn, currencyData.decimals))
usd = (amount * price.price).toFixed(2) usd = (amount * price.price).toFixed(2)
} }
return {icon, price, usd, currencyName, amount: amountBn} return {icon, price, usd, currencyName, amount: amountBn, decimals: currencyData.decimals}
} }

View File

@ -21,7 +21,7 @@
<a-table-column title="Price" data-index="event" :width="400"> <a-table-column title="Price" data-index="event" :width="400">
<template #default="{ text: event }"> <template #default="{ text: event }">
<div class="price"> <div class="price">
<div class="nft-price">{{ priceCalculated(event.amount) }}</div> <div class="nft-price">{{ priceCalculated(event.amount, event.decimals) }}</div>
<p>$ &nbsp; {{ event.usd }}</p> <p>$ &nbsp; {{ event.usd }}</p>
</div> </div>
</template> </template>