Add support for Ledger Nano Gen 5 (#2609)

* chore: update `ledger_flutter_plus` dependency to new repository URL and commit hash in `pubspec_base.yaml`

* feat: add support for Ledger Nano Gen 5 hardware wallet and include new SVG asset

* chore: update `ledger_flutter_plus` dependency reference and remove redundant method call in `LedgerViewModel`
This commit is contained in:
Konstantin Ullrich
2025-10-28 20:15:09 +01:00
committed by GitHub
parent d7e9f09f60
commit 47d93bd418
5 changed files with 11 additions and 3 deletions
@@ -0,0 +1,3 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M16.5 2C17.8807 2 19 3.11929 19 4.5V5C19.2761 5 19.5 5.22386 19.5 5.5V8C19.5 8.24171 19.3286 8.44371 19.1006 8.49023L19 8.5V19.5C19 20.8807 17.8807 22 16.5 22H7.5C6.11929 22 5 20.8807 5 19.5V4.5C5 3.11929 6.11929 2 7.5 2H16.5ZM14.5 19C13.9477 19 13.5 19.4477 13.5 20C13.5 20.5523 13.9477 21 14.5 21H16.5C17.0523 21 17.5 20.5523 17.5 20C17.5 19.4477 17.0523 19 16.5 19H14.5ZM7.5 3.5C6.94772 3.5 6.5 3.94772 6.5 4.5V16.5C6.5 17.0523 6.94772 17.5 7.5 17.5H16.5C17.0523 17.5 17.5 17.0523 17.5 16.5V4.5C17.5 3.94772 17.0523 3.5 16.5 3.5H7.5Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 665 B

@@ -46,6 +46,7 @@ enum HardwareWalletDeviceType {
ledgerNanoS,
ledgerNanoX,
ledgerNanoSPlus,
ledgerNanoGen5,
ledgerStax,
ledgerFlex,
BitBox02,
@@ -70,6 +71,8 @@ extension ToGenericHardwareWalletDeviceType on ledger.LedgerDeviceType {
return HardwareWalletDeviceType.ledgerNanoSPlus;
case ledger.LedgerDeviceType.nanoX:
return HardwareWalletDeviceType.ledgerNanoX;
case ledger.LedgerDeviceType.nanoGen5:
return HardwareWalletDeviceType.ledgerNanoGen5;
case ledger.LedgerDeviceType.stax:
return HardwareWalletDeviceType.ledgerStax;
case ledger.LedgerDeviceType.flex:
@@ -165,6 +165,8 @@ class ConnectDevicePageBodyState extends State<ConnectDevicePageBody> {
switch (deviceType) {
case HardwareWalletDeviceType.ledgerNanoX:
return 'assets/images/hardware_wallet/ledger_nano_x.png';
case HardwareWalletDeviceType.ledgerNanoGen5:
return 'assets/images/hardware_wallet/device_ledger_nano_gen_5.svg';
case HardwareWalletDeviceType.ledgerStax:
return 'assets/images/hardware_wallet/ledger_stax.png';
case HardwareWalletDeviceType.ledgerFlex:
@@ -127,7 +127,7 @@ abstract class LedgerViewModelBase extends HardwareWalletViewModel with Store {
if (_connectionChangeSubscription == null) {
_connectionChangeSubscription = ledger
.deviceStateChanges(device.device.id)
.deviceStateChanges
.listen(_connectionChangeListener);
}
+2 -2
View File
@@ -190,8 +190,8 @@ dependency_overrides:
ffi: 2.1.0
ledger_flutter_plus:
git:
url: https://github.com/vespr-wallet/ledger-flutter-plus
ref: 60817d4b20144f9da9029f5034790272795b9d38
url: https://github.com/cake-tech/ledger-flutter-plus
ref: 5237e5b3d5f07696eefd0aaee9c32478ed399d20
ledger_usb_plus:
git:
url: https://github.com/konstantinullrich/ledger-usb-plus