Skip to content

Commit

Permalink
fix wallet name
Browse files Browse the repository at this point in the history
  • Loading branch information
gartnera committed Nov 21, 2024
1 parent 6208b95 commit abacb07
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion wallet-health.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,15 @@

set -eo pipefail

wallet_name=default
if [[ -n $1 ]]; then
wallet_name=$1
fi

# this script checks if a wallet exists and is not scanning

echo "Getting wallet info"
wallet_info=$(bitcoin-cli -rpcwallet=$1 getwalletinfo)
wallet_info=$(bitcoin-cli -rpcwallet=${wallet_name} getwalletinfo)

if [[ $(echo "$wallet_info" | jq -r '.scanning') == "true" ]]; then
echo "Error: Wallet is currently scanning" >&2
Expand Down

0 comments on commit abacb07

Please sign in to comment.