diff --git a/cw_bitcoin/lib/electrum_wallet.dart b/cw_bitcoin/lib/electrum_wallet.dart index 783eb10d7..b899744a6 100644 --- a/cw_bitcoin/lib/electrum_wallet.dart +++ b/cw_bitcoin/lib/electrum_wallet.dart @@ -877,7 +877,6 @@ abstract class ElectrumWalletBase coin.isFrozen = coinInfo.isFrozen; coin.isSending = coinInfo.isSending; coin.note = coinInfo.note; - coin.bitcoinAddressRecord.balance += coinInfo.value; } else { _addCoinInfo(coin); } diff --git a/lib/di.dart b/lib/di.dart index 92bf25c9a..69168451f 100644 --- a/lib/di.dart +++ b/lib/di.dart @@ -311,7 +311,6 @@ Future setup({ getIt.registerFactory>(() => _powNodeSource, instanceName: Node.boxName + "pow"); getIt.registerSingleton(AuthenticationStore()); - getIt.registerSingleton(LedgerViewModel()); getIt.registerSingleton(WalletListStore()); getIt.registerSingleton(NodeListStoreBase.instance); getIt.registerSingleton(settingsStore); @@ -336,6 +335,8 @@ Future setup({ getIt.registerSingleton( AnonpayTransactionsStore(anonpayInvoiceInfoSource: _anonpayInvoiceInfoSource)); + getIt.registerLazySingleton(() => LedgerViewModel()); + final secretStore = await SecretStoreBase.load(getIt.get()); getIt.registerSingleton(secretStore); diff --git a/lib/src/screens/connect_device/connect_device_page.dart b/lib/src/screens/connect_device/connect_device_page.dart index 80b396a34..a482b1c41 100644 --- a/lib/src/screens/connect_device/connect_device_page.dart +++ b/lib/src/screens/connect_device/connect_device_page.dart @@ -3,7 +3,7 @@ import 'dart:io'; import 'package:cake_wallet/generated/i18n.dart'; import 'package:cake_wallet/src/screens/base_page.dart'; -// import 'package:cake_wallet/src/screens/connect_device/debug_device_page.dart'; +import 'package:cake_wallet/src/screens/connect_device/debug_device_page.dart'; import 'package:cake_wallet/src/screens/connect_device/widgets/device_tile.dart'; import 'package:cake_wallet/themes/extensions/cake_text_theme.dart'; import 'package:cake_wallet/utils/responsive_layout_util.dart'; @@ -105,7 +105,7 @@ class ConnectDevicePageBodyState extends State { try { _bleRefresh = ledger.scan().listen((device) => setState(() => bleDevices.add(device))) ..onError((e) { - throw e as Exception; + throw e.toString(); }); setState(() => bleIsEnabled = true); _bleRefreshTimer?.cancel();