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

Ledger refactor #218

Merged
merged 14 commits into from
Oct 6, 2023
Merged

Ledger refactor #218

merged 14 commits into from
Oct 6, 2023

Conversation

Duddino
Copy link
Member

@Duddino Duddino commented Sep 29, 2023

Abstract

This PR aims to refactor ledger to prevent most of the common errors that commonly pop up.
All MasterKey functions are now non-async.
HardwareMasterKey is now simply a view-only HdMasterKey with one addtional function that verifies the address. All non-important addresses must be derived using getAddress as normal.
When an address needs to be used to transfer funds (for instance to generate change addresses), verifyAddress must also be called, which will derive the address using the ledger and will ask the user to validate it.

Testing

  • Test all ledger functions

@netlify
Copy link

netlify bot commented Sep 29, 2023

Deploy Preview for cheery-moxie-4f1121 ready!

Name Link
🔨 Latest commit 99398ac
🔍 Latest deploy log https://app.netlify.com/sites/cheery-moxie-4f1121/deploys/651f12593ee6750008f54fbd
😎 Deploy Preview https://deploy-preview-218--cheery-moxie-4f1121.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@JSKitty JSKitty added Bug This is either a bugfix (PR) or a bug (issue). Enhancement New feature or request labels Sep 29, 2023
Liquid369
Liquid369 previously approved these changes Oct 5, 2023
Copy link

@Liquid369 Liquid369 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tACK 880d09f

Copy link
Member

@JSKitty JSKitty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Partial tACK 99398ac

Code looks good, Ledger itself works very nicely for me - can't really test the Access Denied catch since I've now fixed my udev rules, hah.

Copy link

@Liquid369 Liquid369 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

re-tACK 99398ac

much better now, ledger is working, no access errors on my end.

@JSKitty JSKitty merged commit f83df59 into PIVX-Labs:master Oct 6, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This is either a bugfix (PR) or a bug (issue). Enhancement New feature or request
Projects
Development

Successfully merging this pull request may close these issues.

3 participants