From a22dc0d4460cc26a03f88e213bc60b4edde66487 Mon Sep 17 00:00:00 2001 From: Matthew Date: Thu, 12 Sep 2024 14:14:25 -0500 Subject: [PATCH] ui: call balance first in walletview task --- BDKSwiftExampleWallet/View/WalletView.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/BDKSwiftExampleWallet/View/WalletView.swift b/BDKSwiftExampleWallet/View/WalletView.swift index d7acf90b..2d0f29bf 100644 --- a/BDKSwiftExampleWallet/View/WalletView.swift +++ b/BDKSwiftExampleWallet/View/WalletView.swift @@ -217,12 +217,13 @@ struct WalletView: View { } ) .task { + viewModel.getBalance() if isFirstAppear || newTransactionSent { await viewModel.syncOrFullScan() isFirstAppear = false newTransactionSent = false + viewModel.getBalance() } - viewModel.getBalance() viewModel.getTransactions() await viewModel.getPrices() }