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 <[email protected]>
  • Loading branch information
asi345 committed Jul 25, 2024
1 parent 0c8398f commit b0fdb4a
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 b0fdb4a

Please sign in to comment.