From 7175973bddca8416e4981654b9ba3005b59e82f2 Mon Sep 17 00:00:00 2001 From: fosse Date: Mon, 21 Aug 2023 10:25:17 -0400 Subject: [PATCH] more fixes --- cw_nano/lib/nano_wallet.dart | 6 +++++- tool/configure.dart | 12 ++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/cw_nano/lib/nano_wallet.dart b/cw_nano/lib/nano_wallet.dart index f20a79d13..ffe26ce43 100644 --- a/cw_nano/lib/nano_wallet.dart +++ b/cw_nano/lib/nano_wallet.dart @@ -363,7 +363,11 @@ abstract class NanoWalletBase } Future _updateBalance() async { - balance[currency] = await _client.getBalance(_publicAddress!); + try { + balance[currency] = await _client.getBalance(_publicAddress!); + } catch (e) { + throw Exception("Failed to get balance $e"); + } await save(); } diff --git a/tool/configure.dart b/tool/configure.dart index a0cdc7612..2dfc35f7d 100644 --- a/tool/configure.dart +++ b/tool/configure.dart @@ -716,12 +716,6 @@ Future generatePubspec({ output += '\n$cwBitcoin'; } - if (hasHaven && !hasMonero) { - output += '\n$cwSharedExternal\n$cwHaven'; - } else if (hasHaven) { - output += '\n$cwHaven'; - } - if (hasEthereum) { output += '\n$cwEthereum'; } @@ -734,6 +728,12 @@ Future generatePubspec({ output += '\n$cwBanano'; } + if (hasHaven && !hasMonero) { + output += '\n$cwSharedExternal\n$cwHaven'; + } else if (hasHaven) { + output += '\n$cwHaven'; + } + final outputLines = output.split('\n'); inputLines.insertAll(dependenciesIndex + 1, outputLines); final outputContent = inputLines.join('\n');