From 82299217dee39037ff2624a1eef34f4af089a860 Mon Sep 17 00:00:00 2001 From: Alexandre Paillier Date: Thu, 6 Oct 2022 14:02:03 +0200 Subject: [PATCH 1/2] Fix EIP-191 changelog Wasn't in line with the latest modifications --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b89407a..a0896f6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). -## [1.9.20](https://github.com/ledgerhq/app-ethereum/compare/1.9.19...1.9.20) - 2022-09-19 +## [1.9.20](https://github.com/ledgerhq/app-ethereum/compare/1.9.19...1.9.20) - 2022-XX-XX ### Added @@ -17,7 +17,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ### Changed -- EIP-191 improvements, now lets the user see the entire message by chunks 255 characters (LNX & LNS+), LNS still limited to the first chunk of 99 characters +- EIP-191 improvements, now lets the user see the entire message one chunk at a time (255 characters for LNX & LNS+, 99 for LNS) ## [1.9.19](https://github.com/ledgerhq/app-ethereum/compare/1.9.18...1.9.19) - 2022-06-15 From f43d9c4dc74dab4ea8ced7ab1c1d5b0e3a86330c Mon Sep 17 00:00:00 2001 From: Alexandre Paillier Date: Thu, 6 Oct 2022 14:55:13 +0200 Subject: [PATCH 2/2] Fix EIP-191 UI split --- src/common_ui.h | 9 ++++++++- src_bagl/ui_flow_signMessage.c | 4 +++- src_bagl/ui_flow_signMessage.h | 12 ------------ src_features/signMessage/cmd_signMessage.c | 2 +- 4 files changed, 12 insertions(+), 15 deletions(-) delete mode 100644 src_bagl/ui_flow_signMessage.h diff --git a/src/common_ui.h b/src/common_ui.h index 9b65600..3bca6b9 100644 --- a/src/common_ui.h +++ b/src/common_ui.h @@ -18,7 +18,14 @@ void ui_stark_limit_order(void); void ui_stark_unsafe_sign(void); void ui_stark_transfer(bool selfTransfer, bool conditional); +// EIP-191 +void ui_191_start(void); +void ui_191_switch_to_message(void); +void ui_191_switch_to_message_end(void); +void ui_191_switch_to_sign(void); +void ui_191_switch_to_question(void); + #include "ui_callbacks.h" #include -#endif // _COMMON_UI_H_ \ No newline at end of file +#endif // _COMMON_UI_H_ diff --git a/src_bagl/ui_flow_signMessage.c b/src_bagl/ui_flow_signMessage.c index 545c221..9b97d57 100644 --- a/src_bagl/ui_flow_signMessage.c +++ b/src_bagl/ui_flow_signMessage.c @@ -1,8 +1,10 @@ #include "shared_context.h" #include "ui_callbacks.h" -#include "ui_flow_signMessage.h" +#include "common_ui.h" #include "sign_message.h" +typedef enum { UI_191_POS_REVIEW, UI_191_POS_QUESTION, UI_191_POS_END } e_ui_191_position; + static uint8_t ui_pos; static void dummy_pre_cb(void) { diff --git a/src_bagl/ui_flow_signMessage.h b/src_bagl/ui_flow_signMessage.h deleted file mode 100644 index 69e047b..0000000 --- a/src_bagl/ui_flow_signMessage.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef UI_FLOW_SIGNMESSAGE_H_ -#define UI_FLOW_SIGNMESSAGE_H_ - -typedef enum { UI_191_POS_REVIEW, UI_191_POS_QUESTION, UI_191_POS_END } e_ui_191_position; - -void ui_191_start(void); -void ui_191_switch_to_message(void); -void ui_191_switch_to_message_end(void); -void ui_191_switch_to_sign(void); -void ui_191_switch_to_question(void); - -#endif // UI_FLOW_SIGNMESSAGE_H_ diff --git a/src_features/signMessage/cmd_signMessage.c b/src_features/signMessage/cmd_signMessage.c index 1c764b1..9cfd4d6 100644 --- a/src_features/signMessage/cmd_signMessage.c +++ b/src_features/signMessage/cmd_signMessage.c @@ -3,7 +3,7 @@ #include #include "apdu_constants.h" #include "sign_message.h" -#include "ui_flow_signMessage.h" +#include "common_ui.h" static uint8_t processed_size; static struct {