Skip to content

Commit 564500f

Browse files
authored
fix(core): misc fix (#356)
1. update i18n items 2. fix typos 3. add a transition page to reduce the long black screen time after entering the passphrase 4. fix the crash issue caused by memory fragmentation when there are a large number of registered Fido passkeys
1 parent e421c66 commit 564500f

File tree

22 files changed

+69
-58
lines changed

22 files changed

+69
-58
lines changed

core/src/apps/base.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ def get_vendor():
2929
return "trezor.io" if storage.device.is_trezor_compatible() else "onekey.so"
3030

3131

32+
FW_VENDOR_BTC_ONLY = "OneKey Bitcoin-only"
33+
34+
3235
def busy_expiry_ms() -> int:
3336
"""
3437
Returns the time left until the busy state expires or 0 if the device is not in the busy state.
@@ -101,6 +104,7 @@ def get_features() -> Features:
101104
Capability.Shamir,
102105
Capability.ShamirGroups,
103106
]
107+
f.fw_vendor = FW_VENDOR_BTC_ONLY
104108
else:
105109
f.capabilities = [
106110
Capability.Bitcoin,

core/src/apps/common/seed.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from typing import TYPE_CHECKING
22

3-
from storage import cache, device
3+
import storage.cache as cache
4+
import storage.device as device
45
from trezor import utils, wire
56
from trezor.crypto import bip32, hmac
67

@@ -85,6 +86,10 @@ async def derive_and_store_roots(ctx: wire.Context) -> None:
8586

8687
if not state[0] & 0x80:
8788
passphrase = await get_passphrase(ctx)
89+
from trezor.ui.layouts import show_popup
90+
from trezor.lvglui.i18n import gettext as _, keys as i18n_keys
91+
92+
await show_popup(_(i18n_keys.TITLE__PLEASE_WAIT), None, timeout_ms=1000)
8893
mnemonic.get_seed(passphrase, progress_bar=False)
8994

9095
if cache.SESSION_DIRIVE_CARDANO:

core/src/trezor/lvglui/i18n/keys.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2234,6 +2234,6 @@
22342234
TITLE_REQUEST_CONFIRMATION = 1015
22352235
# Abort Recovery Phrase Creation?
22362236
TITLE__ABORT_RECOVERY_PHRASE_CREATION = 1016
2237-
# Write down the following {num} words in order for Share {num1} of {num2}.
2238-
TITLE__WRITE_DOWN_THE_FOLLOWING_20_WORDS_IN_ORDER_FOR_SHARE_STR_OF_STR = 1017
2237+
# This is Share {num1} of {num2}.
2238+
SUBTITLE__THIS_IS_SHARE_STR_OF_STR = 1017
22392239
# fmt: on

core/src/trezor/lvglui/i18n/locales/de.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1017,6 +1017,6 @@
10171017
"Aktualisieren Sie auf die neueste Version, um „An PIN anheften“ zu verwenden.",
10181018
"Anfragebestätigung",
10191019
"Wiederherstellungsphrase-Erstellung abbrechen?",
1020-
"Schreiben Sie die folgenden {num} Wörter der Reihe nach für Anteil {num1} von {num2} auf.",
1020+
"Dies ist Anteil {num1} von {num2}.",
10211021
]
10221022
# fmt: on

core/src/trezor/lvglui/i18n/locales/en.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1017,6 +1017,6 @@
10171017
"Update to the latest version to use “Attach to PIN”.",
10181018
"Request Confirmation",
10191019
"Abort Recovery Phrase Creation?",
1020-
"Write down the following {num} words in order for Share {num1} of {num2}.",
1020+
"This is Share {num1} of {num2}.",
10211021
]
10221022
# fmt: on

core/src/trezor/lvglui/i18n/locales/es.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1017,6 +1017,6 @@
10171017
"Actualiza a la última versión para usar \"Adjuntar al PIN\".",
10181018
"Confirmación de solicitud",
10191019
"¿Abortar la creación de la frase de recuperación?",
1020-
"Escribe las siguientes {num} palabras en orden para la Parte {num1} de {num2}.",
1020+
"Esta es la parte {num1} de {num2}.",
10211021
]
10221022
# fmt: on

core/src/trezor/lvglui/i18n/locales/fr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1017,6 +1017,6 @@
10171017
"Mettez à jour vers la dernière version pour utiliser « Épingler ».",
10181018
"Demande de confirmation",
10191019
"Abandonner la création de la phrase de récupération ?",
1020-
"Écrivez les {num} mots suivants dans l'ordre pour la Part {num1} sur {num2}.",
1020+
"Ceci est la part {num1} sur {num2}.",
10211021
]
10221022
# fmt: on

core/src/trezor/lvglui/i18n/locales/it.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1017,6 +1017,6 @@
10171017
"Aggiorna all'ultima versione per utilizzare \"Allega al PIN\".",
10181018
"Conferma richiesta",
10191019
"Annullare la creazione della frase di recupero?",
1020-
"Scrivi le seguenti {num} parole in ordine per la Parte {num1} di {num2}.",
1020+
"Questa è la quota {num1} di {num2}.",
10211021
]
10221022
# fmt: on

core/src/trezor/lvglui/i18n/locales/ja.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -894,7 +894,7 @@
894894
"進む",
895895
"PINに添付",
896896
"PINを使用して隠されたウォレットを解除する",
897-
"隠しウォレットのPINを設定",
897+
"隠しPINを設定",
898898
"フィンガープリントアップグレード",
899899
"今すぐセットアップ",
900900
"電源ボタンに指を置き、その後持ち上げてください。光の点に従って指を動かし、このステップを繰り返します。",
@@ -944,7 +944,7 @@
944944
"OP_RETURN",
945945
"この取引にはゼロ以外のOP_RETURN値が含まれています。一度承認されると、あなたの資金は永久にロックされます。",
946946
"標準ウォレットのPIN",
947-
"隠しウォレットのPINを入力してください",
947+
"隠しウォレットのPINを入力",
948948
"標準ウォレット",
949949
"隠しウォレット",
950950
"タップして送信",
@@ -1017,6 +1017,6 @@
10171017
"「PINに添付」機能を利用するには、最新バージョンにアップデートしてください。",
10181018
"リクエストの確認",
10191019
"リカバリーフレーズの作成を中止しますか?",
1020-
"次の{num}語を順番に書き留めてください。「{num2}のうち{num1}」の共有用です。",
1020+
"これは {num2} のうちの {num1} つ目の共有です。",
10211021
]
10221022
# fmt: on

core/src/trezor/lvglui/i18n/locales/ko.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1017,6 +1017,6 @@
10171017
"“PIN에 첨부” 기능을 사용하려면 최신 버전으로 업데이트하세요.",
10181018
"요청 확인",
10191019
"복구 구문 생성을 중단하시겠습니까?",
1020-
"다음 {num}개의 단어를 순서대로 적으세요 (공유 {num2} 중 {num1}).",
1020+
"이것은 {num2} 중 {num1}번째 공유입니다.",
10211021
]
10221022
# fmt: on

0 commit comments

Comments
 (0)