Use Bytes Primitive
This commit is contained in:
@@ -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,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user