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`

Konstantin Ullrich committed Oct 28, 2025 at 20:15 UTC 47d93bd418fcfc8bd13753bc90b6e47344217b4b
5 files changed +11 -3
assets/images/hardware_wallet/device_ledger_nano_gen_5.svg new
+3
@@ -0,0 +1,3 @@
1 +<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2 +<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"/>
3 +</svg>
lib/entities/hardware_wallet/hardware_wallet_device.dart
+3
@@ -46,6 +46,7 @@ enum HardwareWalletDeviceType {
46 ledgerNanoS,
47 ledgerNanoX,
48 ledgerNanoSPlus,
49 + ledgerNanoGen5,
50 ledgerStax,
51 ledgerFlex,
52 BitBox02,
@@ -70,6 +71,8 @@ extension ToGenericHardwareWalletDeviceType on ledger.LedgerDeviceType {
71 return HardwareWalletDeviceType.ledgerNanoSPlus;
72 case ledger.LedgerDeviceType.nanoX:
73 return HardwareWalletDeviceType.ledgerNanoX;
74 + case ledger.LedgerDeviceType.nanoGen5:
75 + return HardwareWalletDeviceType.ledgerNanoGen5;
76 case ledger.LedgerDeviceType.stax:
77 return HardwareWalletDeviceType.ledgerStax;
78 case ledger.LedgerDeviceType.flex:
lib/src/screens/connect_device/connect_device_page.dart
+2
@@ -165,6 +165,8 @@ class ConnectDevicePageBodyState extends State<ConnectDevicePageBody> {
165 switch (deviceType) {
166 case HardwareWalletDeviceType.ledgerNanoX:
167 return 'assets/images/hardware_wallet/ledger_nano_x.png';
168 + case HardwareWalletDeviceType.ledgerNanoGen5:
169 + return 'assets/images/hardware_wallet/device_ledger_nano_gen_5.svg';
170 case HardwareWalletDeviceType.ledgerStax:
171 return 'assets/images/hardware_wallet/ledger_stax.png';
172 case HardwareWalletDeviceType.ledgerFlex:
lib/view_model/hardware_wallet/ledger_view_model.dart
+1 -1
@@ -127,7 +127,7 @@ abstract class LedgerViewModelBase extends HardwareWalletViewModel with Store {
127
128 if (_connectionChangeSubscription == null) {
129 _connectionChangeSubscription = ledger
130 - .deviceStateChanges(device.device.id)
130 + .deviceStateChanges
131 .listen(_connectionChangeListener);
132 }
133
pubspec_base.yaml
+2 -2
@@ -190,8 +190,8 @@ dependency_overrides:
190 ffi: 2.1.0
191 ledger_flutter_plus:
192 git:
193 - url: https://github.com/vespr-wallet/ledger-flutter-plus
194 - ref: 60817d4b20144f9da9029f5034790272795b9d38
193 + url: https://github.com/cake-tech/ledger-flutter-plus
194 + ref: 5237e5b3d5f07696eefd0aaee9c32478ed399d20
195 ledger_usb_plus:
196 git:
197 url: https://github.com/konstantinullrich/ledger-usb-plus