Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Ledger support improvements + bug fixes #1594

Merged
merged 45 commits into from
Nov 6, 2023
Merged

Conversation

rossbulat
Copy link
Collaborator

@rossbulat rossbulat commented Nov 3, 2023

This PR iterates Ledger support and improves syntax of the Ledger contexts.

  • Handle one task at a time; take a task instead of an array of tasks.
  • Introduce dedicated DeviceIsBusy error.
  • Refactor errors into keyed types and improve readability of handling errors.
  • Introduce checkRuntimeVersion when making calls to Ledger. Store in ref whether runtimes are not in sync.
  • Refactor Tx to handle multi-stage flow for signing Ledger transactions. Call getRuntimeVersion in first step.
  • Check runtime version in Ledger Confirm stage and display warning if metadata is different version.
  • Move all Ledger HID i/o to a static class.
  • Split ledger context into LedgerHardware and LedgerAccounts.
  • Add "Ledger Account Imported" notification on successful import.
  • Tests
  • New translations

Misc fixes

  • Adds transferrable balance to TransferOptions, uses instead of free balance where applicable.

@rossbulat rossbulat changed the title refactor: Ledger support improvements [WIP] refactor: Ledger support improvements Nov 5, 2023
@rossbulat rossbulat marked this pull request as ready for review November 5, 2023 13:54
@rossbulat
Copy link
Collaborator Author

@TingALin Would you be able to do translations for this PR?

@rossbulat rossbulat merged commit 491e178 into main Nov 6, 2023
6 checks passed
@rossbulat rossbulat deleted the rb-ledger-version branch November 6, 2023 05:35
@rossbulat rossbulat changed the title refactor: Ledger support improvements refactor: Ledger support improvements + bug fixes Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants