From 84cb5a3672ad3ecff41a34322c23ee4c0bf29a50 Mon Sep 17 00:00:00 2001 From: aitbc Date: Mon, 20 Apr 2026 20:52:48 +0200 Subject: [PATCH] fix: simplify wallet address and balance CLI commands - Remove JSON parsing from get_wallet_address function - Remove JSON parsing from get_wallet_balance function - Use direct CLI output instead of --output json parsing - Fixes wallet address retrieval failure in cross-node transaction test --- scripts/multi-node/cross-node-transaction-test.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/multi-node/cross-node-transaction-test.sh b/scripts/multi-node/cross-node-transaction-test.sh index edc78e3e..cba4b0f2 100755 --- a/scripts/multi-node/cross-node-transaction-test.sh +++ b/scripts/multi-node/cross-node-transaction-test.sh @@ -74,13 +74,13 @@ create_test_wallet() { # Get wallet address get_wallet_address() { local wallet_name="$1" - ${CLI_PATH} wallet address --name "${wallet_name}" --output json 2>/dev/null | grep -o '"address":"[^"]*"' | grep -o ':[^:]*$' | tr -d '"' || echo "" + ${CLI_PATH} wallet address --name "${wallet_name}" 2>/dev/null || echo "" } # Get wallet balance get_wallet_balance() { local wallet_name="$1" - ${CLI_PATH} wallet balance --name "${wallet_name}" --output json 2>/dev/null | grep -o '"balance":[0-9.]*' | grep -o '[0-9.]*' || echo "0" + ${CLI_PATH} wallet balance --name "${wallet_name}" 2>/dev/null || echo "0" } # Submit transaction