1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-01-13 17:00:59 +00:00

fix(core/ui): fix title of XPUB success screen

This commit is contained in:
obrusvit 2024-10-02 12:11:40 +02:00 committed by Vít Obrusník
parent 911fe2a526
commit 3475354a1a
18 changed files with 32 additions and 5 deletions

View File

@ -0,0 +1 @@
[T3T1] Fix XPUB confirmed success screen title

View File

@ -50,6 +50,7 @@ static void _librust_qstrs(void) {
MP_QSTR_address__cancel_receive;
MP_QSTR_address__confirmed;
MP_QSTR_address__public_key;
MP_QSTR_address__public_key_confirmed;
MP_QSTR_address__qr_code;
MP_QSTR_address__title_cosigner;
MP_QSTR_address__title_receive_address;
@ -679,6 +680,7 @@ static void _librust_qstrs(void) {
MP_QSTR_time_ms;
MP_QSTR_timer;
MP_QSTR_title;
MP_QSTR_title_success;
MP_QSTR_total_amount;
MP_QSTR_total_fee_new;
MP_QSTR_total_label;

View File

@ -1369,6 +1369,7 @@ pub enum TranslatedString {
instructions__swipe_down = 964, // "Swipe down"
#[cfg(feature = "universal_fw")]
fido__title_credential_details = 965, // "Credential details"
address__public_key_confirmed = 966, // "Public key confirmed"
}
impl TranslatedString {
@ -2732,6 +2733,7 @@ impl TranslatedString {
Self::instructions__swipe_down => "Swipe down",
#[cfg(feature = "universal_fw")]
Self::fido__title_credential_details => "Credential details",
Self::address__public_key_confirmed => "Public key confirmed",
}
}
@ -4096,6 +4098,7 @@ impl TranslatedString {
Qstr::MP_QSTR_instructions__swipe_down => Some(Self::instructions__swipe_down),
#[cfg(feature = "universal_fw")]
Qstr::MP_QSTR_fido__title_credential_details => Some(Self::fido__title_credential_details),
Qstr::MP_QSTR_address__public_key_confirmed => Some(Self::address__public_key_confirmed),
_ => None,
}
}

View File

@ -105,6 +105,8 @@ impl GetAddress {
let path: Option<TString> = kwargs.get(Qstr::MP_QSTR_path)?.try_into_option()?;
let xpubs: Obj = kwargs.get(Qstr::MP_QSTR_xpubs)?;
let title_success: TString = kwargs.get(Qstr::MP_QSTR_title_success)?.try_into()?;
let br_name: TString = kwargs.get(Qstr::MP_QSTR_br_name)?.try_into()?;
let br_code: u16 = kwargs.get(Qstr::MP_QSTR_br_code)?.try_into()?;
@ -150,7 +152,7 @@ impl GetAddress {
let content_confirmed = Frame::left_aligned(
TR::words__title_success.into(),
StatusScreen::new_success_timeout(TR::address__confirmed.into()),
StatusScreen::new_success_timeout(title_success),
)
.with_footer(TR::instructions__continue_in_app.into(), None)
.with_result_icon(theme::ICON_BULLET_CHECKMARK, theme::GREEN_LIGHT)

View File

@ -1659,6 +1659,7 @@ pub static mp_module_trezorui2: Module = obj_module! {
/// account: str | None,
/// path: str | None,
/// xpubs: list[tuple[str, str]],
/// title_success: str,
/// br_code: ButtonRequestType,
/// br_name: str,
/// ) -> LayoutObj[UiResult]:

View File

@ -552,6 +552,7 @@ def flow_get_address(
account: str | None,
path: str | None,
xpubs: list[tuple[str, str]],
title_success: str,
br_code: ButtonRequestType,
br_name: str,
) -> LayoutObj[UiResult]:

View File

@ -12,6 +12,7 @@ class TR:
address__cancel_receive: str = "Cancel receive"
address__confirmed: str = "Receive address confirmed"
address__public_key: str = "Public key"
address__public_key_confirmed: str = "Public key confirmed"
address__qr_code: str = "QR code"
address__title_cosigner: str = "Cosigner"
address__title_receive_address: str = "Receive address"

View File

@ -514,6 +514,12 @@ async def show_address(
)
return result
title_success = (
TR.address__public_key_confirmed
if title in ("XPUB", TR.address__public_key)
else TR.address__confirmed
)
await raise_if_not_confirmed(
RustLayout(
trezorui2.flow_get_address(
@ -527,6 +533,7 @@ async def show_address(
account=account,
path=path,
xpubs=[(xpub_title(i), xpub) for i, xpub in enumerate(xpubs)],
title_success=title_success,
br_name=br_name,
br_code=br_code,
)

View File

@ -46,6 +46,7 @@
"address__cancel_receive": "Zrušit příjem",
"address__confirmed": "Adresa příjemce potvrzena",
"address__public_key": "Veřejný klíč",
"address__public_key_confirmed": "Veřejný klíč potvrzen",
"address__qr_code": "QR kód",
"address__title_cosigner": "Další podepisující",
"address__title_receive_address": "Přijímací adresa",

View File

@ -46,6 +46,7 @@
"address__cancel_receive": "Empfang abbr.",
"address__confirmed": "Empfängeradresse bestätigt",
"address__public_key": "Public Key",
"address__public_key_confirmed": "Public Key bestätigt",
"address__qr_code": "QR-Code",
"address__title_cosigner": "Mitunterzeich.",
"address__title_receive_address": "Empfäng-adresse",

View File

@ -14,6 +14,7 @@
"address__cancel_receive": "Cancel receive",
"address__confirmed": "Receive address confirmed",
"address__public_key": "Public key",
"address__public_key_confirmed": "Public key confirmed",
"address__qr_code": "QR code",
"address__title_cosigner": "Cosigner",
"address__title_receive_address": "Receive address",

View File

@ -46,6 +46,7 @@
"address__cancel_receive": "Cancelar destino",
"address__confirmed": "Dirección de destino confirmada",
"address__public_key": "Clave pública",
"address__public_key_confirmed": "Clave pública confirmada",
"address__qr_code": "Código QR",
"address__title_cosigner": "Cofirmante",
"address__title_receive_address": "Dirección destino",

View File

@ -46,6 +46,7 @@
"address__cancel_receive": "Annuler réception",
"address__confirmed": "Adresse de réception confirmée",
"address__public_key": "Clé publique",
"address__public_key_confirmed": "Clé publique confirmée",
"address__qr_code": "Code QR",
"address__title_cosigner": "Cosignataire",
"address__title_receive_address": "Adr. de récep.",

View File

@ -43,6 +43,7 @@
"addr_mismatch__wrong_derivation_path": "Percorso deriv. errato per conto selezion.",
"addr_mismatch__xpub_mismatch": "XPUB non corrisp.?",
"address__public_key": "Chiave pubblica",
"address__public_key_confirmed": "Chiave pubblica confermata",
"address__title_cosigner": "Cofirmatario",
"address__title_receive_address": "Indirizzo ricez.",
"address__title_yours": "I tuoi",

View File

@ -964,5 +964,6 @@
"962": "fido__title_for_authentication",
"963": "fido__title_select_credential",
"964": "instructions__swipe_down",
"965": "fido__title_credential_details"
"965": "fido__title_credential_details",
"966": "address__public_key_confirmed"
}

View File

@ -44,6 +44,7 @@
"addr_mismatch__xpub_mismatch": "XPUB não coincide?",
"address__cancel_receive": "Canc. receb.",
"address__public_key": "Chave pública",
"address__public_key_confirmed": "Chave pública confirmada",
"address__title_cosigner": "Cosigner",
"address__title_receive_address": "End. de recebimento",
"address__title_yours": "Seu",

View File

@ -1,8 +1,8 @@
{
"current": {
"merkle_root": "b2e87e7efbbe9071b398822f29d4f77a8428b216c6ec6f34e4e84f8d311c0401",
"datetime": "2024-10-01T16:40:42.014914",
"commit": "830dd3e7bc4ceca71fecb14abdd04eda2ea28f44"
"merkle_root": "b6f219293d33f026ebcee6b877ec62903a082f2cedb71053de8ecf614c4b7e4f",
"datetime": "2024-10-02T09:30:46.734439",
"commit": "774f9de745ec38d79c06cbe487af46b8e0136950"
},
"history": [
{

View File

@ -43,6 +43,7 @@
"addr_mismatch__wrong_derivation_path": "Seçilen hesap için türetme yolu yanlış.",
"addr_mismatch__xpub_mismatch": "XPUB uyumsuz mu?",
"address__public_key": "Genel anahtar",
"address__public_key_confirmed": "Genel anahtar onaylandı",
"address__title_cosigner": "Müşterek i̇mzalayan",
"address__title_receive_address": "Alma adresi̇",
"address__title_yours": "Si̇zi̇nki̇",