Skip to content

Commit

Permalink
added min balance check to test wallets
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdruid committed Oct 6, 2024
1 parent d04104d commit 73b4fff
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/src/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import {
CoreDaemon
} from '@cmdcode/core-cmd'

const MIN_BALANCE = 10_000_000

const DEFAULT_CONFIG : Partial<CoreConfig> = {
corepath : 'test/bin/bitcoind',
clipath : 'test/bin/bitcoin-cli',
Expand Down Expand Up @@ -58,6 +60,7 @@ export async function get_wallet (
label : string
) {
const wdat = await client.load_wallet(label)
await wdat.ensure_funds(MIN_BALANCE)
const xpub = await wdat.xpub
return new Wallet(xpub)
}
Expand Down

0 comments on commit 73b4fff

Please sign in to comment.