From b404bb2aff787c17a61a5f472484751b5e224c3f Mon Sep 17 00:00:00 2001 From: DanS Date: Mon, 19 Oct 2026 19:02:21 -0500 Subject: [PATCH] test(lite): set spendableShieldedBalance in the refresh fixture (realistic synced wallet) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Follow-up to 3a33e9c: testLiteRefreshModelAppliesToWalletState built its balance bundle without spendableShieldedBalance (left 0), so the new "pending = total − spendable" unconfirmedBalance formula reported the whole 2.0 shielded balance as pending (actual 2.0 vs expected 0.5). In real data spendable_zbalance is a required parser field and a synced wallet reports all of it spendable; set the fixture to match (= shieldedBalance), so unconfirmedBalance is the 0.5 mempool-incoming amount as intended. No production code change. Co-Authored-By: Claude Opus 4.8 --- tests/test_phase4.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_phase4.cpp b/tests/test_phase4.cpp index 52fadad..062b045 100644 --- a/tests/test_phase4.cpp +++ b/tests/test_phase4.cpp @@ -11752,8 +11752,9 @@ void testLiteRefreshModelAppliesToWalletState() bundle.hasBalance = true; bundle.balance.shieldedBalance = 200000000; // 2 DRGX + bundle.balance.spendableShieldedBalance = 200000000; // synced: all of it verified/spendable (required field) bundle.balance.transparentBalance = 100000000; // 1 DRGX - bundle.balance.unconfirmedBalance = 50000000; // 0.5 DRGX + bundle.balance.unconfirmedBalance = 50000000; // 0.5 DRGX (mempool-incoming) bundle.hasAddresses = true; bundle.addresses.zAddresses = {"zs1shielded"};