diff --git a/legacy/firmware/fsm_msg_nostr.h b/legacy/firmware/fsm_msg_nostr.h index 2c317edbd1..ca7b48077d 100644 --- a/legacy/firmware/fsm_msg_nostr.h +++ b/legacy/firmware/fsm_msg_nostr.h @@ -50,9 +50,8 @@ void fsm_msgNostrGetPublicKey(const NostrGetPublicKey *msg) { strcat(desc, "Nostr"); strcat(desc, " "); strcat(desc, _("Address:")); - if (!fsm_layoutAddress(resp->publickey, NULL, desc, false, 0, - msg->address_n, msg->address_n_count, true, NULL, 0, - 0, NULL)) { + if (!fsm_layoutAddress(resp->npub, NULL, desc, false, 0, msg->address_n, + msg->address_n_count, true, NULL, 0, 0, NULL)) { return; } } diff --git a/legacy/firmware/language.c b/legacy/firmware/language.c index 52e3f4e671..8081ad7e11 100644 --- a/legacy/firmware/language.c +++ b/legacy/firmware/language.c @@ -529,7 +529,7 @@ const char *languages[][2] = { {"Next screen will show the\npassphrase!", "接下来, 将在屏幕中展示输\n入的 Passphrase"}, {"Next, Follow the onscreen\ninstructions to set up your\nOneKey Classic.", - "接下来,请按照屏幕上\n的指令开始设置您的 \nOneKey Classic"}, + "接下来, 请按照屏幕上的指令\n开始设置 OneKey Classic"}, {"Next, check the written ", "接下来, 请再次检查刚刚抄写\n的 "}, {"Next, follow the guide and\ncheck words one by one.", "接下来, 请跟随引导, 逐一核\n对单词."}, @@ -721,6 +721,7 @@ const char *languages[][2] = { {"Sign at you own risk", "签名可能存在安全风险,请谨慎操作"}, // layout2.c {"Sign message?", "签名消息"}, + {"Signed by:", "签名者:"}, {"Signer:", "签名者:"}, // ethereum.c ethereum.c ethereum.c ethereum.c lisk.c {"Signing", "签名中"}, @@ -974,6 +975,7 @@ const char *languages[][2] = { {"lock your Trezor?", "锁定设备"}, // ethereum.c ethereum.c {"message", "消息"}, + {"message?", "消息吗?"}, // layout2.c {"mine", "我的"}, {"minute", "分钟"}, diff --git a/legacy/firmware/layout2.c b/legacy/firmware/layout2.c index 05b95f215e..ed3e3331e2 100644 --- a/legacy/firmware/layout2.c +++ b/legacy/firmware/layout2.c @@ -5126,7 +5126,7 @@ bool layoutSignMessage(const char *chain_name, bool verify, const char *signer, uint8_t max_index = 3; uint8_t key = KEY_NULL; char title[64] = {0}; - char title_tx[64] = {0}; + char title_tx[128] = {0}; char lines[21] = {0}; uint32_t rowlen = 21; const char **str; @@ -5149,8 +5149,8 @@ bool layoutSignMessage(const char *chain_name, bool verify, const char *signer, strcat(title, chain_name); strcat(title, " "); strcat(title, _("Message")); - snprintf(title_tx, 64, "%s%s %s?", _("Do you want to sign this\n"), - chain_name, _("message")); + snprintf(title_tx, 128, "%s%s %s", _("Do you want to sign this\n"), + chain_name, _("message?")); } ButtonRequest resp = {0}; diff --git a/legacy/firmware/polkadot.c b/legacy/firmware/polkadot.c index a501b5d10c..6fad96e03e 100644 --- a/legacy/firmware/polkadot.c +++ b/legacy/firmware/polkadot.c @@ -40,7 +40,7 @@ void polkadot_get_address_from_public_key(const uint8_t *public_key, crypto_SS58EncodePubkey((uint8_t *)address, 64, addressType, public_key); } -static bool layoutPolkadotSign(void) { +static bool layoutPolkadotSign(char *signer) { bool result = false; int index = 1; int y = 0; @@ -60,7 +60,7 @@ static bool layoutPolkadotSign(void) { msg_write(MessageType_MessageType_ButtonRequest, &resp); polkadot_tx_getNumItems(&numItems); - max_index = numItems; + max_index = numItems + 1; refresh_menu: oledClear(); y = 13; @@ -75,6 +75,12 @@ static bool layoutPolkadotSign(void) { oledDrawStringAdapter(0, y + 10, token_val, FONT_STANDARD); layoutButtonNoAdapter(NULL, &bmp_bottom_left_close); layoutButtonYesAdapter(NULL, &bmp_bottom_right_arrow); + } else if ((max_index - 1) == index) { + layoutHeader(tx_msg[0]); + oledDrawStringAdapter(0, y, _("Signed by:"), FONT_STANDARD); + oledDrawStringAdapter(0, y + 10, signer, FONT_STANDARD); + layoutButtonNoAdapter(NULL, &bmp_bottom_left_arrow); + layoutButtonYesAdapter(NULL, &bmp_bottom_right_arrow); } else if (max_index == index) { layoutHeader(_("Sign Transaction")); oledDrawStringAdapter(0, y, tx_msg[1], FONT_STANDARD); @@ -166,7 +172,7 @@ bool polkadot_sign_tx(const PolkadotSignTx *msg, const HDNode *node, layoutHome(); return false; } else { - if (!layoutPolkadotSign()) { + if (!layoutPolkadotSign(signer)) { fsm_sendFailure(FailureType_Failure_ActionCancelled, "Signing cancelled"); layoutHome(); return false; diff --git a/legacy/firmware/polkadot/substrate/substrate_dispatch_V18.c b/legacy/firmware/polkadot/substrate/substrate_dispatch_V18.c index 0288e8aad0..fb43eb18ba 100644 --- a/legacy/firmware/polkadot/substrate/substrate_dispatch_V18.c +++ b/legacy/firmware/polkadot/substrate/substrate_dispatch_V18.c @@ -78,7 +78,7 @@ parser_error_t _readMethod_V18(parser_context_t* c, uint8_t moduleIdx, uint16_t callPrivIdx = ((uint16_t)moduleIdx << 8u) + callIdx; switch (callPrivIdx) { - case 1280: /* module 5 call 0 */ + case 1287: /* module 5 call 0 */ CHECK_ERROR(_readMethod_balances_transfer_V18( c, &method->nested.balances_transfer_V18)) break; @@ -106,7 +106,7 @@ parser_error_t _readMethod_V18_kusama(parser_context_t* c, uint8_t moduleIdx, pd_Method_V18_t* method) { uint16_t callPrivIdx = ((uint16_t)moduleIdx << 8u) + callIdx; switch (callPrivIdx) { - case 1024: /* module 4 call 0 */ + case 1031: /* module 4 call 0 */ CHECK_ERROR(_readMethod_balances_transfer_V18( c, &method->nested.balances_transfer_V18)) break; @@ -161,7 +161,7 @@ parser_error_t _readMethod_astar(parser_context_t* c, uint8_t moduleIdx, uint8_t callIdx, pd_Method_V18_t* method) { uint16_t callPrivIdx = ((uint16_t)moduleIdx << 8u) + callIdx; switch (callPrivIdx) { - case 7936: /* module 31 call 0 */ + case 7943: /* module 31 call 0 */ CHECK_ERROR(_readMethod_balances_transfer_V18( c, &method->nested.balances_transfer_V18)) break;