status-go icon indicating copy to clipboard operation
status-go copied to clipboard

Add optional BIP39Passphrase parameter on account restoration

Open rasom opened this issue 1 year ago • 10 comments

https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki#from-mnemonic-to-seed

There is no option to restore account with mnemonic and passphrase at the moment. It was possible to restore account with a passphrase in the old version of status mobile. Apparently the functionality is missing because nobody uses it, but I still do.

This PR is an attempt to bring it back (at least for account restoration process). We could also add an option to restore wallet account with passphrase as well.

ValidateMnemonic had to be changed because it returns keyUid, and it depends on both mnemonic and passphrase. Returning keyUid from this method is a bit misleading, but well... It works.

rasom avatar Sep 13 '24 12:09 rasom

@rasom I added yo to external contributors to be able to run CI jobs. image

Once accepted, please push to this branch again to start the jobs.

igor-sirotin avatar Sep 16 '24 11:09 igor-sirotin

@igor-sirotin thank you!

rasom avatar Sep 18 '24 11:09 rasom

@igor-sirotin rebased and force pushed branch, don't see anything happening on CI though

rasom avatar Sep 18 '24 11:09 rasom

@rasom but... you didn't accept the invite 🤔 Screenshot 2024-09-19 at 10 50 31

igor-sirotin avatar Sep 19 '24 09:09 igor-sirotin

@igor-sirotin I did... in my imagination :D Thanks

rasom avatar Sep 19 '24 10:09 rasom

in my imagination

I'm afraid it's not enough 😄

igor-sirotin avatar Sep 19 '24 10:09 igor-sirotin

Jenkins Builds

:grey_question: Commit :hash: Finished (UTC) Duration Platform Result
:heavy_multiplication_x: e2b11b58 #1 2024-09-19 10:25:58 ~1 min tests :page_facing_up:log
:heavy_check_mark: e2b11b58 #1 2024-09-19 10:26:51 ~2 min tests-rpc :page_facing_up:log
:heavy_check_mark: e2b11b58 #1 2024-09-19 10:28:31 ~4 min linux :package:zip
:heavy_check_mark: e2b11b58 #1 2024-09-19 10:28:50 ~4 min ios :package:zip
:heavy_check_mark: e2b11b58 #1 2024-09-19 10:29:53 ~5 min android :package:aar
:heavy_check_mark: 95e03f43 #2 2024-09-19 10:34:24 ~1 min tests-rpc :page_facing_up:log
:heavy_check_mark: 95e03f43 #2 2024-09-19 10:34:43 ~1 min android :package:aar
:heavy_check_mark: 95e03f43 #2 2024-09-19 10:35:14 ~1 min linux :package:zip
:heavy_multiplication_x: 95e03f43 #2 2024-09-19 10:35:33 ~2 min tests :page_facing_up:log
:heavy_check_mark: 95e03f43 #2 2024-09-19 10:36:06 ~2 min ios :package:zip

status-im-auto avatar Sep 19 '24 10:09 status-im-auto

@igor-sirotin I see it started failing probably because of permissions

rasom avatar Sep 19 '24 10:09 rasom

I see it started failing probably because of permissions

@rasom It fails due to ill-formed commit message:

image

We require Conventional Commits, but with _ postfix for non-breaking changes. So in your case it should be smth like feat_: add optional BIP39Passphrase parameter on account restoration.


This job should have posted a comment to the PR, describing what I just wrote. But there seem to not work with forks. Will fix this. image

igor-sirotin avatar Sep 19 '24 10:09 igor-sirotin

There's now an issue with linter. Please run make lint-fix, it should help. Or let me know if you're too annoyed already and I can take care of it 😄

igor-sirotin avatar Sep 19 '24 18:09 igor-sirotin