minor code cleanup

This commit is contained in:
Matthew Fosse 2024-05-20 09:12:18 -07:00
parent 8a3d8ff4ae
commit 9300073c91

View file

@ -158,6 +158,7 @@ abstract class LightningWalletBase extends ElectrumWallet with Store {
} }
} catch (e) { } catch (e) {
print("Error initializing Breez: $e"); print("Error initializing Breez: $e");
return;
} }
Uint8List deviceKey = base64.decode(secrets.greenlightKey); Uint8List deviceKey = base64.decode(secrets.greenlightKey);
@ -200,8 +201,8 @@ abstract class LightningWalletBase extends ElectrumWallet with Store {
seed: seedBytes, seed: seedBytes,
), ),
); );
} catch (e) { } catch (e, s) {
print("Error connecting to Breez: $e"); print("Error connecting to Breez: $e\n$s");
} }
_nodeStateSub = sdk.nodeStateStream.listen((event) { _nodeStateSub = sdk.nodeStateStream.listen((event) {
@ -367,9 +368,7 @@ abstract class LightningWalletBase extends ElectrumWallet with Store {
await electrumClient.close(); await electrumClient.close();
} catch (_) {} } catch (_) {}
try { try {
print("stopping breez");
await stopBreez(); await stopBreez();
print("stopped breez @@@@@@@@@@@@@@@@@@@@@@@@@@@@");
} catch (e, s) { } catch (e, s) {
print("Error stopping breez: $e\n$s"); print("Error stopping breez: $e\n$s");
} }