Skip to content

Commit

Permalink
refactor signTransaction to sign tx hash as digest
Browse files Browse the repository at this point in the history
  • Loading branch information
alejoacosta74 committed Apr 29, 2024
1 parent 4a88b52 commit 469df9b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src.ts/wallet/utxohdwallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -352,8 +352,7 @@ export class UTXOHDWallet extends BaseWallet {
const privKey = this.utxoAddresses.find(utxoAddr => utxoAddr.address === address)?.privKey;
if (!privKey) throw new Error(`Missing private key for ${hexlify(pubKey)}`);
// create the schnorr signature
const digest = keccak_256(hash);
const signature = schnorr.sign(digest, getBytes(privKey) );
const signature = schnorr.sign(hash, getBytes(privKey) );
return hexlify(signature);
}

Expand Down

0 comments on commit 469df9b

Please sign in to comment.