Skip to content

Commit

Permalink
Bail early in createTransaction if we are in viewOnlyMode
Browse files Browse the repository at this point in the history
  • Loading branch information
panleone committed Nov 2, 2023
1 parent 84ab73f commit 638e596
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions js/pivx_shield.js
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,9 @@ export class PIVXShield {
utxos,
transparentChangeAddress,
}) {
if (!this.extsk) {
throw new Error("You cannot create a transaction in view only mode!");
}
if (!useShieldInputs && !transparentChangeAddress) {
throw new Error("Change must have the same type of input used!");
}
Expand Down

0 comments on commit 638e596

Please sign in to comment.