Skip to content

Commit d21e2f0

Browse files
Issuance History Updated
1 parent f8007e2 commit d21e2f0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

client/src/views/asset-issuance-history.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,17 @@ export default (assetTxs, chain_stats, asset, t) => {
1515
calTxObj.block_time = formatTime(tx.status.block_time)
1616

1717
// Find all Issuance and add them to Supply
18-
tx.vin.map(vinTx => {
19-
if("issuance" in vinTx){
18+
tx.vin.forEach(vinTx => {
19+
if("issuance" in vinTx && vinTx.issuance.asset_id === asset.asset_id){
2020
calTxObj.supplyChange = chain_stats.has_blinded_issuances ? t`Confidential` : `+ ${formatAssetAmount((vinTx.issuance.assetamount), asset.precision, t).text}`
2121
calTxObj.totalSupply = chain_stats.has_blinded_issuances ? t`Confidential` : formatAssetAmount((supply + vinTx.issuance.assetamount), asset.precision, t)
2222
supply = (supply + vinTx.issuance.assetamount)
2323
}
2424
})
2525

2626
// Find all Burn Transactions and Remove them from Supply
27-
tx.vout.map(voutTx => {
28-
if(voutTx.scriptpubkey_type === "op_return"){
27+
tx.vout.forEach(voutTx => {
28+
if(voutTx.scriptpubkey_type === "op_return" && voutTx.asset === asset.asset_id){
2929
if(voutTx.value > 0){
3030
calTxObj.supplyChange = chain_stats.has_blinded_issuances ? t`Confidential` : `- ${formatAssetAmount((voutTx.value), asset.precision, t).text}`
3131
calTxObj.totalSupply = chain_stats.has_blinded_issuances ? t`Confidential` : formatAssetAmount((supply - voutTx.value), asset.precision, t)

0 commit comments

Comments
 (0)