Skip to content

Commit

Permalink
wallet: don't save blind w/o coin.
Browse files Browse the repository at this point in the history
  • Loading branch information
nodech committed Jan 19, 2023
1 parent 4639057 commit fb1f6e7
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions lib/wallet/txdb.js
Original file line number Diff line number Diff line change
Expand Up @@ -2017,14 +2017,17 @@ class TXDB {

const {prevout} = tx.inputs[i];
const coin = view.getOutput(prevout);
const uc = coin.covenant;
const blind = uc.getHash(3);
const nonce = covenant.getHash(2);

this.putBlind(b, blind, {
value: output.value,
nonce: nonce
});
if (coin) {
const uc = coin.covenant;
const blind = uc.getHash(3);
const nonce = covenant.getHash(2);

this.putBlind(b, blind, {
value: output.value,
nonce: nonce
});
}

this.putReveal(b, nameHash, outpoint, {
name: ns.name,
Expand Down

0 comments on commit fb1f6e7

Please sign in to comment.