Skip to content

Commit

Permalink
feat(core/ethereum): new ETH contract flow
Browse files Browse the repository at this point in the history
  • Loading branch information
ibz committed Oct 18, 2024
1 parent dd3c294 commit 811b8e2
Show file tree
Hide file tree
Showing 33 changed files with 362 additions and 121 deletions.
11 changes: 10 additions & 1 deletion core/embed/rust/librust_qstr.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ static void _librust_qstrs(void) {
MP_QSTR_buttons__try_again;
MP_QSTR_buttons__turn_off;
MP_QSTR_buttons__turn_on;
MP_QSTR_buttons__view_all_data;
MP_QSTR_can_go_back;
MP_QSTR_cancel_arrow;
MP_QSTR_cancel_cross;
Expand Down Expand Up @@ -216,8 +217,10 @@ static void _librust_qstrs(void) {
MP_QSTR_debug__loading_seed;
MP_QSTR_debug__loading_seed_not_recommended;
MP_QSTR_decode;
MP_QSTR_default_cancel;
MP_QSTR_deinit;
MP_QSTR_description;
MP_QSTR_description_font_green;
MP_QSTR_details_title;
MP_QSTR_device_name__change_template;
MP_QSTR_device_name__title;
Expand Down Expand Up @@ -727,6 +730,7 @@ static void _librust_qstrs(void) {
MP_QSTR_value;
MP_QSTR_verb;
MP_QSTR_verb_cancel;
MP_QSTR_verb_info;
MP_QSTR_verify;
MP_QSTR_version;
MP_QSTR_warning;
Expand Down Expand Up @@ -765,6 +769,7 @@ static void _librust_qstrs(void) {
MP_QSTR_words__confirm_fee;
MP_QSTR_words__contains;
MP_QSTR_words__continue_anyway;
MP_QSTR_words__continue_anyway_question;
MP_QSTR_words__continue_with;
MP_QSTR_words__error;
MP_QSTR_words__fee;
Expand Down Expand Up @@ -798,6 +803,7 @@ static void _librust_qstrs(void) {
MP_QSTR_words__title_threshold;
MP_QSTR_words__try_again;
MP_QSTR_words__unknown;
MP_QSTR_words__view_all_data_from_menu;
MP_QSTR_words__warning;
MP_QSTR_words__writable;
MP_QSTR_words__yes;
Expand Down Expand Up @@ -976,6 +982,7 @@ static void _librust_qstrs(void) {
MP_QSTR_ethereum__data_size_template;
MP_QSTR_ethereum__gas_limit;
MP_QSTR_ethereum__gas_price;
MP_QSTR_ethereum__interaction_contract;
MP_QSTR_ethereum__max_gas_price;
MP_QSTR_ethereum__name_and_version;
MP_QSTR_ethereum__new_contract;
Expand All @@ -994,13 +1001,15 @@ static void _librust_qstrs(void) {
MP_QSTR_ethereum__staking_stake_intro;
MP_QSTR_ethereum__staking_unstake;
MP_QSTR_ethereum__staking_unstake_intro;
MP_QSTR_ethereum__title_confirm_data;
MP_QSTR_ethereum__title_confirm_domain;
MP_QSTR_ethereum__title_confirm_message;
MP_QSTR_ethereum__title_confirm_struct;
MP_QSTR_ethereum__title_confirm_typed_data;
MP_QSTR_ethereum__title_input_data;
MP_QSTR_ethereum__title_signing_address;
MP_QSTR_ethereum__token_contract;
MP_QSTR_ethereum__units_template;
MP_QSTR_ethereum__unknown_contract_address;
MP_QSTR_ethereum__unknown_token;
MP_QSTR_ethereum__valid_signature;
MP_QSTR_fido__already_registered;
Expand Down
37 changes: 32 additions & 5 deletions core/embed/rust/src/translations/generated/translated_string.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions core/embed/rust/src/ui/model_mercury/component/frame.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,11 @@ where
self.with_button(theme::ICON_MENU, FlowMsg::Info, true)
}

pub fn with_danger_menu_button(self) -> Self {
self.with_button(theme::ICON_MENU, FlowMsg::Info, true)
.button_styled(theme::button_warning_high())
}

pub fn with_warning_low_icon(self) -> Self {
self.with_button(theme::ICON_WARNING, FlowMsg::Info, false)
.button_styled(theme::button_warning_low())
Expand Down
Loading

0 comments on commit 811b8e2

Please sign in to comment.