-
Notifications
You must be signed in to change notification settings - Fork 96
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
Fix avatar chosen during account creation #5267
Fix avatar chosen during account creation #5267
Conversation
…236-avatar-chosen-during-account-creation
const wrapperRef = useRef(); | ||
const timeout = useRef(); | ||
const { t } = useTranslation(); | ||
const { enableAccessToLegacyAccounts } = useSettings('enableAccessToLegacyAccounts'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since all new accounts are created with default custom derivation path, you do not need this logic, enableAccessToLegacyAccounts
is false by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noticed a strange scenario which might affect the intended behaviour regarding this.
- Go to http://0.0.0.0:8080/#/account/add/secret-recovery
- Check
Enable access to legacy Lisk accounts
- Go to http://0.0.0.0:8080/#/register?strength=128
- Continue the flow and the user will encrypt the new account with this API
cryptography.legacy.getKeys(passphrase)
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ManuGowda The extractKeyPair
function requires enableAccessToLegacyAccounts
and even if it's false by default, changing it affects the account generation. The bug occurred because it wasn't taken into account previously
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@oskarleonard I followed the steps and it's fine because prior to the SDK update, accounts were generated based on that function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What i mean was that the account would in that case not be created with the default custom derivation Manu talked about, but instead with our legacy one. Which is why it wont work to remove it in this step.
If feels strange that we removed the enableAccessToLegacyAccounts
from settings if it can be used in this way. Feels like ✅ "Enable access to legacy Lisk accounts" should not be preserved when creating a new account. Ie that the enableAccessToLegacyAccounts
state should only be used when adding an account from Secret recovery phrase 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@oskarleonard new account created should always be using custom derivation path, ikem now has fixed it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ManuGowda It will still be possible to create a new account using this legacy API cryptography.legacy.getKeys(passphrase)
. Is that intended?
accounts.map(async (account) => { | ||
const options = { | ||
passphrase: account.passphrase, | ||
enableAccessToLegacyAccounts, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this, it will be false by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ManuGowda Done
).then((list) => { | ||
setAccountList(list); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
).then((list) => { | |
setAccountList(list); | |
}); | |
).then(setAccountList); |
What was the problem?
This PR resolves #5236
How was it solved?
How was it tested?