Skip to content

Commit

Permalink
chore: update test
Browse files Browse the repository at this point in the history
  • Loading branch information
slavastartsev committed Nov 18, 2024
1 parent eb0d4bc commit c77a098
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions sdk/test/utxo.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -348,8 +348,13 @@ describe('UTXO Tests', () => {

const maxSpendableBalance = cardinalOutputs.reduce((acc, output) => acc + output.value, 0);

// spend 90% of max spendable amount
await createBitcoinPsbt(paymentAddress, paymentAddress, Math.floor(maxSpendableBalance * 0.9), pubkey);
(selectUTXO as Mock).mockImplementationOnce(() => ({ tx: {
toPSBT() {
return Uint8Array.from(Buffer.from('675f66d3ebcb97c383b48f6cbc37c8d32d57a489caa9ecb7e3691bd76731adaa', 'hex'))
}
}}))

await createBitcoinPsbt(paymentAddress, paymentAddress, maxSpendableBalance, pubkey);

const [possibleInputs] = (selectUTXO as Mock).mock.lastCall || [];

Expand Down

0 comments on commit c77a098

Please sign in to comment.