From 17418d151856db3212fc41af5cea9659ce15c223 Mon Sep 17 00:00:00 2001 From: Duddino Date: Tue, 14 Oct 2025 15:22:29 +0200 Subject: [PATCH] Improve ledger address confirmation screen --- locale/cnr/translation.toml | 3 ++- locale/de/translation.toml | 3 ++- locale/en/translation.toml | 3 ++- locale/es-mx/translation.toml | 3 ++- locale/fr/translation.toml | 3 ++- locale/hi/translation.toml | 3 ++- locale/it/translation.toml | 3 ++- locale/nl/translation.toml | 3 ++- locale/ph/translation.toml | 3 ++- locale/pl/translation.toml | 3 ++- locale/pt-br/translation.toml | 2 ++ locale/pt-pt/translation.toml | 2 ++ locale/pt/translation.toml | 1 - locale/template/translation.toml | 3 ++- locale/uwu/translation.toml | 3 ++- scripts/composables/use_wallet.js | 1 + scripts/wallet.js | 17 ++++++++++------- 17 files changed, 39 insertions(+), 20 deletions(-) diff --git a/locale/cnr/translation.toml b/locale/cnr/translation.toml index 6b17521d7..537af3345 100644 --- a/locale/cnr/translation.toml +++ b/locale/cnr/translation.toml @@ -152,7 +152,6 @@ popupProposalAddress = "Adresa predloga (Opcionalno)" # Proposal Address (Option popupProposalDuration = "Trajanje u ciklusima" # Duration in cycles popupProposalPerCycle = "po ciklusu" # per cycle popupProposalEncryptFirst = "Morate pritisnuti „{button}“ pre nego što možete kreirati predloge!" # You need to hit "{button}" before you can create proposals! -popupHardwareAddrCheck = "Molimo vas da potvrdite da je ovo adresa koju vidite na svom" # Please confirm this is the address you see on your proposalFinalisationConfirming = "Potvrđivanje..." # Confirming... proposalFinalisationRemaining = "preostalo" # remaining proposalFinalisationExpired = "Predlog je istekao" # Proposal Expired @@ -253,6 +252,8 @@ stop = "" # Stop popupSeedPhraseBadNote = "" # This Seed Phrase appears to be invalid
(The checksum doesn't match).
It might have a typo,
or it could’ve been created in an unusual way. Do you still want to continue? transactionNeedsAddress = "" # The address field is empty transactionNeedsAmount = "" # The amount is invalid +popupHardwareAddrIsUsedForChange = "" # This address will receive the change (unused funds) from your transaction. +popupHardwareAddrCheck = "" # Verify that the address shown on this popup matches the one displayed on your {device} device.
This confirms the address really belongs to your wallet and hasn’t been tampered with. [ALERTS] INTERNAL_ERROR = "Interna greška, molimo pokušajte ponovo kasnije" # Internal error, please try again later diff --git a/locale/de/translation.toml b/locale/de/translation.toml index 51c321dca..a0c04fe31 100644 --- a/locale/de/translation.toml +++ b/locale/de/translation.toml @@ -146,7 +146,6 @@ popupProposalAddress = "Adresse des Antrags (Optional)" # Proposal Address (Opti popupProposalDuration = "Dauer in Zyklen" # Duration in cycles popupProposalPerCycle = "pro Zyklus" # per cycle popupProposalEncryptFirst = "Du musst den \"{button}\" drücken bevor du einen Antrag erstellen kannst!" # You need to hit "{button}" before you can create proposals! -popupHardwareAddrCheck = "Bitte bestätige die Adresse auf deinem" # Please confirm this is the address you see on your proposalFinalisationConfirming = "Bestätige..." # Confirming... proposalFinalisationRemaining = "Verbleibend" # remaining proposalFinalisationExpired = "Antrag ausgelaufen" # Proposal Expired @@ -253,6 +252,8 @@ stop = "" # Stop popupSeedPhraseBadNote = "" # This Seed Phrase appears to be invalid
(The checksum doesn't match).
It might have a typo,
or it could’ve been created in an unusual way. Do you still want to continue? transactionNeedsAddress = "" # The address field is empty transactionNeedsAmount = "" # The amount is invalid +popupHardwareAddrIsUsedForChange = "" # This address will receive the change (unused funds) from your transaction. +popupHardwareAddrCheck = "" # Verify that the address shown on this popup matches the one displayed on your {device} device.
This confirms the address really belongs to your wallet and hasn’t been tampered with. [ALERTS] INTERNAL_ERROR = "Interner Fehler, bitte versuche es später erneut" # Internal error, please try again later diff --git a/locale/en/translation.toml b/locale/en/translation.toml index 88b4a6113..6a84b6910 100644 --- a/locale/en/translation.toml +++ b/locale/en/translation.toml @@ -152,7 +152,6 @@ popupProposalAddress = "Proposal Address (Optional)" # Proposal Address (Optiona popupProposalDuration = "Duration in cycles" # Duration in cycles popupProposalPerCycle = "per cycle" # per cycle popupProposalEncryptFirst = "You need to hit \"{button}\" before you can create proposals!" # You need to hit "{button}" before you can create proposals! -popupHardwareAddrCheck = "Please confirm this is the address you see on your" # Please confirm this is the address you see on your proposalFinalisationConfirming = "Confirming..." # Confirming... proposalFinalisationRemaining = "remaining" # remaining proposalFinalisationExpired = "Proposal Expired" # Proposal Expired @@ -253,6 +252,8 @@ stop = "Stop" # Stop popupSeedPhraseBadNote = "This Seed Phrase appears to be invalid
(The checksum doesn't match).
It might have a typo,
or it could’ve been created in an unusual way. Do you still want to continue?" # This Seed Phrase appears to be invalid
(The checksum doesn't match).
It might have a typo,
or it could’ve been created in an unusual way. Do you still want to continue? transactionNeedsAddress = "The address field is empty" # The address field is empty transactionNeedsAmount = "The amount is invalid" # The amount is invalid +popupHardwareAddrIsUsedForChange = "This address will receive the change (unused funds) from your transaction." # This address will receive the change (unused funds) from your transaction. +popupHardwareAddrCheck = "Verify that the address shown on this popup matches the one displayed on your {device} device.
This confirms the address really belongs to your wallet and hasn’t been tampered with." # Verify that the address shown on this popup matches the one displayed on your {device} device.
This confirms the address really belongs to your wallet and hasn’t been tampered with. [ALERTS] INTERNAL_ERROR = "Internal error, please try again later" # Internal error, please try again later diff --git a/locale/es-mx/translation.toml b/locale/es-mx/translation.toml index 01aa9e45d..c624b3219 100644 --- a/locale/es-mx/translation.toml +++ b/locale/es-mx/translation.toml @@ -151,7 +151,6 @@ popupProposalAddress = "" # Proposal Address (Optional) popupProposalDuration = "Duración en Ciclos" # Duration in cycles popupProposalPerCycle = "por ciclo" # per cycle popupProposalEncryptFirst = "" # You need to hit "{button}" before you can create proposals! -popupHardwareAddrCheck = "Por favor, confirma que esta es la dirección que ve en tu" # Please confirm this is the address you see on your proposalFinalisationConfirming = "Confirmando..." # Confirming... proposalFinalisationRemaining = "restante" # remaining proposalFinalisationExpired = "Propuesta Expirada" # Proposal Expired @@ -253,6 +252,8 @@ stop = "" # Stop popupSeedPhraseBadNote = "" # This Seed Phrase appears to be invalid
(The checksum doesn't match).
It might have a typo,
or it could’ve been created in an unusual way. Do you still want to continue? transactionNeedsAddress = "" # The address field is empty transactionNeedsAmount = "" # The amount is invalid +popupHardwareAddrIsUsedForChange = "" # This address will receive the change (unused funds) from your transaction. +popupHardwareAddrCheck = "" # Verify that the address shown on this popup matches the one displayed on your {device} device.
This confirms the address really belongs to your wallet and hasn’t been tampered with. [ALERTS] INTERNAL_ERROR = "Error interno, vuelve a intentarlo más tarde" # Internal error, please try again later diff --git a/locale/fr/translation.toml b/locale/fr/translation.toml index e48dd6cf3..42da00bd3 100644 --- a/locale/fr/translation.toml +++ b/locale/fr/translation.toml @@ -151,7 +151,6 @@ popupProposalAddress = "Adresse de la proposition (optionnel)" # Proposal Addres popupProposalDuration = "Durée en cycles" # Duration in cycles popupProposalPerCycle = "par cycle" # per cycle popupProposalEncryptFirst = "Vous devez appuyer sur \"{button}\" avant de pouvoir créer des propositions !" # You need to hit "{button}" before you can create proposals! -popupHardwareAddrCheck = "Veuillez confirmer qu'il s'agit bien de l'adresse figurant sur votre" # Please confirm this is the address you see on your proposalFinalisationConfirming = "Confirmant..." # Confirming... proposalFinalisationRemaining = "restants" # remaining proposalFinalisationExpired = "Proposition expirée" # Proposal Expired @@ -253,6 +252,8 @@ stop = "" # Stop popupSeedPhraseBadNote = "" # This Seed Phrase appears to be invalid
(The checksum doesn't match).
It might have a typo,
or it could’ve been created in an unusual way. Do you still want to continue? transactionNeedsAddress = "" # The address field is empty transactionNeedsAmount = "" # The amount is invalid +popupHardwareAddrIsUsedForChange = "" # This address will receive the change (unused funds) from your transaction. +popupHardwareAddrCheck = "" # Verify that the address shown on this popup matches the one displayed on your {device} device.
This confirms the address really belongs to your wallet and hasn’t been tampered with. [ALERTS] INTERNAL_ERROR = "Erreur interne, veuillez réessayer plus tard" # Internal error, please try again later diff --git a/locale/hi/translation.toml b/locale/hi/translation.toml index 14084c532..caa11e764 100644 --- a/locale/hi/translation.toml +++ b/locale/hi/translation.toml @@ -159,7 +159,6 @@ popupProposalAddress = "प्रपोजल ऐड्रेस (वैकल popupProposalDuration = "चक्रों में अवधि" # Duration in cycles popupProposalPerCycle = "प्रति चक्र" # per cycle popupProposalEncryptFirst = "आपको प्रपोजल बनाने से पहले \"{button}\" पर क्लिक करना होगा!" # You need to hit "{button}" before you can create proposals! -popupHardwareAddrCheck = "कृपया कन्फर्म करें कि यह वही एड्रेस है जो आप देख रहे हैं" # Please confirm this is the address you see on your proposalFinalisationConfirming = "कन्फर्मिंग..." # Confirming... proposalFinalisationRemaining = "रिमेइनिंग" # remaining proposalFinalisationExpired = "प्रपोजल एक्सपायर्ड" # Proposal Expired @@ -253,6 +252,8 @@ stop = "" # Stop popupSeedPhraseBadNote = "" # This Seed Phrase appears to be invalid
(The checksum doesn't match).
It might have a typo,
or it could’ve been created in an unusual way. Do you still want to continue? transactionNeedsAddress = "" # The address field is empty transactionNeedsAmount = "" # The amount is invalid +popupHardwareAddrIsUsedForChange = "" # This address will receive the change (unused funds) from your transaction. +popupHardwareAddrCheck = "" # Verify that the address shown on this popup matches the one displayed on your {device} device.
This confirms the address really belongs to your wallet and hasn’t been tampered with. [ALERTS] INTERNAL_ERROR = "आंतरिक त्रुटि, कृपया कुछ समय बाद पुनः प्रयास करें" # Internal error, please try again later diff --git a/locale/it/translation.toml b/locale/it/translation.toml index 5b7662fe6..ee0a19c2e 100644 --- a/locale/it/translation.toml +++ b/locale/it/translation.toml @@ -143,7 +143,6 @@ popupProposalAddress = "Address della proposta (Opzionale)" # Proposal Address ( popupProposalDuration = "Durata in cicli" # Duration in cycles popupProposalPerCycle = "per ciclo" # per cycle popupProposalEncryptFirst = "Devi cliccare \"{button}\" prima di poter creare proposte!" # You need to hit "{button}" before you can create proposals! -popupHardwareAddrCheck = "Conferma che questo è l'indirizzo che vedi sul tuo" # Please confirm this is the address you see on your proposalFinalisationConfirming = "Confermando..." # Confirming... proposalFinalisationRemaining = "rimanenti" # remaining proposalFinalisationExpired = "Proposta scaduta" # Proposal Expired @@ -253,6 +252,8 @@ stop = "Stop" # Stop popupSeedPhraseBadNote = "Questa Seed Phrase sembra non essere valida
(il checksum non corrisponde).
Potrebbe contenere un errore di battitura,
oppure essere stata generata in modo non convenzionale. Vuoi comunque continuare?" # This Seed Phrase appears to be invalid
(The checksum doesn't match).
It might have a typo,
or it could’ve been created in an unusual way. Do you still want to continue? transactionNeedsAddress = "L'input dell'address è vuoto" # The address field is empty transactionNeedsAmount = "La quantità è invalida" # The amount is invalid +popupHardwareAddrIsUsedForChange = "" # This address will receive the change (unused funds) from your transaction. +popupHardwareAddrCheck = "" # Verify that the address shown on this popup matches the one displayed on your {device} device.
This confirms the address really belongs to your wallet and hasn’t been tampered with. [ALERTS] INTERNAL_ERROR = "Errore interno, rirova più tardi" # Internal error, please try again later diff --git a/locale/nl/translation.toml b/locale/nl/translation.toml index 8010a7ca2..6501fe3d7 100644 --- a/locale/nl/translation.toml +++ b/locale/nl/translation.toml @@ -152,7 +152,6 @@ popupProposalAddress = "Voorsteladres (Optioneel)" # Proposal Address (Optional) popupProposalDuration = "Duur in cycli" # Duration in cycles popupProposalPerCycle = "per cyclus" # per cycle popupProposalEncryptFirst = "Je moet \"{button}\" indrukken voordat je voorstellen kunt maken!" # You need to hit "{button}" before you can create proposals! -popupHardwareAddrCheck = "Bevestig alstublieft dat dit het adres is dat je ziet op je" # Please confirm this is the address you see on your proposalFinalisationConfirming = "Bevestigen..." # Confirming... proposalFinalisationRemaining = "resterend" # remaining proposalFinalisationExpired = "Voorstel verlopen" # Proposal Expired @@ -253,6 +252,8 @@ stop = "" # Stop popupSeedPhraseBadNote = "" # This Seed Phrase appears to be invalid
(The checksum doesn't match).
It might have a typo,
or it could’ve been created in an unusual way. Do you still want to continue? transactionNeedsAddress = "" # The address field is empty transactionNeedsAmount = "" # The amount is invalid +popupHardwareAddrIsUsedForChange = "" # This address will receive the change (unused funds) from your transaction. +popupHardwareAddrCheck = "" # Verify that the address shown on this popup matches the one displayed on your {device} device.
This confirms the address really belongs to your wallet and hasn’t been tampered with. [ALERTS] INTERNAL_ERROR = "Interne fout, probeer het later opnieuw" # Internal error, please try again later diff --git a/locale/ph/translation.toml b/locale/ph/translation.toml index 5140f2c13..92338d00e 100644 --- a/locale/ph/translation.toml +++ b/locale/ph/translation.toml @@ -150,7 +150,6 @@ popupProposalAddress = "Address ng Proposal (Optional)" # Proposal Address (Opti popupProposalDuration = "Duration in cycles" # Duration in cycles popupProposalPerCycle = "per cycles" # per cycle popupProposalEncryptFirst = "Kailangan mong pindutin ang \"{button}\" bago ka gumawa ng proposals!" # You need to hit "{button}" before you can create proposals! -popupHardwareAddrCheck = "Pakiusap kumpirmahin na ito ang address na nakikita mo sa iyong" # Please confirm this is the address you see on your proposalFinalisationConfirming = "Kinukumpirma..." # Confirming... proposalFinalisationRemaining = "natitira" # remaining proposalFinalisationExpired = "Proposal expired" # Proposal Expired @@ -253,6 +252,8 @@ stop = "" # Stop popupSeedPhraseBadNote = "" # This Seed Phrase appears to be invalid
(The checksum doesn't match).
It might have a typo,
or it could’ve been created in an unusual way. Do you still want to continue? transactionNeedsAddress = "" # The address field is empty transactionNeedsAmount = "" # The amount is invalid +popupHardwareAddrIsUsedForChange = "" # This address will receive the change (unused funds) from your transaction. +popupHardwareAddrCheck = "" # Verify that the address shown on this popup matches the one displayed on your {device} device.
This confirms the address really belongs to your wallet and hasn’t been tampered with. [ALERTS] INTERNAL_ERROR = "Internal error, Pakiusap uliting muli" # Internal error, please try again later diff --git a/locale/pl/translation.toml b/locale/pl/translation.toml index 890c6a2c3..c77ce91b8 100644 --- a/locale/pl/translation.toml +++ b/locale/pl/translation.toml @@ -152,7 +152,6 @@ popupProposalAddress = "Adres Propozycji (Opcjonalnie)" # Proposal Address (Opti popupProposalDuration = "Czas trwania w cyklach" # Duration in cycles popupProposalPerCycle = "na cykl" # per cycle popupProposalEncryptFirst = "Zanim będziesz mógł tworzyć propozycje, musisz kliknąć \"{button}\"" # You need to hit "{button}" before you can create proposals! -popupHardwareAddrCheck = "Potwierdź, że jest to adres widoczny na Twoim koncie" # Please confirm this is the address you see on your proposalFinalisationConfirming = "Potwierdzam..." # Confirming... proposalFinalisationRemaining = "pozostało" # remaining proposalFinalisationExpired = "Propozycja Wygasła" # Proposal Expired @@ -253,6 +252,8 @@ stop = "" # Stop popupSeedPhraseBadNote = "" # This Seed Phrase appears to be invalid
(The checksum doesn't match).
It might have a typo,
or it could’ve been created in an unusual way. Do you still want to continue? transactionNeedsAddress = "" # The address field is empty transactionNeedsAmount = "" # The amount is invalid +popupHardwareAddrIsUsedForChange = "" # This address will receive the change (unused funds) from your transaction. +popupHardwareAddrCheck = "" # Verify that the address shown on this popup matches the one displayed on your {device} device.
This confirms the address really belongs to your wallet and hasn’t been tampered with. [ALERTS] INTERNAL_ERROR = "Błąd wewnętrzny, spróbuj ponownie później" # Internal error, please try again later diff --git a/locale/pt-br/translation.toml b/locale/pt-br/translation.toml index d37d91913..f7a52dc2b 100644 --- a/locale/pt-br/translation.toml +++ b/locale/pt-br/translation.toml @@ -141,6 +141,8 @@ stop = "" # Stop popupSeedPhraseBadNote = "" # This Seed Phrase appears to be invalid
(The checksum doesn't match).
It might have a typo,
or it could’ve been created in an unusual way. Do you still want to continue? transactionNeedsAddress = "" # The address field is empty transactionNeedsAmount = "" # The amount is invalid +popupHardwareAddrIsUsedForChange = "" # This address will receive the change (unused funds) from your transaction. +popupHardwareAddrCheck = "" # Verify that the address shown on this popup matches the one displayed on your {device} device.
This confirms the address really belongs to your wallet and hasn’t been tampered with. [ALERTS] STAKE_ADDR_SET = "Endereço de Cold Staking definido!
Ao fazer Stake no futuro este endereço irá ser usado." # Cold Address set!
Future stakes will use this address. diff --git a/locale/pt-pt/translation.toml b/locale/pt-pt/translation.toml index fa19517e0..0395cbed9 100644 --- a/locale/pt-pt/translation.toml +++ b/locale/pt-pt/translation.toml @@ -141,6 +141,8 @@ stop = "" # Stop popupSeedPhraseBadNote = "" # This Seed Phrase appears to be invalid
(The checksum doesn't match).
It might have a typo,
or it could’ve been created in an unusual way. Do you still want to continue? transactionNeedsAddress = "" # The address field is empty transactionNeedsAmount = "" # The amount is invalid +popupHardwareAddrIsUsedForChange = "" # This address will receive the change (unused funds) from your transaction. +popupHardwareAddrCheck = "" # Verify that the address shown on this popup matches the one displayed on your {device} device.
This confirms the address really belongs to your wallet and hasn’t been tampered with. [ALERTS] STAKE_ADDR_SET = "Endereço de Cold Staking definido!
Ao fazer Stake no futuro irá ser usado este endereço." # Cold Address set!
Future stakes will use this address. diff --git a/locale/pt/translation.toml b/locale/pt/translation.toml index ae28f2115..e03e63721 100644 --- a/locale/pt/translation.toml +++ b/locale/pt/translation.toml @@ -89,7 +89,6 @@ popupCreateProposalCost = "Custo" # Cost popupProposalName = "Título da Proposta" # Proposal Name popupProposalDuration = "Duração em ciclos" # Duration in cycles popupProposalPerCycle = "por ciclo" # per cycle -popupHardwareAddrCheck = "Confirme se este é o seu endereço que você vê" # Please confirm this is the address you see on your proposalFinalisationConfirming = "A Confirmar" # Confirming... proposalFinalisationRemaining = "restante" # remaining proposalFinalisationExpired = "Proposta Expirada" # Proposal Expired diff --git a/locale/template/translation.toml b/locale/template/translation.toml index 0ecba8db9..1a31e420b 100644 --- a/locale/template/translation.toml +++ b/locale/template/translation.toml @@ -185,7 +185,8 @@ popupProposalAddress2 = "Proposal Address" popupProposalDuration = "Duration in cycles" popupProposalPerCycle = "per cycle" popupProposalEncryptFirst = "You need to hit \"{button}\" before you can create proposals!" -popupHardwareAddrCheck = "Please confirm this is the address you see on your" +popupHardwareAddrCheck = "Verify that the address shown on this popup matches the one displayed on your {device} device.
This confirms the address really belongs to your wallet and hasn’t been tampered with." +popupHardwareAddrIsUsedForChange = "This address will receive the change (unused funds) from your transaction." proposalFinalisationConfirming = "Confirming..." proposalFinalisationRemaining = "remaining" proposalFinalisationExpired = "Proposal Expired" diff --git a/locale/uwu/translation.toml b/locale/uwu/translation.toml index 25317ad22..82ded1d34 100644 --- a/locale/uwu/translation.toml +++ b/locale/uwu/translation.toml @@ -151,7 +151,6 @@ popupProposalAddress = "Pwoposal Addwess (Optional)" # Proposal Address (Optiona popupProposalDuration = "Duwration in cycles" # Duration in cycles popupProposalPerCycle = "per cycle" # per cycle popupProposalEncryptFirst = "Yew need tew hit \"{button}\" before yew can cweate pwoposals!" # You need to hit "{button}" before you can create proposals! -popupHardwareAddrCheck = "Pwease confwirm dis is the addwess you see on ur" # Please confirm this is the address you see on your proposalFinalisationConfirming = "Confwirming..." # Confirming... proposalFinalisationRemaining = "left" # remaining proposalFinalisationExpired = "Pwoposal Expired" # Proposal Expired @@ -253,6 +252,8 @@ stop = "" # Stop popupSeedPhraseBadNote = "" # This Seed Phrase appears to be invalid
(The checksum doesn't match).
It might have a typo,
or it could’ve been created in an unusual way. Do you still want to continue? transactionNeedsAddress = "" # The address field is empty transactionNeedsAmount = "" # The amount is invalid +popupHardwareAddrIsUsedForChange = "" # This address will receive the change (unused funds) from your transaction. +popupHardwareAddrCheck = "" # Verify that the address shown on this popup matches the one displayed on your {device} device.
This confirms the address really belongs to your wallet and hasn’t been tampered with. [ALERTS] INTERNAL_ERROR = "Internal error, pwease try again later" # Internal error, please try again later diff --git a/scripts/composables/use_wallet.js b/scripts/composables/use_wallet.js index 86c15eb1a..65edcef0e 100644 --- a/scripts/composables/use_wallet.js +++ b/scripts/composables/use_wallet.js @@ -85,6 +85,7 @@ function addWallet(wallet) { const [changeAddress] = await guiGetNewAddress({ verify: true, nReceiving: 0, + isForChange: true, }); tx = wallet.createTransaction(address, value, { ...opts, diff --git a/scripts/wallet.js b/scripts/wallet.js index 863f39608..76ae6de86 100644 --- a/scripts/wallet.js +++ b/scripts/wallet.js @@ -8,7 +8,7 @@ import { COutpoint, Transaction } from './transaction.js'; import { confirmPopup, isShieldAddress } from './misc.js'; import { cChainParams } from './chain_params.js'; import { COIN } from './chain_params.js'; -import { ALERTS, translation } from './i18n.js'; +import { ALERTS, tr, translation } from './i18n.js'; import { encrypt } from './aes-gcm.js'; import { Database } from './database.js'; import { RECEIVE_TYPES } from './contacts-book.js'; @@ -1650,13 +1650,14 @@ export async function getNewAddress({ verify = false, shield = false, nReceiving = 0, + isForChange = false, } = {}) { const [address, path] = activeWallet.getNewAddress(nReceiving); if (verify && activeWallet.isHardwareWallet()) { // Generate address to present to the user without asking to verify const confAddress = await confirmPopup({ title: ALERTS.CONFIRM_POPUP_VERIFY_ADDR, - html: createAddressConfirmation(address), + html: createAddressConfirmation(address, isForChange), resolvePromise: activeWallet.getMasterKey().verifyAddress(path), }); if (address !== confAddress) { @@ -1674,9 +1675,11 @@ export async function getNewAddress({ return [address, path]; } -function createAddressConfirmation(address) { - return `${ - translation.popupHardwareAddrCheck - } ${LedgerController.getInstance().getHardwareName()}. -
${address}
`; +function createAddressConfirmation(address, isForChange = false) { + return `${tr(translation.popupHardwareAddrCheck, [ + { device: LedgerController.getInstance().getHardwareName() }, + ])} +
${address}
+
+ ${isForChange ? translation.popupHardwareAddrIsUsedForChange : ''}`; }