Skip to content

Commit

Permalink
Issuance History Updated
Browse files Browse the repository at this point in the history
  • Loading branch information
adebayooriyomi committed Oct 5, 2020
1 parent f8007e2 commit d21e2f0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions client/src/views/asset-issuance-history.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ 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)
}
})

// 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)
Expand Down

0 comments on commit d21e2f0

Please sign in to comment.