diff --git a/test/snapshots/nanos/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/Settings.png b/test/snapshots/nanos/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/Settings.png new file mode 100644 index 00000000..34cf547a Binary files /dev/null and b/test/snapshots/nanos/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/Settings.png differ diff --git a/test/snapshots/nanos/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/back.png b/test/snapshots/nanos/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/back.png new file mode 100644 index 00000000..b5c1b1cb Binary files /dev/null and b/test/snapshots/nanos/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/back.png differ diff --git a/test/snapshots/nanos/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/home_screen.png b/test/snapshots/nanos/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/home_screen.png new file mode 100644 index 00000000..ce795f34 Binary files /dev/null and b/test/snapshots/nanos/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/home_screen.png differ diff --git a/test/snapshots/nanos/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/hwm_disabled.png b/test/snapshots/nanos/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/hwm_disabled.png new file mode 100644 index 00000000..0417b8fc Binary files /dev/null and b/test/snapshots/nanos/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/hwm_disabled.png differ diff --git a/test/snapshots/nanos/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/hwm_enabled.png b/test/snapshots/nanos/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/hwm_enabled.png new file mode 100644 index 00000000..0597aed5 Binary files /dev/null and b/test/snapshots/nanos/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/hwm_enabled.png differ diff --git a/test/snapshots/nanos/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/quit.png b/test/snapshots/nanos/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/quit.png new file mode 100644 index 00000000..e2279803 Binary files /dev/null and b/test/snapshots/nanos/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/quit.png differ diff --git a/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_1_0/app_context/chain_id.png b/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_1_0/app_context/chain_id.png new file mode 100644 index 00000000..a13210c5 Binary files /dev/null and b/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_1_0/app_context/chain_id.png differ diff --git a/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_1_0/app_context/exit.png b/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_1_0/app_context/exit.png new file mode 100644 index 00000000..e2279803 Binary files /dev/null and b/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_1_0/app_context/exit.png differ diff --git a/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_1_0/app_context/high_watermark.png b/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_1_0/app_context/high_watermark.png new file mode 100644 index 00000000..0cccb5b4 Binary files /dev/null and b/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_1_0/app_context/high_watermark.png differ diff --git a/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_1_0/app_context/home_screen.png b/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_1_0/app_context/home_screen.png new file mode 100644 index 00000000..ce795f34 Binary files /dev/null and b/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_1_0/app_context/home_screen.png differ diff --git a/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_1_0/app_context/public_key_hash_1.png b/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_1_0/app_context/public_key_hash_1.png new file mode 100644 index 00000000..50537f75 Binary files /dev/null and b/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_1_0/app_context/public_key_hash_1.png differ diff --git a/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_1_0/app_context/public_key_hash_2.png b/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_1_0/app_context/public_key_hash_2.png new file mode 100644 index 00000000..a30fbd95 Binary files /dev/null and b/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_1_0/app_context/public_key_hash_2.png differ diff --git a/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_1_0/app_context/settings.png b/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_1_0/app_context/settings.png new file mode 100644 index 00000000..34cf547a Binary files /dev/null and b/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_1_0/app_context/settings.png differ diff --git a/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_1_0/app_context/version.png b/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_1_0/app_context/version.png new file mode 100644 index 00000000..b86e6137 Binary files /dev/null and b/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_1_0/app_context/version.png differ diff --git a/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_2_0/app_context/chain_id.png b/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_2_0/app_context/chain_id.png new file mode 100644 index 00000000..a13210c5 Binary files /dev/null and b/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_2_0/app_context/chain_id.png differ diff --git a/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_2_0/app_context/exit.png b/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_2_0/app_context/exit.png new file mode 100644 index 00000000..e2279803 Binary files /dev/null and b/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_2_0/app_context/exit.png differ diff --git a/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_2_0/app_context/high_watermark.png b/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_2_0/app_context/high_watermark.png new file mode 100644 index 00000000..b117e76a Binary files /dev/null and b/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_2_0/app_context/high_watermark.png differ diff --git a/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_2_0/app_context/home_screen.png b/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_2_0/app_context/home_screen.png new file mode 100644 index 00000000..ce795f34 Binary files /dev/null and b/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_2_0/app_context/home_screen.png differ diff --git a/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_2_0/app_context/public_key_hash_1.png b/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_2_0/app_context/public_key_hash_1.png new file mode 100644 index 00000000..50537f75 Binary files /dev/null and b/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_2_0/app_context/public_key_hash_1.png differ diff --git a/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_2_0/app_context/public_key_hash_2.png b/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_2_0/app_context/public_key_hash_2.png new file mode 100644 index 00000000..a30fbd95 Binary files /dev/null and b/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_2_0/app_context/public_key_hash_2.png differ diff --git a/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_2_0/app_context/settings.png b/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_2_0/app_context/settings.png new file mode 100644 index 00000000..34cf547a Binary files /dev/null and b/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_2_0/app_context/settings.png differ diff --git a/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_2_0/app_context/version.png b/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_2_0/app_context/version.png new file mode 100644 index 00000000..b86e6137 Binary files /dev/null and b/test/snapshots/nanos/test_sign_when_hwm_disabled/sign_2_0/app_context/version.png differ diff --git a/test/snapshots/nanosp/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/Settings.png b/test/snapshots/nanosp/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/Settings.png new file mode 100644 index 00000000..d885fe67 Binary files /dev/null and b/test/snapshots/nanosp/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/Settings.png differ diff --git a/test/snapshots/nanosp/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/back.png b/test/snapshots/nanosp/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/back.png new file mode 100644 index 00000000..e06738f4 Binary files /dev/null and b/test/snapshots/nanosp/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/back.png differ diff --git a/test/snapshots/nanosp/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/home_screen.png b/test/snapshots/nanosp/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/home_screen.png new file mode 100644 index 00000000..65788722 Binary files /dev/null and b/test/snapshots/nanosp/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/home_screen.png differ diff --git a/test/snapshots/nanosp/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/hwm_disabled.png b/test/snapshots/nanosp/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/hwm_disabled.png new file mode 100644 index 00000000..6be9b9c2 Binary files /dev/null and b/test/snapshots/nanosp/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/hwm_disabled.png differ diff --git a/test/snapshots/nanosp/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/hwm_enabled.png b/test/snapshots/nanosp/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/hwm_enabled.png new file mode 100644 index 00000000..179104fa Binary files /dev/null and b/test/snapshots/nanosp/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/hwm_enabled.png differ diff --git a/test/snapshots/nanosp/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/quit.png b/test/snapshots/nanosp/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/quit.png new file mode 100644 index 00000000..bcb20c68 Binary files /dev/null and b/test/snapshots/nanosp/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/quit.png differ diff --git a/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_1_0/app_context/chain_id.png b/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_1_0/app_context/chain_id.png new file mode 100644 index 00000000..1dd81a6c Binary files /dev/null and b/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_1_0/app_context/chain_id.png differ diff --git a/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_1_0/app_context/exit.png b/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_1_0/app_context/exit.png new file mode 100644 index 00000000..bcb20c68 Binary files /dev/null and b/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_1_0/app_context/exit.png differ diff --git a/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_1_0/app_context/high_watermark.png b/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_1_0/app_context/high_watermark.png new file mode 100644 index 00000000..a970fc01 Binary files /dev/null and b/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_1_0/app_context/high_watermark.png differ diff --git a/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_1_0/app_context/home_screen.png b/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_1_0/app_context/home_screen.png new file mode 100644 index 00000000..65788722 Binary files /dev/null and b/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_1_0/app_context/home_screen.png differ diff --git a/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_1_0/app_context/public_key_hash.png b/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_1_0/app_context/public_key_hash.png new file mode 100644 index 00000000..a2b2f3cf Binary files /dev/null and b/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_1_0/app_context/public_key_hash.png differ diff --git a/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_1_0/app_context/settings.png b/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_1_0/app_context/settings.png new file mode 100644 index 00000000..d885fe67 Binary files /dev/null and b/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_1_0/app_context/settings.png differ diff --git a/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_1_0/app_context/version.png b/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_1_0/app_context/version.png new file mode 100644 index 00000000..8d0662af Binary files /dev/null and b/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_1_0/app_context/version.png differ diff --git a/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_2_0/app_context/chain_id.png b/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_2_0/app_context/chain_id.png new file mode 100644 index 00000000..1dd81a6c Binary files /dev/null and b/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_2_0/app_context/chain_id.png differ diff --git a/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_2_0/app_context/exit.png b/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_2_0/app_context/exit.png new file mode 100644 index 00000000..bcb20c68 Binary files /dev/null and b/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_2_0/app_context/exit.png differ diff --git a/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_2_0/app_context/high_watermark.png b/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_2_0/app_context/high_watermark.png new file mode 100644 index 00000000..3a5efb2f Binary files /dev/null and b/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_2_0/app_context/high_watermark.png differ diff --git a/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_2_0/app_context/home_screen.png b/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_2_0/app_context/home_screen.png new file mode 100644 index 00000000..65788722 Binary files /dev/null and b/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_2_0/app_context/home_screen.png differ diff --git a/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_2_0/app_context/public_key_hash.png b/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_2_0/app_context/public_key_hash.png new file mode 100644 index 00000000..a2b2f3cf Binary files /dev/null and b/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_2_0/app_context/public_key_hash.png differ diff --git a/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_2_0/app_context/settings.png b/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_2_0/app_context/settings.png new file mode 100644 index 00000000..d885fe67 Binary files /dev/null and b/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_2_0/app_context/settings.png differ diff --git a/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_2_0/app_context/version.png b/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_2_0/app_context/version.png new file mode 100644 index 00000000..8d0662af Binary files /dev/null and b/test/snapshots/nanosp/test_sign_when_hwm_disabled/sign_2_0/app_context/version.png differ diff --git a/test/snapshots/nanox/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/Settings.png b/test/snapshots/nanox/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/Settings.png new file mode 100644 index 00000000..d885fe67 Binary files /dev/null and b/test/snapshots/nanox/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/Settings.png differ diff --git a/test/snapshots/nanox/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/back.png b/test/snapshots/nanox/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/back.png new file mode 100644 index 00000000..e06738f4 Binary files /dev/null and b/test/snapshots/nanox/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/back.png differ diff --git a/test/snapshots/nanox/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/home_screen.png b/test/snapshots/nanox/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/home_screen.png new file mode 100644 index 00000000..65788722 Binary files /dev/null and b/test/snapshots/nanox/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/home_screen.png differ diff --git a/test/snapshots/nanox/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/hwm_disabled.png b/test/snapshots/nanox/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/hwm_disabled.png new file mode 100644 index 00000000..6be9b9c2 Binary files /dev/null and b/test/snapshots/nanox/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/hwm_disabled.png differ diff --git a/test/snapshots/nanox/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/hwm_enabled.png b/test/snapshots/nanox/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/hwm_enabled.png new file mode 100644 index 00000000..179104fa Binary files /dev/null and b/test/snapshots/nanox/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/hwm_enabled.png differ diff --git a/test/snapshots/nanox/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/quit.png b/test/snapshots/nanox/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/quit.png new file mode 100644 index 00000000..bcb20c68 Binary files /dev/null and b/test/snapshots/nanox/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/quit.png differ diff --git a/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_1_0/app_context/chain_id.png b/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_1_0/app_context/chain_id.png new file mode 100644 index 00000000..1dd81a6c Binary files /dev/null and b/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_1_0/app_context/chain_id.png differ diff --git a/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_1_0/app_context/exit.png b/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_1_0/app_context/exit.png new file mode 100644 index 00000000..bcb20c68 Binary files /dev/null and b/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_1_0/app_context/exit.png differ diff --git a/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_1_0/app_context/high_watermark.png b/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_1_0/app_context/high_watermark.png new file mode 100644 index 00000000..a970fc01 Binary files /dev/null and b/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_1_0/app_context/high_watermark.png differ diff --git a/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_1_0/app_context/home_screen.png b/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_1_0/app_context/home_screen.png new file mode 100644 index 00000000..65788722 Binary files /dev/null and b/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_1_0/app_context/home_screen.png differ diff --git a/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_1_0/app_context/public_key_hash.png b/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_1_0/app_context/public_key_hash.png new file mode 100644 index 00000000..a2b2f3cf Binary files /dev/null and b/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_1_0/app_context/public_key_hash.png differ diff --git a/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_1_0/app_context/settings.png b/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_1_0/app_context/settings.png new file mode 100644 index 00000000..d885fe67 Binary files /dev/null and b/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_1_0/app_context/settings.png differ diff --git a/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_1_0/app_context/version.png b/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_1_0/app_context/version.png new file mode 100644 index 00000000..8d0662af Binary files /dev/null and b/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_1_0/app_context/version.png differ diff --git a/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_2_0/app_context/chain_id.png b/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_2_0/app_context/chain_id.png new file mode 100644 index 00000000..1dd81a6c Binary files /dev/null and b/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_2_0/app_context/chain_id.png differ diff --git a/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_2_0/app_context/exit.png b/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_2_0/app_context/exit.png new file mode 100644 index 00000000..bcb20c68 Binary files /dev/null and b/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_2_0/app_context/exit.png differ diff --git a/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_2_0/app_context/high_watermark.png b/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_2_0/app_context/high_watermark.png new file mode 100644 index 00000000..3a5efb2f Binary files /dev/null and b/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_2_0/app_context/high_watermark.png differ diff --git a/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_2_0/app_context/home_screen.png b/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_2_0/app_context/home_screen.png new file mode 100644 index 00000000..65788722 Binary files /dev/null and b/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_2_0/app_context/home_screen.png differ diff --git a/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_2_0/app_context/public_key_hash.png b/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_2_0/app_context/public_key_hash.png new file mode 100644 index 00000000..a2b2f3cf Binary files /dev/null and b/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_2_0/app_context/public_key_hash.png differ diff --git a/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_2_0/app_context/settings.png b/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_2_0/app_context/settings.png new file mode 100644 index 00000000..d885fe67 Binary files /dev/null and b/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_2_0/app_context/settings.png differ diff --git a/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_2_0/app_context/version.png b/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_2_0/app_context/version.png new file mode 100644 index 00000000..8d0662af Binary files /dev/null and b/test/snapshots/nanox/test_sign_when_hwm_disabled/sign_2_0/app_context/version.png differ diff --git a/test/snapshots/stax/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/app_context.png b/test/snapshots/stax/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/app_context.png new file mode 100644 index 00000000..65d0193e Binary files /dev/null and b/test/snapshots/stax/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/app_context.png differ diff --git a/test/snapshots/stax/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/home_screen.png b/test/snapshots/stax/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/home_screen.png new file mode 100644 index 00000000..932d9e23 Binary files /dev/null and b/test/snapshots/stax/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/home_screen.png differ diff --git a/test/snapshots/stax/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/hwm_status_off.png b/test/snapshots/stax/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/hwm_status_off.png new file mode 100644 index 00000000..ea8cb6b1 Binary files /dev/null and b/test/snapshots/stax/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/hwm_status_off.png differ diff --git a/test/snapshots/stax/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/hwm_status_on.png b/test/snapshots/stax/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/hwm_status_on.png new file mode 100644 index 00000000..9d3701f1 Binary files /dev/null and b/test/snapshots/stax/test_sign_when_hwm_disabled/ED25519_tz1dyX3B1CFYa2DfdFLyPtiJCfQRUgPVME6E/hwm_status_on.png differ diff --git a/test/snapshots/stax/test_sign_when_hwm_disabled/sign_1_0/app_context/app_context.png b/test/snapshots/stax/test_sign_when_hwm_disabled/sign_1_0/app_context/app_context.png new file mode 100644 index 00000000..e5941920 Binary files /dev/null and b/test/snapshots/stax/test_sign_when_hwm_disabled/sign_1_0/app_context/app_context.png differ diff --git a/test/snapshots/stax/test_sign_when_hwm_disabled/sign_1_0/app_context/description.png b/test/snapshots/stax/test_sign_when_hwm_disabled/sign_1_0/app_context/description.png new file mode 100644 index 00000000..8c35f5c0 Binary files /dev/null and b/test/snapshots/stax/test_sign_when_hwm_disabled/sign_1_0/app_context/description.png differ diff --git a/test/snapshots/stax/test_sign_when_hwm_disabled/sign_1_0/app_context/home_screen.png b/test/snapshots/stax/test_sign_when_hwm_disabled/sign_1_0/app_context/home_screen.png new file mode 100644 index 00000000..932d9e23 Binary files /dev/null and b/test/snapshots/stax/test_sign_when_hwm_disabled/sign_1_0/app_context/home_screen.png differ diff --git a/test/snapshots/stax/test_sign_when_hwm_disabled/sign_1_0/app_context/hwm_status.png b/test/snapshots/stax/test_sign_when_hwm_disabled/sign_1_0/app_context/hwm_status.png new file mode 100644 index 00000000..ea8cb6b1 Binary files /dev/null and b/test/snapshots/stax/test_sign_when_hwm_disabled/sign_1_0/app_context/hwm_status.png differ diff --git a/test/snapshots/stax/test_sign_when_hwm_disabled/sign_2_0/app_context/app_context.png b/test/snapshots/stax/test_sign_when_hwm_disabled/sign_2_0/app_context/app_context.png new file mode 100644 index 00000000..4885dfb2 Binary files /dev/null and b/test/snapshots/stax/test_sign_when_hwm_disabled/sign_2_0/app_context/app_context.png differ diff --git a/test/snapshots/stax/test_sign_when_hwm_disabled/sign_2_0/app_context/description.png b/test/snapshots/stax/test_sign_when_hwm_disabled/sign_2_0/app_context/description.png new file mode 100644 index 00000000..8c35f5c0 Binary files /dev/null and b/test/snapshots/stax/test_sign_when_hwm_disabled/sign_2_0/app_context/description.png differ diff --git a/test/snapshots/stax/test_sign_when_hwm_disabled/sign_2_0/app_context/home_screen.png b/test/snapshots/stax/test_sign_when_hwm_disabled/sign_2_0/app_context/home_screen.png new file mode 100644 index 00000000..932d9e23 Binary files /dev/null and b/test/snapshots/stax/test_sign_when_hwm_disabled/sign_2_0/app_context/home_screen.png differ diff --git a/test/snapshots/stax/test_sign_when_hwm_disabled/sign_2_0/app_context/hwm_status.png b/test/snapshots/stax/test_sign_when_hwm_disabled/sign_2_0/app_context/hwm_status.png new file mode 100644 index 00000000..ea8cb6b1 Binary files /dev/null and b/test/snapshots/stax/test_sign_when_hwm_disabled/sign_2_0/app_context/hwm_status.png differ diff --git a/test/test_instructions.py b/test/test_instructions.py index 501f641d..01e252f5 100644 --- a/test/test_instructions.py +++ b/test/test_instructions.py @@ -52,6 +52,62 @@ ZEBRA_ACCOUNTS, ) +class nano_navigation: + backend: BackendInterface + tezos_navigator: TezosNavigator + snap_path: Path + def __init__(self, snap: Path, bknd: BackendInterface, nav :TezosNavigator): + self.backend = bknd + self.tezos_navigator = nav + self.snap_path = snap + def screen(self, name): + self.tezos_navigator.assert_screen(name, snap_path=self.snap_path) + def right(self): + self.backend.right_click() + self.backend.wait_for_screen_change() + def left(self): + self.backend.left_click() + self.backend.wait_for_screen_change() + def both(self): + self.backend.both_click() + self.backend.wait_for_screen_change() + + + +def disable_hwm(snap_path: Path, backend: BackendInterface, firmware: Firmware, tezos_navigator: TezosNavigator) -> None: + app = nano_navigation(snap_path, backend, tezos_navigator) + + if firmware.is_nano: + app.screen("home_screen") + app.left() + app.screen("quit") + app.left() + app.screen("Settings") + app.both() + app.screen("hwm_enabled") + app.both() + app.screen("hwm_disabled") + app.right() + app.screen("back") + app.both() + app.screen("home_screen") + else: + backend.wait_for_home_screen() + tezos_navigator.home.settings() + backend.wait_for_screen_change() + app.screen("app_context") + tezos_navigator.settings.next() + backend.wait_for_screen_change() + app.screen("hwm_status_on") + tezos_navigator.layout_choice.choose(1) + backend.wait_for_screen_change() + app.screen("hwm_status_off") + tezos_navigator.settings.multi_page_exit() + backend.wait_for_screen_change() + app.screen("home_screen") + + + @pytest.mark.parametrize("account", [None, *ACCOUNTS]) def test_review_home(account: Optional[Account], backend: BackendInterface, @@ -74,84 +130,74 @@ def test_review_home(account: Optional[Account], test_hwm ) - def screen(name): - tezos_navigator.assert_screen(name, snap_path=snap_path) - def right(): - backend.right_click() - backend.wait_for_screen_change() - def left(): - backend.left_click() - backend.wait_for_screen_change() - def both(): - backend.both_click() - backend.wait_for_screen_change() + app = nano_navigation(snap_path, backend, tezos_navigator) if firmware.is_nano: - screen("home_screen") - right() - screen("version") - right() - screen("chain_id") - right() + app.screen("home_screen") + app.right() + app.screen("version") + app.right() + app.screen("chain_id") + app.right() if account is not None and firmware.device == "nanos": for i in range(1, account.nanos_screens + 1): - screen("public_key_hash_" + str(i)) - right() + app.screen("public_key_hash_" + str(i)) + app.right() else: - screen("public_key_hash") - right() - screen("high_watermark") - right() - screen("settings") - right() - screen("exit") - right() - screen("home_screen") - left() - screen("exit") - left() - screen("settings") - left() - screen("high_watermark") - left() + app.screen("public_key_hash") + app.right() + app.screen("high_watermark") + app.right() + app.screen("settings") + app.right() + app.screen("exit") + app.right() + app.screen("home_screen") + app.left() + app.screen("exit") + app.left() + app.screen("settings") + app.left() + app.screen("high_watermark") + app.left() if account is not None and firmware.device == "nanos": for i in reversed(range(1, account.nanos_screens + 1)): - screen("public_key_hash_" + str(i)) - left() + app.screen("public_key_hash_" + str(i)) + app.left() else: - screen("public_key_hash") - left() - screen("chain_id") - left() - screen("version") - right() - screen("chain_id") - left() - screen("version") - left() - screen("home_screen") - left() - screen("exit") - left() - screen("settings") - left() - screen("high_watermark") - right() + app.screen("public_key_hash") + app.left() + app.screen("chain_id") + app.left() + app.screen("version") + app.right() + app.screen("chain_id") + app.left() + app.screen("version") + app.left() + app.screen("home_screen") + app.left() + app.screen("exit") + app.left() + app.screen("settings") + app.left() + app.screen("high_watermark") + app.right() # Check settings menu - screen("settings") - both() - screen("hwm_status_enabled") - both() - screen("hwm_status_disabled") - right() - screen("back") - both() - screen("home_screen") - left() - screen("exit") - right() - screen("home_screen") - left() + app.screen("settings") + app.both() + app.screen("hwm_status_enabled") + app.both() + app.screen("hwm_status_disabled") + app.right() + app.screen("back") + app.both() + app.screen("home_screen") + app.left() + app.screen("exit") + app.right() + app.screen("home_screen") + app.left() else: backend.wait_for_home_screen() tezos_navigator.home.settings() @@ -1226,6 +1272,69 @@ def test_sign_multiple_operation( ) account.check_signature(signature, bytes(message)) +def test_sign_when_hwm_disabled( + client: TezosClient, + backend: BackendInterface, + firmware: Firmware, + tezos_navigator: TezosNavigator) -> None: + """Check that signing when no chain has been setup change main HWM.""" + + account = DEFAULT_ACCOUNT + snap_path = Path(f"{account}") + + disable_hwm(snap_path, backend, firmware, tezos_navigator) + + tezos_navigator.setup_app_context( + account, + DEFAULT_CHAIN_ID, # Chain = 0 + main_hwm=Hwm(0, 0), + test_hwm=Hwm(0, 0) + ) + + attestation = build_attestation( + 1, 0, + DEFAULT_CHAIN_ID # Chain = 0 + ) + + client.sign_message(account, attestation) + + tezos_navigator.check_app_context( + account, + chain_id=DEFAULT_CHAIN_ID, + main_hwm=Hwm(1, 0), + test_hwm=Hwm(0, 0), + snap_path=Path("sign_1_0")) + + attestation = build_attestation( + 2, 0, + "NetXH12AexHqTQa" # Chain = 1 + ) + + client.sign_message(account, attestation) + + tezos_navigator.check_app_context( + account, + chain_id=DEFAULT_CHAIN_ID, + main_hwm=Hwm(2, 0), + test_hwm=Hwm(0, 0), + snap_path=Path("sign_2_0")) + + attestation = build_attestation( + 2, 0, + "NetXH12Af5mrXhq" # Chain = 2 + ) + + with StatusCode.WRONG_VALUES.expected(): + client.sign_message(account, attestation) + + tezos_navigator.check_app_context( + account, + chain_id=DEFAULT_CHAIN_ID, + main_hwm=Hwm(2, 0), + test_hwm=Hwm(0, 0), + snap_path=Path("sign_2_0") + ) + def test_sign_when_no_chain_setup( client: TezosClient,