Open smaroudasunicorn opened 1 month ago
Hey, so awesome to see this moving !
I.
II. Right now, all accounts except the main one are derived from the main seed phrase. In order to get them back after restoring the SH wallet, one has to 'magically summon' all of them back by 'creating' new accounts, and via the derivation path you get them all back again.
How is that handled in the future, when derived and imported (via PK import) accounts mix ? Are all PKs for the derived accounts stored somewhere, so that technically all accounts (derived and PK-imported) can be treated equally in terms of exporting, e.g. I am responsible / have the possibility to export/import all PKs of all accounts?
Thank you for putting work in this, this is a huge improvement for the ecosystem.
will there be a protection accessing SH wallet, like in metamask?
Yes. https://github.com/superhero-com/superhero-wallet/issues/3189, https://github.com/superhero-com/superhero-wallet/pull/3231
How is that handled in the future, when derived and imported (via PK import) accounts mix ?
The idea is to allow a user to start a wallet with a single private key. If the user wants to add new accounts, they will be prompted to add a mnemonic phrase or import a different private key.
Are all PKs for the derived accounts stored somewhere, so that technically all accounts (derived and PK-imported) can be treated equally in terms of exporting, e.g. I am responsible / have the possibility to export/import all PKs of all accounts?
Yes, they will be stored "somewhere", and can be exported equally. We should think about having option "export all the accounts".
Alright, awesome. Then basically the role of importing an account with a mnemonic will be limited to deriving a keypair at index 0
only, right ? As a bonus feature, you could ask users which index they want to derive the account from, for the case that some people rely on this feature.
Alright, awesome. Then basically the role of importing an account with a mnemonic will be limited to deriving a keypair at index
0
only, right ?
No. It will remain the same. You just would be able to import a private key in addition to existing functionality.
As a bonus feature, you could ask users which index they want to derive the account from, for the case that some people rely on this feature.
We have a separate ticket for this feature.
UPDATED DESIGN MVP @CedrikNikita @smaroudasunicorn
ACCEPTANCE CRITERIA:
For MVP version there are only 2 basic flows: - Export private key: The user is able to get the current account private key (PK) shown and to copy it. - Import private key: The user is able to import any account with its private key from the Dashboard/Add account card/Add account modal.
Naming of PK added accounts: PK + blockchain + account + number.
Order: PK imported account is added after existing accounts in the switcher. It becomes the current active account.
Wording update:
Text update of the modal sub-title of Add account modal: it is changed to just "Please select blockchain." (See mockups below; options displayed in the modal include not only adding new account to the blockchain but also importing already existing accounts into the wallet so the previous text was not exactly correct)
.............................................................................................
DESIGN
1. Export Private Key (Show & Copy PK):
Prototype REC (Exporting):
https://github.com/user-attachments/assets/c252303b-8d4a-4c5d-b076-c822b66f95a4
.............................................................................................
2. Import private key from Add account modal:
Prototype REC (Importing):
https://github.com/user-attachments/assets/eda9cc4b-a37f-49e0-9bed-9b7027682fe5
.............................................................................................
Figma Reference:
good job @onvisions !
STORY:
User has to be able to export wallet private keys encrypted. User has to be able to restore wallet accounts with the encrypted key(s) and the password.
DESIGN:
1. Import with Seed phrase VS Import with Private key(s) and password:
Import wallet accounts with Private Key:
Import wallet accounts with Seed phrase:
..................................................................................... 2. Export private key(s):
!! See Figma comments (follow the reference link below)
..................................................................................... FIGMA REFERENCE: https://www.figma.com/design/3oGLWzSH0oJljo4RETZtur/Superhero-Wallet-UI-(%E2%9C%94%EF%B8%8FUpdated)?node-id=33646-210502&t=yNhx5Cr7FQ1SiG9h-0