mirror of
https://github.com/Permissionless-Software-Foundation/bch-js.git
synced 2026-09-21 16:51:59 -07:00
Merge pull request #184 from Permissionless-Software-Foundation/ct-unstable
fix(Transaction.get()): Validating SLP inputs
This commit is contained in:
+10
-1
@@ -112,7 +112,16 @@ class Transaction {
|
||||
// )
|
||||
|
||||
let tokenQty = 0
|
||||
if (inTokenData.txType === 'SEND') {
|
||||
|
||||
// Validate the input. Mark qty as null if not valid.
|
||||
const vinIsValid = await this.slpUtils.waterfallValidateTxid(
|
||||
thisVin.txid
|
||||
)
|
||||
|
||||
if (!vinIsValid) {
|
||||
// If the input is not a valid, then set qty as null.
|
||||
tokenQty = null
|
||||
} else if (inTokenData.txType === 'SEND') {
|
||||
// Get the appropriate vout token amount. This may throw an error,
|
||||
// which means this Vin is not actually a token UTXO, it was just
|
||||
// associated with a previous token TX.
|
||||
|
||||
Reference in New Issue
Block a user