From d21e2f08ae73b0385dbd044dc742a1aad5a71736 Mon Sep 17 00:00:00 2001 From: Adebayo Oriyomi Date: Mon, 5 Oct 2020 12:59:36 -0700 Subject: [PATCH] Issuance History Updated --- client/src/views/asset-issuance-history.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/client/src/views/asset-issuance-history.js b/client/src/views/asset-issuance-history.js index 809b8b68..ed5deb0a 100644 --- a/client/src/views/asset-issuance-history.js +++ b/client/src/views/asset-issuance-history.js @@ -15,8 +15,8 @@ export default (assetTxs, chain_stats, asset, t) => { calTxObj.block_time = formatTime(tx.status.block_time) // Find all Issuance and add them to Supply - tx.vin.map(vinTx => { - if("issuance" in vinTx){ + tx.vin.forEach(vinTx => { + if("issuance" in vinTx && vinTx.issuance.asset_id === asset.asset_id){ calTxObj.supplyChange = chain_stats.has_blinded_issuances ? t`Confidential` : `+ ${formatAssetAmount((vinTx.issuance.assetamount), asset.precision, t).text}` calTxObj.totalSupply = chain_stats.has_blinded_issuances ? t`Confidential` : formatAssetAmount((supply + vinTx.issuance.assetamount), asset.precision, t) supply = (supply + vinTx.issuance.assetamount) @@ -24,8 +24,8 @@ export default (assetTxs, chain_stats, asset, t) => { }) // Find all Burn Transactions and Remove them from Supply - tx.vout.map(voutTx => { - if(voutTx.scriptpubkey_type === "op_return"){ + tx.vout.forEach(voutTx => { + if(voutTx.scriptpubkey_type === "op_return" && voutTx.asset === asset.asset_id){ if(voutTx.value > 0){ calTxObj.supplyChange = chain_stats.has_blinded_issuances ? t`Confidential` : `- ${formatAssetAmount((voutTx.value), asset.precision, t).text}` calTxObj.totalSupply = chain_stats.has_blinded_issuances ? t`Confidential` : formatAssetAmount((supply - voutTx.value), asset.precision, t)