mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-24 06:48:38 +02:00
Better Ledger Connection handling (#1802)
This commit is contained in:
@@ -402,6 +402,10 @@ class CWMonero extends Monero {
|
||||
moneroWallet.setLedgerConnection(connection);
|
||||
}
|
||||
|
||||
void resetLedgerConnection() {
|
||||
disableLedgerExchange();
|
||||
}
|
||||
|
||||
@override
|
||||
void setGlobalLedgerConnection(ledger.LedgerConnection connection) {
|
||||
gLedger = connection;
|
||||
|
||||
@@ -98,7 +98,9 @@ abstract class LedgerViewModelBase with Store {
|
||||
print('Ledger Device State Changed: $event');
|
||||
if (event == sdk.BleConnectionState.disconnected) {
|
||||
_connection = null;
|
||||
_connectionChangeListener?.cancel();
|
||||
if (type == WalletType.monero) {
|
||||
monero!.resetLedgerConnection();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user