From c8696036c08bc8771e32ef8055b3184e74799598 Mon Sep 17 00:00:00 2001 From: theborakompanioni Date: Fri, 26 Aug 2022 16:33:39 +0200 Subject: [PATCH] fix: make sure non-descriptor wallet is created --- standalone/jam-entrypoint.sh | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/standalone/jam-entrypoint.sh b/standalone/jam-entrypoint.sh index b91250c..bcb330a 100644 --- a/standalone/jam-entrypoint.sh +++ b/standalone/jam-entrypoint.sh @@ -92,11 +92,28 @@ if [ "${ENSURE_WALLET}" = "true" ]; then wallet_name="${jmenv['rpc_wallet_file']}" echo "Creating wallet $wallet_name if missing..." - create_payload="{\"jsonrpc\":\"1.0\",\"id\":\"curl\",\"method\":\"createwallet\",\"params\":[\"${wallet_name}\"]}" + create_payload="{\ + \"jsonrpc\":\"2.0\",\ + \"id\":\"curl\",\ + \"method\":\"createwallet\",\ + \"params\":{\ + \"wallet_name\":\"${wallet_name}\",\ + \"descriptors\":false,\ + \"load_on_startup\":true\ + }\ + }" curl --silent --user "${btcuser}" --data-binary "${create_payload}" "${btchost}" > /dev/null || true echo "Loading wallet $wallet_name..." - load_payload="{\"jsonrpc\":\"1.0\",\"id\":\"curl\",\"method\":\"loadwallet\",\"params\":[\"${wallet_name}\"]}" + load_payload="{\ + \"jsonrpc\":\"2.0\",\ + \"id\":\"curl\",\ + \"method\":\"loadwallet\",\ + \"params\":{\ + \"filename\":\"${wallet_name}\",\ + \"load_on_startup\":true\ + }\ + }" curl --silent --user "${btcuser}" --data-binary "${load_payload}" "${btchost}" > /dev/null || true fi