Skip to content

Commit

Permalink
Merge pull request #1809 from oasisprotocol/lw/num-invalid
Browse files Browse the repository at this point in the history
Show number of invalid private keys in V0 extension migration step
lukaw3d authored Dec 19, 2023
2 parents 14a7216 + 64ff6a7 commit 21ceaf6
Showing 3 changed files with 17 additions and 2 deletions.
1 change: 1 addition & 0 deletions .changelog/1809.trivial.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Show number of invalid private keys in V0 extension migration step
14 changes: 13 additions & 1 deletion src/app/components/Persist/MigrateV0StateForm.tsx
Original file line number Diff line number Diff line change
@@ -177,10 +177,22 @@ export function MigrateV0StateForm() {
messages={{ required: t('migrateV0Extension.requiredField', 'This field is required') }}
{...preventSavingInputsToUserData}
>
<>
{/*
Workaround for i18next-scanner to pickup plurals correctly, because it is missing
defaultValue_zero, defaultValue_one, defaultValue_other here:
https://github.com/i18next/i18next-scanner/blob/4687b6a/src/parser.js#L502-L503
*/}
{t(
'migrateV0Extension.backupInvalidPrivateKeys.description_one',
'1 of your private keys has typos and won’t be stored by the new wallet extension. Please make sure to copy it and store it elsewhere before proceeding, so you can correct it later.',
) && null}
</>
<Paragraph>
{t(
'migrateV0Extension.backupInvalidPrivateKeys.description',
'Some of your private keys have typos and won’t be stored by the new wallet extension. Please make sure to copy them and store them elsewhere before proceeding.',
'{{count}} of your private keys have typos and won’t be stored by the new wallet extension. Please make sure to copy them and store them elsewhere before proceeding, so you can correct them later.',
{ count: migratingV0State.invalidPrivateKeys.length },
)}
</Paragraph>
<Box width="medium" gap="large">
4 changes: 3 additions & 1 deletion src/locales/en/translation.json
Original file line number Diff line number Diff line change
@@ -242,7 +242,9 @@
"migrateV0Extension": {
"backupInvalidPrivateKeys": {
"confirm": "I’ve safely stored my private keys",
"description": "Some of your private keys have typos and won’t be stored by the new wallet extension. Please make sure to copy them and store them elsewhere before proceeding.",
"description": "{{count}} of your private keys have typos and won’t be stored by the new wallet extension. Please make sure to copy them and store them elsewhere before proceeding, so you can correct them later.",
"description_one": "1 of your private keys has typos and won’t be stored by the new wallet extension. Please make sure to copy it and store it elsewhere before proceeding, so you can correct it later.",
"description_plural": "{{count}} of your private keys have typos and won’t be stored by the new wallet extension. Please make sure to copy them and store them elsewhere before proceeding, so you can correct them later.",
"reveal": "Tap to show invalid private key"
},
"backupMnemonic": {

0 comments on commit 21ceaf6

Please sign in to comment.