Use Bytes Primitive

This commit is contained in:
Jim Hamill
2025-07-23 00:27:41 +00:00
parent 9af5dc0087
commit e72c678785
10 changed files with 62 additions and 72 deletions
+1 -13
View File
@@ -305,18 +305,6 @@ export class WalletHD extends BaseWallet {
async signTransaction(
txTemplate: Partial<TransactionTemplate>,
): Promise<TransactionBuilder> {
// Populate the final transaction template by merging with defaults.
// NOTE: This is just a convenience to make "send" easier to use.
const txTemplateFinal: TransactionTemplate = {
...{
version: 2,
locktime: 0,
inputs: [],
outputs: [],
},
...txTemplate,
};
// Get the receiving address of this wallet.
// NOTE: As per BIP44 spec, we set the change address to use the internal chain.
const changeAddress = await this.getReceivingAddress(CHAIN_EXTERNAL);
@@ -329,7 +317,7 @@ export class WalletHD extends BaseWallet {
// Build the transaction.
return TransactionBuilder.build(
txTemplateFinal,
txTemplate,
unspents.toArray(),
changeLockingBytecode,
);