Updations in Wallet and Channel recovery section#3886
Updations in Wallet and Channel recovery section#3886kushagra0902 wants to merge 2 commits intoZeusLN:masterfrom
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly improves the wallet and channel recovery experience by expanding the supported formats for Static Channel Backups (SCB) to include hex, in addition to Base64. It centralizes SCB parsing logic into a new utility, making the process more robust. Furthermore, the user interface for both SCB input and wallet recovery has been enhanced with a much-needed submit button and a new field for aezeed passphrases, addressing critical usability gaps without altering core backend logic. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request significantly enhances the application's channel backup and wallet recovery functionalities. It introduces a new utility function, scbStringToBytes, which intelligently parses Static Channel Backup (SCB) data provided in either Base64 or hex format. This new utility is integrated into the restoreChannelBackups, verifyChanBackup, and initWallet functions, and the user interface and localization files have been updated to reflect this dual format support. Furthermore, the PR adds the capability to specify an aezeed passphrase during wallet recovery, complete with new UI elements. The review comments suggest renaming several parameters and state properties from channelBackupsBase64 to channelBackupsString for better clarity and consistency with the new hex support, and also recommend adding a missing newline at the end of the locales/en.json file.
| method: 'RestoreChannelBackups', | ||
| options: { | ||
| multi_chan_backup: Base64Utils.base64ToBytes(channels_backup_base64) | ||
| multi_chan_backup: scbStringToBytes(channels_backup_base64) |
There was a problem hiding this comment.
| multi_chan_backup: Base64Utils.base64ToBytes( | ||
| channels_backup_base64 | ||
| ) | ||
| multi_chan_backup: scbStringToBytes(channels_backup_base64) |
| "androidNotification.nwcRunningBackground": "Nostr Wallet Connect is running in the background", | ||
| "androidNotification.nwcShutdown": "Stop Service" | ||
| } | ||
| } |
views/Settings/SeedRecovery.tsx
Outdated
| marginHorizontal: 20, | ||
| marginTop: 10 | ||
| }} | ||
| disabled={!channelBackupsBase64} |
f1a74be to
23e9659
Compare
…ings for channel recovery
…s field if the wallet was originally generated using a passphrase, without that it cannot be recovered.
23e9659 to
310ce71
Compare
Description
Relates to issue: #3843
This PR have commits regarding the following issues and bugs:
The changes in this PR do not change any logical/backend handling part of the code, and mainly handle file parsing types and user interface options.
The changes in this PR do not change any logical/backend handling part of the code, and mainly handle file parsing types and user interface options.
This pull request is categorized as a:
Checklist
yarn run tscand made sure my code compiles correctlyyarn run lintand made sure my code didn’t contain any problematic patternsyarn run prettierand made sure my code is formatted correctlyyarn run testand made sure all of the tests passTesting
If you modified or added a utility file, did you add new unit tests?
I have tested this PR on the following platforms (please specify OS version and phone model/VM):
I have tested this PR with the following types of nodes (please specify node version and API version where appropriate):
Locales
Third Party Dependencies and Packages
yarnafter this PR is merged inpackage.jsonandyarn.lockhave been properly updatedOther:
]