Skip to content
Snippets Groups Projects
Commit 7b778a74 authored by poka's avatar poka
Browse files

check if node is connected before check balances

parent c603d2b2
No related branches found
No related tags found
1 merge request!26Features gdev2
Pipeline #16745 passed
......@@ -152,6 +152,15 @@ class SubstrateSdk with ChangeNotifier {
// }
Future<Map<String, double>> getBalance(String address) async {
if (!nodeConnected) {
return {
'transferableBalance': 0,
'free': 0,
'unclaimedUds': 0,
'reserved': 0,
};
}
// Get onchain storage values
final Map balanceGlobal = await getStorage('system.account("$address")');
final int? idtyIndex =
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment