Skip to content

Added a submit button for SCB backup screen#3898

Open
kushagra0902 wants to merge 1 commit intoZeusLN:masterfrom
kushagra0902:recovery_screen
Open

Added a submit button for SCB backup screen#3898
kushagra0902 wants to merge 1 commit intoZeusLN:masterfrom
kushagra0902:recovery_screen

Conversation

@kushagra0902
Copy link
Copy Markdown

Description

Relates to issue: #3878

SCB recovery page did not have a submit button. This made entering a SCB backup impossible for the users. This PR added the button which takes the user back to recovery page where they can add the mnemonic words and backup their wallet. The previous UI is untouched and just the button is added accordingly.

This pull request is categorized as a:

  • New feature
  • [ x] Bug fix
  • Code refactor
  • Configuration change
  • Locales update
  • Quality assurance
  • Other

Checklist

  • [ x] I’ve run yarn run tsc and made sure my code compiles correctly
  • [ x] I’ve run yarn run lint and made sure my code didn’t contain any problematic patterns
  • [ x] I’ve run yarn run prettier and made sure my code is formatted correctly
  • [ x] I’ve run yarn run test and made sure all of the tests pass

Testing

If you modified or added a utility file, did you add new unit tests?

  • No, I’m a fool
  • Yes
  • [ x] N/A

I have tested this PR on the following platforms (please specify OS version and phone model/VM):

  • [ x] Android
  • iOS

I have tested this PR with the following types of nodes (please specify node version and API version where appropriate):

  • Embedded LND
  • LND (REST)
  • LND (Lightning Node Connect)
  • Core Lightning (CLNRest)
  • Nostr Wallet Connect
  • LndHub

Locales

  • I’ve added new locale text that requires translations
  • I’m aware that new translations should be made on the ZEUS Transfix page and not directly to this repo

Third Party Dependencies and Packages

  • Contributors will need to run yarn after this PR is merged in
  • 3rd party dependencies have been modified:
    • verify that package.json and yarn.lock have been properly updated
    • verify that dependencies are installed for both iOS and Android platforms

Other:

  • Changes were made that require an update to the README
  • Changes were made that require an update to onboarding
Screenshot from 2026-03-27 01-00-01

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request adds a 'Confirm' button for the Static Channel Backup (SCB) input type in the Seed Recovery view. This button triggers a state reset and dismisses the keyboard when pressed. I have no feedback to provide.

marginHorizontal: 20,
marginTop: 10
}}
disabled={!channelBackupsBase64}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The 'Confirm' button for SCB currently only checks if the channelBackupsBase64 input is non-empty. To enhance user experience and provide earlier feedback, consider adding a basic client-side validation (e.g., checking if the input is a valid Base64 string) before enabling the button. Ensure that if this validation fails, the user is provided with clear error feedback, and avoid triggering success-state haptic feedback for this error case as per our repository rules.

References
  1. Use distinct haptic feedback for success and error states to provide clear, unambiguous user feedback. Avoid giving a 'success' feedback for an action that results in an error.

@kaloudis
Copy link
Copy Markdown
Contributor

Can we instead get this to work by hitting the enter key on the keyboard?

@kushagra0902
Copy link
Copy Markdown
Author

kushagra0902 commented Mar 27, 2026

Can we instead get this to work by hitting the enter key on the keyboard?

Done. Now both button as well as keyboard enter works fine!

@kushagra0902 kushagra0902 force-pushed the recovery_screen branch 2 times, most recently from dc07e51 to 459a8ca Compare March 29, 2026 14:21
@myxmaster
Copy link
Copy Markdown
Collaborator

I was thinking about this screen for a while, and I think we should change the UI to a 2 tabs screen:
1st tab: seed word recovery
2nd tab: SCB recovery

Then have a clean screen each for the 2 tabs, with exactly the logic and buttons we need for each case. (Another example for the issues regarding the mixed logic: When you start typing in the SCB input, seed word suggestions are displayed...)

@kushagra0902
Copy link
Copy Markdown
Author

I was thinking about this screen for a while, and I think we should change the UI to a 2 tabs screen: 1st tab: seed word recovery 2nd tab: SCB recovery

Then have a clean screen each for the 2 tabs, with exactly the logic and buttons we need for each case. (Another example for the issues regarding the mixed logic: When you start typing in the SCB input, seed word suggestions are displayed...)

Got your point and I was thinking something in similar direction:

  1. I think the current flow of channel only backup is not intuitive for the users. So instead of a tab in the same screen, we should separate both things entirely.
  2. This will not disrupt the logic anyways as the SCB restore occurs only once wallet restore is done(correct me please if I am wrong).
  3. In this flow thus, once the wallet backup is done, the user can go the channel backup section in the menu and then put the SCB key there. This will also solve the recommendation error pointed above(sorry for that).

Please give your suggestions on this and I will start the work accordingly

@myxmaster
Copy link
Copy Markdown
Collaborator

myxmaster commented Mar 29, 2026

Or like this:
Restore Button -> Seed word input (like it is now) -> when all seed words are entered, and valid, a CONTINUE button becomes active, on the next screen user can provide SCB, but that is optional, then hit final RESTORE button.

@kushagra0902
Copy link
Copy Markdown
Author

Or like this: Restore Button -> Seed word input (like it is now) -> when all seed words are entered, and valid, a CONTINUE button becomes active, on the next screen user can provide SCB, but that is optional, then hit final RESTORE button.

I think this will make restoring only the channel for a wallet already restored difficult. So I think making a different section for this. I will implement both and will make the PR for the better one so any can be used

@myxmaster
Copy link
Copy Markdown
Collaborator

So you mean, somebody restores the wallet (without providing SCB), then later decides to use the SCB? Hm, I guess this is not impossible.

@kushagra0902
Copy link
Copy Markdown
Author

So you mean, somebody restores the wallet (without providing SCB), then later decides to use the SCB? Hm, I guess this is not impossible.

yes, not sure if this should be done, but someone may wnat to do so

@kushagra0902
Copy link
Copy Markdown
Author

So you mean, somebody restores the wallet (without providing SCB), then later decides to use the SCB? Hm, I guess this is not impossible.

yes, not sure if this should be done, but someone may want to do so. Actually my bad, you were right, there is already option to restore the channel individually at disaster recovery section so need of that.

@kaloudis
Copy link
Copy Markdown
Contributor

So you mean, somebody restores the wallet (without providing SCB), then later decides to use the SCB? Hm, I guess this is not impossible.

It is possible. Check out how Disaster Recovery works.

@myxmaster
Copy link
Copy Markdown
Collaborator

Technically of course, I was trying to say, it is an unusual behavior.

Anyway, yes, there should be a way to provide SCB directly (without going through restore process with seed words at the same time). Maybe we should just add the SCB flow separately in Menu -> Tools?

@kushagra0902
Copy link
Copy Markdown
Author

Technically of course, I was trying to say, it is an unusual behavior.

Anyway, yes, there should be a way to provide SCB directly (without going through restore process with seed words at the same time). Maybe we should just add the SCB flow separately in Menu -> Tools?

it is already there in settings -> embedded node -> disaster recovery -> initiate recovery from clipboard.

so I think your method of "giving all the words. then continue, recover" can be done along with this separate page can be done

@kushagra0902
Copy link
Copy Markdown
Author

Technically of course, I was trying to say, it is an unusual behavior.
Anyway, yes, there should be a way to provide SCB directly (without going through restore process with seed words at the same time). Maybe we should just add the SCB flow separately in Menu -> Tools?

it is already there in settings -> embedded node -> disaster recovery -> initiate recovery from clipboard.

so I think your method of "giving all the words. then continue, recover" can be done along with this separate page can be done

something like this:

WhatsApp.Video.2026-03-30.at.4.21.25.AM.mp4

@myxmaster
Copy link
Copy Markdown
Collaborator

myxmaster commented Mar 30, 2026

it is already there in settings -> embedded node -> disaster recovery -> initiate recovery from clipboard.

ah right, makes sense.

regarding your video in the last comment:
i think that's good!

nit: don't put the (Optional) in the placeholder, but in the label:
"Optional: Disaster recovery data (SCB, Base64):"

and the placeholder should probably say "Your SCB data in Base64 format". after #3886 is merged "Your SCB data in Base64 or HEX format"

@kushagra0902
Copy link
Copy Markdown
Author

it is already there in settings -> embedded node -> disaster recovery -> initiate recovery from clipboard.

ah right, makes sense.

regarding your video in the last comment: i think that's good!

nit: don't put the (Optional) in the placeholder, but in the label: "Optional: Disaster recovery data (SCB, Base64):"

and the placeholder should probably say "Your SCB data in Base64 format". after #3886 is merged "Your SCB data in Base64 or HEX format"

done!

@shubhamkmr04
Copy link
Copy Markdown
Contributor

shubhamkmr04 commented Apr 4, 2026

@kushagra0902 rebase needed

* [Transifex] Translate locales/en.json in cs

97% of minimum 25% translated source file: 'locales/en.json'
on 'cs'.

Sync of partially translated files:
untranslated content is included with an empty translation
or source language content depending on file format

* [Transifex] Translate locales/en.json in cs

98% of minimum 25% translated source file: 'locales/en.json'
on 'cs'.

Sync of partially translated files:
untranslated content is included with an empty translation
or source language content depending on file format

* [Transifex] Translate locales/en.json in cs

99% of minimum 25% translated source file: 'locales/en.json'
on 'cs'.

Sync of partially translated files:
untranslated content is included with an empty translation
or source language content depending on file format

* [Transifex] Translate locales/en.json in cs

100% translated source file: 'locales/en.json'
on 'cs'.

* [Transifex] Translate locales/en.json in de

84% of minimum 25% translated source file: 'locales/en.json'
on 'de'.

Sync of partially translated files:
untranslated content is included with an empty translation
or source language content depending on file format

* [Transifex] Translate locales/en.json in de

87% of minimum 25% translated source file: 'locales/en.json'
on 'de'.

Sync of partially translated files:
untranslated content is included with an empty translation
or source language content depending on file format

* [Transifex] Translate locales/en.json in de

89% of minimum 25% translated source file: 'locales/en.json'
on 'de'.

Sync of partially translated files:
untranslated content is included with an empty translation
or source language content depending on file format

---------

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
@kushagra0902
Copy link
Copy Markdown
Author

@kushagra0902 rebase needed

done

Copy link
Copy Markdown
Contributor

@shubhamkmr04 shubhamkmr04 left a comment

Choose a reason for hiding this comment

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

  • change the commit msg and author
  • we only need changes in en.json

ldkPassphrase: string;
ldkNodeDir: string;
embeddedLdkNetwork: string;
step: 1 | 2;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

what do these steps mean? they should be enums

@shubhamkmr04
Copy link
Copy Markdown
Contributor

rebase needed

@kaloudis kaloudis added this to the v13.0.0 milestone Apr 9, 2026
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.

4 participants