Skip to content

Commit deaf294

Browse files
authored
fix(legacy): fix OK-22415 & OK-22406 & OK-22397 (#468)
1 parent 0cc9aa3 commit deaf294

File tree

4 files changed

+16
-14
lines changed

4 files changed

+16
-14
lines changed

legacy/firmware/ethereum.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ static uint32_t rlp_calculate_access_list_length(
226226
static void send_request_chunk(void) {
227227
int progress = 1000 - (data_total > 1000000 ? data_left / (data_total / 800)
228228
: data_left * 800 / data_total);
229-
layoutProgress(_("Signing"), progress);
229+
layoutProgressAdapter(_("Signing"), progress);
230230
msg_tx_request.has_data_length = true;
231231
msg_tx_request.data_length = data_left <= 1024 ? data_left : 1024;
232232
msg_write(MessageType_MessageType_EthereumTxRequest, &msg_tx_request);
@@ -240,7 +240,7 @@ int ethereum_is_canonic(uint8_t v, uint8_t signature[64]) {
240240
static void send_signature(void) {
241241
uint8_t hash[32] = {0}, sig[64] = {0};
242242
uint8_t v = 0;
243-
layoutProgress(_("Signing"), 1000);
243+
layoutProgressAdapter(_("Signing"), 1000);
244244

245245
if (eip1559) {
246246
hash_rlp_list_length(rlp_calculate_access_list_length(
@@ -663,7 +663,7 @@ void ethereum_signing_init(const EthereumSignTx *msg, const HDNode *node,
663663
/* Stage 1: Calculate total RLP length */
664664
uint32_t rlp_length = 0;
665665

666-
layoutProgress(_("Signing"), 0);
666+
layoutProgressAdapter(_("Signing"), 0);
667667

668668
rlp_length += rlp_calculate_length(msg->nonce.size, msg->nonce.bytes[0]);
669669
rlp_length +=
@@ -685,7 +685,7 @@ void ethereum_signing_init(const EthereumSignTx *msg, const HDNode *node,
685685
/* Stage 2: Store header fields */
686686
hash_rlp_list_length(rlp_length);
687687

688-
layoutProgress(_("Signing"), 100);
688+
layoutProgressAdapter(_("Signing"), 100);
689689

690690
if (tx_type) {
691691
hash_rlp_number(tx_type);
@@ -777,7 +777,7 @@ void ethereum_signing_init_eip1559(const EthereumSignTxEIP1559 *msg,
777777
/* Stage 1: Calculate total RLP length */
778778
uint32_t rlp_length = 0;
779779

780-
layoutProgress(_("Signing"), 0);
780+
layoutProgressAdapter(_("Signing"), 0);
781781

782782
rlp_length += rlp_calculate_number_length(chain_id);
783783
rlp_length += rlp_calculate_length(msg->nonce.size, msg->nonce.bytes[0]);
@@ -802,7 +802,7 @@ void ethereum_signing_init_eip1559(const EthereumSignTxEIP1559 *msg,
802802
hash_rlp_number(EIP1559_TX_TYPE);
803803
hash_rlp_list_length(rlp_length);
804804

805-
layoutProgress(_("Signing"), 100);
805+
layoutProgressAdapter(_("Signing"), 100);
806806

807807
hash_rlp_number(chain_id);
808808
hash_rlp_field(msg->nonce.bytes, msg->nonce.size);

legacy/firmware/ethereum_onekey.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -786,7 +786,7 @@ void ethereum_signing_init_eip1559_onekey(
786786
/* Stage 1: Calculate total RLP length */
787787
uint32_t rlp_length = 0;
788788

789-
layoutProgress(_("Signing"), 0);
789+
layoutProgressAdapter(_("Signing"), 0);
790790

791791
rlp_length += rlp_calculate_number_length(chain_id);
792792
rlp_length += rlp_calculate_length(msg->nonce.size, msg->nonce.bytes[0]);
@@ -811,7 +811,7 @@ void ethereum_signing_init_eip1559_onekey(
811811
hash_rlp_number(EIP1559_TX_TYPE);
812812
hash_rlp_list_length(rlp_length);
813813

814-
layoutProgress(_("Signing"), 100);
814+
layoutProgressAdapter(_("Signing"), 100);
815815

816816
hash_rlp_number(chain_id);
817817
hash_rlp_field(msg->nonce.bytes, msg->nonce.size);

legacy/firmware/language.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,8 @@ const char *languages[][2] = {
300300
{"Destination Coins", "来源金额"},
301301
// layout2.c
302302
{"Device ID:", "设备ID:"},
303+
// menu_list.c
304+
{"Device Info", "设备信息"},
303305
// reset.c reset.c
304306
{"Device failed initialized", ""}, // msg
305307
//

legacy/firmware/layout2.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3470,12 +3470,12 @@ void layoutConfirmHash(const BITMAP *icon, const char *description,
34703470

34713471
layoutSwipe();
34723472
oledClear();
3473-
oledDrawBitmap(0, 0, icon);
3474-
oledDrawString(20, 0 * 9, description, FONT_STANDARD);
3475-
oledDrawString(20, 1 * 9, str[0], FONT_FIXED);
3476-
oledDrawString(20, 2 * 9, str[1], FONT_FIXED);
3477-
oledDrawString(20, 3 * 9, str[2], FONT_FIXED);
3478-
oledDrawString(20, 4 * 9, str[3], FONT_FIXED);
3473+
oledDrawBitmap(0, 0 + 2, icon);
3474+
oledDrawString(20, 0 * 9 + 2, description, FONT_STANDARD);
3475+
oledDrawString(20, 1 * 9 + 2, str[0], FONT_FIXED);
3476+
oledDrawString(20, 2 * 9 + 2, str[1], FONT_FIXED);
3477+
oledDrawString(20, 3 * 9 + 2, str[2], FONT_FIXED);
3478+
oledDrawString(20, 4 * 9 + 2, str[3], FONT_FIXED);
34793479
oledHLine(OLED_HEIGHT - 13);
34803480

34813481
layoutButtonNoAdapter(_("Cancel"), &bmp_btn_cancel);

0 commit comments

Comments
 (0)