Skip to content

Commit

Permalink
Merge pull request #124 from trilitech/palmer@functori@add-screen-at-…
Browse files Browse the repository at this point in the history
…start-of-signing-flow

Add a review operation screen at start of signing flow
  • Loading branch information
spalmer25 authored Nov 16, 2023
2 parents 1e7c7df + ba1b298 commit 259e8ec
Show file tree
Hide file tree
Showing 923 changed files with 76 additions and 16 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/swap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ on:

jobs:
job_functional_tests:
uses: spalmer25/app-exchange/.github/workflows/reusable_swap_functional_tests.yml@c277b70c9e5db1f0a1a64192c6d7ef5758e4a3e4
uses: spalmer25/app-exchange/.github/workflows/reusable_swap_functional_tests.yml@palmer/functori/add-new-tezos-app-swap-tests
with:
repo_for_exchange: 'spalmer25/app-exchange'
branch_for_exchange: 'palmer/functori/add-new-tezos-app-swap-tests'
branch_for_exchange: '052709120a11694ca31764843f1a82b884776812'
branch_for_tezos: ${{ github.ref }}
run_for_devices: '["nanos", "nanosp"]'
test_filter: '"tezos_new"'
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ repos:
- id: clang-format
name: clang-format
description: Run `clang-format` on C/C++/CUDA files.
entry: clang-format-15 -i
entry: clang-format -i
language: system
files: ^app/src
types: [file, c]
20 changes: 20 additions & 0 deletions app/src/apdu_sign.c
Original file line number Diff line number Diff line change
Expand Up @@ -359,12 +359,31 @@ handle_first_apdu(command_t *cmd)
TZ_POSTAMBLE;
}

#ifdef HAVE_BAGL
static void
tz_ui_stream_push_initial_screen(void)
{
FUNC_ENTER(("void"));
#ifdef TARGET_NANOS
tz_ui_stream_push(TZ_UI_STREAM_CB_NOCB, "Review operation", "",
TZ_UI_LAYOUT_BP, TZ_UI_ICON_EYE);
#else
tz_ui_stream_push(TZ_UI_STREAM_CB_NOCB, "Review", "operation",
TZ_UI_LAYOUT_BP, TZ_UI_ICON_EYE);
#endif
FUNC_LEAVE();
}
#endif

static void
handle_first_apdu_clear(__attribute__((unused)) command_t *cmd)
{
tz_parser_state *st = &global.keys.apdu.sign.u.clear.parser_state;

tz_ui_stream_init(stream_cb);
#ifdef HAVE_BAGL
tz_ui_stream_push_initial_screen();
#endif

tz_operation_parser_init(st, TZ_UNKNOWN_SIZE, false);
tz_parser_refill(st, NULL, 0);
Expand All @@ -376,6 +395,7 @@ handle_first_apdu_blind(__attribute__((unused)) command_t *cmd)
{
#ifdef HAVE_BAGL
tz_ui_stream_init(bs_stream_cb);
tz_ui_stream_push_initial_screen();
#elif HAVE_NBGL
nbgl_useCaseSpinner("Loading operation");
#endif
Expand Down
5 changes: 5 additions & 0 deletions tests/generate/gen_integration.ml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ let expect_section_content ppf ~title content =
Format.fprintf ppf "expect_section_content %a %a@." shell_escape title
shell_escape content

let expected_review_operation ppf () =
Format.fprintf ppf "expected_review_operation@."

module Button = struct
type t = Both | Right | Left

Expand Down Expand Up @@ -499,6 +502,8 @@ let gen_expect_test_sign ppf ~watermark bin screens =
start_speculos ppf signer.mnemonic;
expected_home ppf ();
sign ppf ~signer ~watermark bin;
expected_review_operation ppf ();
Button.(press ppf Right);
go_through_screens ppf screens;
accept ppf ();
expect_async_apdus_sent ppf ();
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/integration/nano/snapshots/nanos/test_sign_ballot/00003.png
Binary file modified tests/integration/nano/snapshots/nanos/test_sign_ballot/00004.png
Binary file modified tests/integration/nano/snapshots/nanos/test_sign_ballot/00005.png
Binary file modified tests/integration/nano/snapshots/nanos/test_sign_ballot/00007.png
Binary file modified tests/integration/nano/snapshots/nanos/test_sign_reveal/00001.png
Binary file modified tests/integration/nano/snapshots/nanos/test_sign_reveal/00003.png
Binary file modified tests/integration/nano/snapshots/nanos/test_sign_reveal/00005.png
Binary file modified tests/integration/nano/snapshots/nanos/test_sign_reveal/00006.png
Loading

0 comments on commit 259e8ec

Please sign in to comment.