Skip to content

Commit

Permalink
ALL-3518 - apply validations to signatureId based BTC transactions (#…
Browse files Browse the repository at this point in the history
…1023)

ALL-3518 - apply fee and balance validations to signatureId based BTC transactions
  • Loading branch information
Smrecz authored Nov 20, 2023
1 parent 588d413 commit aed5166
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tatumio",
"version": "2.2.39",
"version": "2.2.40",
"license": "MIT",
"repository": "https://github.com/tatumio/tatum-js",
"scripts": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -343,13 +343,19 @@ export const btcBasedTransactions = (

const fromAddress = body.fromAddress
if (fromAddress && 'signatureId' in fromAddress[0] && fromAddress[0].signatureId) {
if (!options.skipAllChecks) {
verifyAmounts(tx, body)
}
return JSON.stringify(tx)
}
} else if ('fromUTXO' in body) {
privateKeysToSign = await privateKeysFromUTXO(tx, body, options)

const fromUTXO = body.fromUTXO
if (fromUTXO && 'signatureId' in fromUTXO[0] && fromUTXO[0].signatureId) {
if (!options.skipAllChecks) {
verifyAmounts(tx, body)
}
return JSON.stringify(tx)
}
}
Expand Down

0 comments on commit aed5166

Please sign in to comment.