update price show for history
This commit is contained in:
parent
f5c88d4669
commit
d7cdb16d4c
@ -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
|
||||||
|
@ -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}
|
||||||
}
|
}
|
@ -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>$ {{ event.usd }}</p>
|
<p>$ {{ event.usd }}</p>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user