Skip to content

Commit 8a5b950

Browse files
authored
fix(legacy): fix OK-25083 & OK-25088 (#508)
1 parent a516200 commit 8a5b950

File tree

4 files changed

+24
-5
lines changed

4 files changed

+24
-5
lines changed

legacy/firmware/fsm_msg_nostr.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,8 @@ void fsm_msgNostrGetPublicKey(const NostrGetPublicKey *msg) {
4747

4848
if (msg->has_show_display && msg->show_display) {
4949
char desc[32] = {0};
50-
strcat(desc, "Nostr");
51-
strcat(desc, " ");
52-
strcat(desc, _("Address:"));
50+
strcat(desc, "Nostr ");
51+
strcat(desc, _("Public Key"));
5352
if (!fsm_layoutAddress(resp->npub, NULL, desc, false, 0, msg->address_n,
5453
msg->address_n_count, true, NULL, 0, 0, NULL)) {
5554
return;

legacy/firmware/language.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,8 @@ const char *languages[][2] = {
617617
{"Propose", "投票"},
618618
{"Proposer", "提案申请人"},
619619
// lisk.c
620-
{"Public Key:", "公钥"},
620+
{"Public Key", "公钥"},
621+
{"Public Key:", "公钥:"},
621622
// layout2.c
622623
{"QR Code", "二维码"},
623624
//

legacy/firmware/layout2.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1439,7 +1439,11 @@ uint8_t layoutAddress(const char *address, const char *address_type,
14391439
if (address_type) {
14401440
oledDrawStringAdapter(0, 13, address_type, FONT_STANDARD);
14411441
} else {
1442-
oledDrawStringAdapter(0, 13, _("Address:"), FONT_STANDARD);
1442+
if (address && (memcmp(address, "npub", 4) == 0)) {
1443+
oledDrawStringAdapter(0, 13, _("Public Key:"), FONT_STANDARD);
1444+
} else {
1445+
oledDrawStringAdapter(0, 13, _("Address:"), FONT_STANDARD);
1446+
}
14431447
}
14441448
oledDrawStringAdapter(0, 13 + 1 * 10, str[0], FONT_STANDARD);
14451449
oledDrawStringAdapter(0, 13 + 2 * 10, str[1], FONT_STANDARD);

legacy/firmware/polkadot/substrate/substrate_dispatch_V18.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,11 @@ const char* _getMethod_Name_V18(uint8_t moduleIdx, uint8_t callIdx) {
230230

231231
switch (callPrivIdx) {
232232
case 1280: /* module 5 call 0 */
233+
case 1287:
233234
case 1024:
235+
case 1031:
234236
case 7936:
237+
case 7943:
235238
return STR_ME_TRANSFER;
236239
case 1282: /* module 5 call 2 */
237240
case 1026:
@@ -266,8 +269,11 @@ uint8_t _getMethod_NumItems_V18(uint8_t moduleIdx, uint8_t callIdx) {
266269

267270
switch (callPrivIdx) {
268271
case 1280: /* module 5 call 0 */
272+
case 1287:
269273
case 1024:
274+
case 1031:
270275
case 7936:
276+
case 7943:
271277
return 2;
272278
case 1282: /* module 5 call 2 */
273279
case 1026:
@@ -294,8 +300,11 @@ const char* _getMethod_ItemName_V18(uint8_t moduleIdx, uint8_t callIdx,
294300

295301
switch (callPrivIdx) {
296302
case 1280: /* module 5 call 0 */
303+
case 1287:
297304
case 1024:
305+
case 1031:
298306
case 7936:
307+
case 7943:
299308
switch (itemIdx) {
300309
case 0:
301310
return STR_IT_amount;
@@ -354,8 +363,11 @@ parser_error_t _getMethod_ItemValue_V18(pd_Method_V18_t* m, uint8_t moduleIdx,
354363

355364
switch (callPrivIdx) {
356365
case 1280: /* module 5 call 0 */
366+
case 1287: /* module 5 call 0 */
357367
case 1024: /* module 5 call 0 */
368+
case 1031: /* module 5 call 0 */
358369
case 7936: /* module 5 call 0 */
370+
case 7943:
359371
switch (itemIdx) {
360372
case 0: /* balances_transfer_V18 - amount */;
361373
return _toStringCompactBalance(
@@ -439,8 +451,11 @@ bool _getMethod_IsNestingSupported_V18(uint8_t moduleIdx, uint8_t callIdx) {
439451

440452
switch (callPrivIdx) { // Balances & BlindSign
441453
case 1280: /* module 5 call 0 */
454+
case 1287: /* module 5 call 0 */
442455
case 1024: /* module 5 call 0 */
456+
case 1031: /* module 5 call 0 */
443457
case 7936: /* module 5 call 0 */
458+
case 7943:
444459
case 1282:
445460
case 1026:
446461
case 7938:

0 commit comments

Comments
 (0)