Skip to content

Commit 0046b02

Browse files
authored
Don't assign name to (primary) account if it's unchanged. (#3438)
* Don't assign name to (primary) account if it's unchanged. * Spanish translations suggestions I've missed in previous PR.
1 parent b23bbaf commit 0046b02

File tree

2 files changed

+6
-4
lines changed
  • src/frontend/src

2 files changed

+6
-4
lines changed

src/frontend/src/lib/locales/es.po

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -378,15 +378,15 @@ msgstr "Internet Identity luego conecta la autenticación de esos proveedores co
378378

379379
#: src/frontend/src/routes/(new-styling)/activate/+page.svelte:20
380380
msgid "Invalid code link"
381-
msgstr "Enlace de código no válido"
381+
msgstr "Código de enlace inválido"
382382

383383
#: src/frontend/src/lib/components/wizards/confirmAccessMethod/views/EnterConfirmationCode.svelte:78
384384
msgid "Invalid code. Please check and try again."
385-
msgstr "Código no válido. Por favor, comprueba y vuelve a intentarlo."
385+
msgstr "Código inválido. Por favor, comprueba y vuelve a intentarlo."
386386

387387
#: src/frontend/src/lib/components/views/AuthorizeError.svelte:20
388388
msgid "Invalid request"
389-
msgstr "Solicitud no válida"
389+
msgstr "Solicitud inválida"
390390

391391
#: src/frontend/src/routes/(new-styling)/+page.svelte:217
392392
msgid "Is my Face ID or Fingerprint stored in Internet Identity?"

src/frontend/src/routes/(new-styling)/authorize/(panel)/continue/+page.svelte

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,8 @@
180180
(account) =>
181181
account.account_number[0] === isEditAccountDialogVisibleForNumber,
182182
);
183-
if (account.name !== accounts[index].name[0]) {
183+
// Only update the name when it has changed
184+
if (account.name !== (accounts[index].name[0] ?? primaryAccountName)) {
184185
accounts[index] = await actor
185186
.update_account(
186187
identityNumber,
@@ -196,6 +197,7 @@
196197
defaultAccountNumber = accounts[index].account_number[0];
197198
}
198199
}
200+
// Only mark as default if it is set to true and wasn't true already.
199201
if (
200202
account.isDefaultSignIn &&
201203
defaultAccountNumber !== accounts[index].account_number[0]

0 commit comments

Comments
 (0)