diff --git a/src/common/services/XverseService.ts b/src/common/services/XverseService.ts index 21aeeff8..44b4add6 100644 --- a/src/common/services/XverseService.ts +++ b/src/common/services/XverseService.ts @@ -57,8 +57,12 @@ export default class XverseService extends WalletService { const xverseTx = tx as XverseTx; return new Promise((resolve, reject) => { const signInputs: Record = {}; - xverseTx.inputs.forEach((input: { address: string | number; idx: number; }) => { - signInputs[input.address] = [input.idx]; + xverseTx.inputs.forEach((input: { address: string; idx: number; }, inputIdx) => { + if (signInputs[input.address]) { + signInputs[input.address].push(inputIdx); + } else { + signInputs[input.address] = [inputIdx]; + } }); const signPsbtOptions = { psbt: xverseTx.base64UnsignedPsbt, diff --git a/src/pegin/middleware/TxBuilder/XverseTxBuilder.ts b/src/pegin/middleware/TxBuilder/XverseTxBuilder.ts index 486bc0e3..f36c80cf 100644 --- a/src/pegin/middleware/TxBuilder/XverseTxBuilder.ts +++ b/src/pegin/middleware/TxBuilder/XverseTxBuilder.ts @@ -15,7 +15,6 @@ export interface XverseTx extends Tx { export default class XverseTxBuilder extends TxBuilder { buildTx(normalizedTx: NormalizedTx): Promise { - console.log('XverseTxBuilder.buildTx()'); return new Promise((resolve, reject) => { const psbt = new bitcoin.Psbt({ network: this.network }); this.getExtendedInputs(normalizedTx.inputs)