Skip to content

Commit b34cba3

Browse files
author
Hack.bg R&D
committed
test(testnet): unit program
1 parent 2e3b045 commit b34cba3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ export function TestOnTestnet () {
9595
}
9696

9797
// Test the spend helper.
98-
function TestSend (amount = 3000n, fee = 12000n) {
98+
function TestSend (amount = 1000n, fee = 1000n) {
9999
return Fn.Name(`Spend ${amount} for ${fee}`, testSend);
100100
async function testSend (chain: Btc) {
101101
const from = chain.P2WPKH(keypair1.publicKey()).address;
@@ -198,7 +198,7 @@ function TestProgram (name: string, src: string, {
198198
};
199199
const vout = prev.vout.find(finder);
200200
if (!vout) throw new Error('no corresponding vout found');
201-
const redeemSource = Btc.Utxo({ txid, asset, vout: index, address: toSPKA(vout), amount: vout.value });
201+
const redeemSource = { txid, asset, vout: index, address: toSPKA(vout), amount: commitAmount };
202202
debug('Redeem UTXO:', redeemSource);
203203

204204
// To get SIGHASH_ALL for signing, first the rest of the transaction must be specified:

0 commit comments

Comments
 (0)