Skip to content

Commit

Permalink
ui_stub for simulator: show transaction address and fee confirm screens
Browse files Browse the repository at this point in the history
Simulator was logging the normal confirm screens, but not showing the
Ethereum trransaction confirmation which were showing addresses and also
fees. Now, simulator logs them just like the normal confirmation screen
is shown.

This is useful since it provides completeness on simulator outputs and
also makes it easier to test/debug further changes.

Signed-off-by: asi345 <inanata15@gmail.com>
  • Loading branch information
asi345 committed Aug 7, 2024
1 parent 055bda6 commit cf20bf5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/rust/bitbox02/src/ui/ui_stub_c_unit_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@ pub fn confirm_transaction_address_create<'a, 'b>(
_address: &'a str,
mut callback: AcceptRejectCb<'b>,
) -> Component<'b> {
crate::print_stdout(&format!(
"CONFIRM TRANSACTION ADDRESS SCREEN START\nAMOUNT: {}\nADDRESS: {}\nCONFIRM TRANSACTION ADDRESS SCREEN END\n",
_amount, _address
));
callback(true);
Component {
is_pushed: false,
Expand All @@ -143,6 +147,10 @@ pub fn confirm_transaction_fee_create<'a, 'b>(
_longtouch: bool,
mut callback: AcceptRejectCb<'b>,
) -> Component<'b> {
crate::print_stdout(&format!(
"CONFIRM TRANSACTION FEE SCREEN START\nAMOUNT: {}\nFEE: {}\nCONFIRM TRANSACTION FEE SCREEN END\n",
_amount, _fee
));
callback(true);
Component {
is_pushed: false,
Expand Down

0 comments on commit cf20bf5

Please sign in to comment.