fix(wallet-mobile): update react-native-hid #3614
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description / Change(s) / Related issue(s)
We've been using this fork from @v-almonacid https://github.com/v-almonacid/ledgerjs instead of the official https://github.com/LedgerHQ/ledger-live/tree/develop/libs/ledgerjs/packages/react-native-hid
This old piece is crashing due to new Android sdk v34 which forbids this: https://github.com/v-almonacid/ledgerjs/blob/036d2cfe12c2e13ae1b1a5f140bffca074612b05/packages/react-native-hid/android/src/main/java/com/ledgerwallet/hid/ReactHIDModule.java#L168
That's solved in the official source by properly using the PendingIntent flag: https://github.com/LedgerHQ/ledger-live/blob/develop/libs/ledgerjs/packages/react-native-hid/android/src/main/java/com/ledgerwallet/hid/ReactHIDModule.java#L167
Along that, now it has typescript support.
We are also using https://github.com/cardano-foundation/ledgerjs-hw-app-cardano/tree/master which depends on a specific version of
hw-transport
,so in order for the types to not complained I installed
We need at least"@ledgerhq/react-native-hid": "6.28.5",
6.29.0
which is when USB was fixed (actually not fixed enough, see PS) LedgerHQ/ledger-live@8787e31Doesn't seem to be compatible, opened cardano-foundation/ledgerjs-hw-app-cardano#44
PS: Another issue LedgerHQ/ledger-live#7786
Ticket
YOMO-1921