From 7d047e8d47d40457008173cdee0d06a808438aa5 Mon Sep 17 00:00:00 2001 From: julian Date: Tue, 26 Nov 2024 10:30:49 -0600 Subject: [PATCH] fix solana node update logic --- lib/wallets/wallet/impl/solana_wallet.dart | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/wallets/wallet/impl/solana_wallet.dart b/lib/wallets/wallet/impl/solana_wallet.dart index 5cbfda157..5d80063aa 100644 --- a/lib/wallets/wallet/impl/solana_wallet.dart +++ b/lib/wallets/wallet/impl/solana_wallet.dart @@ -357,16 +357,19 @@ class SolanaWallet extends Bip39Wallet { @override Future updateNode() async { - _solNode = getCurrentNode(); + _solNode = NodeService(secureStorageInterface: secureStorageInterface) + .getPrimaryNodeFor(currency: info.coin) ?? + info.coin.defaultNode; await refresh(); } @override NodeModel getCurrentNode() { - return _solNode ?? - NodeService(secureStorageInterface: secureStorageInterface) + _solNode ??= NodeService(secureStorageInterface: secureStorageInterface) .getPrimaryNodeFor(currency: info.coin) ?? info.coin.defaultNode; + + return _solNode!; } @override