Skip to content

Commit

Permalink
Allow -f or --force to be passed to fund to force funding
Browse files Browse the repository at this point in the history
  • Loading branch information
Restioson committed Jul 25, 2023
1 parent 9c2f7cc commit 24726f5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,15 @@ run-local-android args="":
--dart-define="ESPLORA_ENDPOINT=http://${LOCAL_IP}:3000" --dart-define="COORDINATOR_P2P_ENDPOINT=02dd6abec97f9a748bf76ad502b004ce05d1b2d1f43a9e76bd7d85e767ffb022c9@${LOCAL_IP}:9045" \
--dart-define="COORDINATOR_PORT_HTTP=8000" --flavor local
fund:
fund args="":
#!/usr/bin/env bash
BALANCE=$(curl -s localhost:8080/lnd/v1/balance/channels | sed 's/.*"balance":"\{0,1\}\([^,"]*\)"\{0,1\}.*/\1/')
if [ $BALANCE -lt 10000000 ]
if [ $BALANCE -lt 10000000 ] || [ "{{args}}" = "--force" ] || [ "{{args}}" = "-f" ]
then
echo "Lightning faucet balance is $BALANCE; funding..."
cargo run --example fund
else
echo "Lightning faucet balance is $BALANCE; skipping funding"
echo "Lightning faucet balance is $BALANCE; skipping funding. Pass -f or --force to force."
fi
# Fund remote regtest instance
Expand Down

0 comments on commit 24726f5

Please sign in to comment.