Merge pull request #182 from Permissionless-Software-Foundation/ct-unstable

fix(Transaction.get()): Fixing bug in previous PR
This commit is contained in:
Chris Troutner
2021-10-21 19:45:36 -07:00
committed by GitHub
2 changed files with 8 additions and 2 deletions
+4
View File
@@ -129,7 +129,11 @@ class Transaction {
}
} else if (inTokenData.txType === 'MINT') {
// vout=1 (second output) recieves the newly minted tokens.
if (i === 1) {
tokenQty = inTokenData.qty
} else {
tokenQty = null
}
//
} else {
+3 -1
View File
@@ -209,7 +209,9 @@ describe('#TransactionLib', () => {
assert.equal(result.isValidSLPTx, true)
// Assert inputs values unique to a Mint input have the proper values.
assert.equal(result.vin[2].tokenQty, 2.34123)
assert.equal(result.vin[0].tokenQty, 43545.34534)
assert.equal(result.vin[1].tokenQty, 2.34123)
assert.equal(result.vin[2].tokenQty, null)
})
})
})