Compare commits

...
2 Commits
Author SHA1 Message Date
Chris Troutner 52c1ebdafe Merge pull request #182 from Permissionless-Software-Foundation/ct-unstable
fix(Transaction.get()): Fixing bug in previous PR
2021-10-21 19:45:36 -07:00
Chris Troutner 2e56d66f48 fix(Transaction.get()): Fixing bug in previous PR 2021-10-21 19:42:12 -07:00
2 changed files with 8 additions and 2 deletions
+5 -1
View File
@@ -129,7 +129,11 @@ class Transaction {
}
} else if (inTokenData.txType === 'MINT') {
// vout=1 (second output) recieves the newly minted tokens.
tokenQty = inTokenData.qty
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)
})
})
})