CW-1045-Ledger-Bugs-Enhancements (#2278)

* feat: prepare ledger.dart to use callbacks

* feat: set ledger callback using monero_c

* fix(cw_monero): async ledger

* build: Bump monero_c dependencies

* feat: Add "How to connect" to HW Device selection screen

* refactor: use monero_c free to clean pointer

* fix: use new monero_c deps

* fix: merge conflicts regarding new theming

* feat: add status bottomsheet indicating an ongoing signing process

* fix: getLastLedgerCommand monero.dart generation

* reformat send_view_model.dart [skip ci]

---------

Co-authored-by: Czarek Nakamoto <cyjan@mrcyjanek.net>
Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
This commit is contained in:
Konstantin Ullrich
2025-05-26 18:38:51 +03:00
committed by GitHub
co-authored by Czarek Nakamoto Omar Hatem
parent e03dcc7fe9
commit 90aee053cd
46 changed files with 660 additions and 315 deletions
+32 -14
View File
@@ -684,29 +684,47 @@ class SendPage extends BasePage {
});
}
if (state is IsAwaitingDeviceResponseState) {
if (state is IsDeviceSigningResponseState) {
WidgetsBinding.instance.addPostFrameCallback((_) {
if (!context.mounted) return;
showModalBottomSheet<void>(
context: context,
isDismissible: false,
builder: (BuildContext bottomSheetContext) => InfoBottomSheet(
currentTheme: currentTheme,
titleText: S.of(bottomSheetContext).proceed_on_device,
contentImage: 'assets/images/hardware_wallet/ledger_nano_x.png',
contentImageColor: Theme.of(context).colorScheme.onSurface,
content: S.of(bottomSheetContext).proceed_on_device_description,
isTwoAction: false,
actionButtonText: S.of(context).cancel,
actionButton: () {
sendViewModel.state = InitialExecutionState();
Navigator.of(bottomSheetContext).pop();
},
),
builder: (context) {
dialogContext = context;
return LoadingBottomSheet(titleText: S.of(context).device_is_signing);
},
);
});
}
if (state is IsAwaitingDeviceResponseState) {
WidgetsBinding.instance.addPostFrameCallback((_) {
if (!context.mounted) return;
showModalBottomSheet<void>(
context: context,
isDismissible: false,
builder: (context) {
dialogContext = context;
return InfoBottomSheet(
currentTheme: currentTheme,
titleText: S.of(context).proceed_on_device,
contentImage:
'assets/images/hardware_wallet/ledger_nano_x.png',
contentImageColor: Theme.of(context).colorScheme.onSurface,
content: S.of(context).proceed_on_device_description,
isTwoAction: false,
actionButtonText: S.of(context).cancel,
actionButton: () {
sendViewModel.state = InitialExecutionState();
Navigator.of(context).pop();
},
);
});
});
}
});
_effectsInstalled = true;