diff --git a/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00000.png b/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00000.png new file mode 100644 index 000000000..053fc534b Binary files /dev/null and b/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00000.png differ diff --git a/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00001.png b/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00001.png new file mode 100644 index 000000000..29067d8ec Binary files /dev/null and b/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00001.png differ diff --git a/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00002.png b/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00002.png new file mode 100644 index 000000000..8b7980241 Binary files /dev/null and b/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00002.png differ diff --git a/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00003.png b/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00003.png new file mode 100644 index 000000000..97eab5d99 Binary files /dev/null and b/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00003.png differ diff --git a/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00004.png b/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00004.png new file mode 100644 index 000000000..7a12bcc4d Binary files /dev/null and b/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00004.png differ diff --git a/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00005.png b/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00005.png new file mode 100644 index 000000000..78b15b726 Binary files /dev/null and b/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00005.png differ diff --git a/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00006.png b/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00006.png new file mode 100644 index 000000000..ada60041e Binary files /dev/null and b/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00006.png differ diff --git a/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00007.png b/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00007.png new file mode 100644 index 000000000..f4017bca3 Binary files /dev/null and b/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00007.png differ diff --git a/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00008.png b/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00008.png new file mode 100644 index 000000000..92b4bce4e Binary files /dev/null and b/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00008.png differ diff --git a/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00009.png b/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00009.png new file mode 100644 index 000000000..404b02330 Binary files /dev/null and b/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00009.png differ diff --git a/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00010.png b/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00010.png new file mode 100644 index 000000000..bbc474df6 Binary files /dev/null and b/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00010.png differ diff --git a/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00011.png b/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00011.png new file mode 100644 index 000000000..7e6a184f1 Binary files /dev/null and b/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00011.png differ diff --git a/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00012.png b/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00012.png new file mode 100644 index 000000000..8b7980241 Binary files /dev/null and b/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00012.png differ diff --git a/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00013.png b/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00013.png new file mode 100644 index 000000000..97eab5d99 Binary files /dev/null and b/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00013.png differ diff --git a/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00014.png b/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00014.png new file mode 100644 index 000000000..9126afa34 Binary files /dev/null and b/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00014.png differ diff --git a/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00015.png b/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00015.png new file mode 100644 index 000000000..d2735a4da Binary files /dev/null and b/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00015.png differ diff --git a/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00016.png b/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00016.png new file mode 100644 index 000000000..76ba12229 Binary files /dev/null and b/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00016.png differ diff --git a/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00017.png b/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00017.png new file mode 100644 index 000000000..a7d686439 Binary files /dev/null and b/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00017.png differ diff --git a/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00018.png b/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00018.png new file mode 100644 index 000000000..26748650b Binary files /dev/null and b/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00018.png differ diff --git a/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00019.png b/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00019.png new file mode 100644 index 000000000..837dba8b1 Binary files /dev/null and b/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00019.png differ diff --git a/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00020.png b/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00020.png new file mode 100644 index 000000000..f31a189f5 Binary files /dev/null and b/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00020.png differ diff --git a/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00021.png b/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00021.png new file mode 100644 index 000000000..2283c749c Binary files /dev/null and b/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00021.png differ diff --git a/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00022.png b/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00022.png new file mode 100644 index 000000000..bc5764770 Binary files /dev/null and b/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00022.png differ diff --git a/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00023.png b/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00023.png new file mode 100644 index 000000000..218dc0511 Binary files /dev/null and b/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00023.png differ diff --git a/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00024.png b/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00024.png new file mode 100644 index 000000000..7e0e23820 Binary files /dev/null and b/tests/integration/nano/snapshots/nanos/test_sign_complex_operation/00024.png differ diff --git a/tests/integration/nano/snapshots/nanosp/test_sign_complex_operation/00000.png b/tests/integration/nano/snapshots/nanosp/test_sign_complex_operation/00000.png new file mode 100644 index 000000000..9fa51df29 Binary files /dev/null and b/tests/integration/nano/snapshots/nanosp/test_sign_complex_operation/00000.png differ diff --git a/tests/integration/nano/snapshots/nanosp/test_sign_complex_operation/00001.png b/tests/integration/nano/snapshots/nanosp/test_sign_complex_operation/00001.png new file mode 100644 index 000000000..780c4b54e Binary files /dev/null and b/tests/integration/nano/snapshots/nanosp/test_sign_complex_operation/00001.png differ diff --git a/tests/integration/nano/snapshots/nanosp/test_sign_complex_operation/00002.png b/tests/integration/nano/snapshots/nanosp/test_sign_complex_operation/00002.png new file mode 100644 index 000000000..fc2f4b729 Binary files /dev/null and b/tests/integration/nano/snapshots/nanosp/test_sign_complex_operation/00002.png differ diff --git a/tests/integration/nano/snapshots/nanosp/test_sign_complex_operation/00003.png b/tests/integration/nano/snapshots/nanosp/test_sign_complex_operation/00003.png new file mode 100644 index 000000000..3fa2978d7 Binary files /dev/null and b/tests/integration/nano/snapshots/nanosp/test_sign_complex_operation/00003.png differ diff --git a/tests/integration/nano/snapshots/nanosp/test_sign_complex_operation/00004.png b/tests/integration/nano/snapshots/nanosp/test_sign_complex_operation/00004.png new file mode 100644 index 000000000..908600200 Binary files /dev/null and b/tests/integration/nano/snapshots/nanosp/test_sign_complex_operation/00004.png differ diff --git a/tests/integration/nano/snapshots/nanosp/test_sign_complex_operation/00005.png b/tests/integration/nano/snapshots/nanosp/test_sign_complex_operation/00005.png new file mode 100644 index 000000000..7f0fb6546 Binary files /dev/null and b/tests/integration/nano/snapshots/nanosp/test_sign_complex_operation/00005.png differ diff --git a/tests/integration/nano/snapshots/nanosp/test_sign_complex_operation/00006.png b/tests/integration/nano/snapshots/nanosp/test_sign_complex_operation/00006.png new file mode 100644 index 000000000..742ede852 Binary files /dev/null and b/tests/integration/nano/snapshots/nanosp/test_sign_complex_operation/00006.png differ diff --git a/tests/integration/nano/snapshots/nanosp/test_sign_complex_operation/00007.png b/tests/integration/nano/snapshots/nanosp/test_sign_complex_operation/00007.png new file mode 100644 index 000000000..59fce75cd Binary files /dev/null and b/tests/integration/nano/snapshots/nanosp/test_sign_complex_operation/00007.png differ diff --git a/tests/integration/nano/snapshots/nanosp/test_sign_complex_operation/00008.png b/tests/integration/nano/snapshots/nanosp/test_sign_complex_operation/00008.png new file mode 100644 index 000000000..a2c842416 Binary files /dev/null and b/tests/integration/nano/snapshots/nanosp/test_sign_complex_operation/00008.png differ diff --git a/tests/integration/nano/snapshots/nanosp/test_sign_complex_operation/00009.png b/tests/integration/nano/snapshots/nanosp/test_sign_complex_operation/00009.png new file mode 100644 index 000000000..c1c7ce97d Binary files /dev/null and b/tests/integration/nano/snapshots/nanosp/test_sign_complex_operation/00009.png differ diff --git a/tests/integration/nano/snapshots/nanosp/test_sign_complex_operation/00010.png b/tests/integration/nano/snapshots/nanosp/test_sign_complex_operation/00010.png new file mode 100644 index 000000000..c1811249f Binary files /dev/null and b/tests/integration/nano/snapshots/nanosp/test_sign_complex_operation/00010.png differ diff --git a/tests/integration/nano/snapshots/nanosp/test_sign_complex_operation/00011.png b/tests/integration/nano/snapshots/nanosp/test_sign_complex_operation/00011.png new file mode 100644 index 000000000..fc2f4b729 Binary files /dev/null and b/tests/integration/nano/snapshots/nanosp/test_sign_complex_operation/00011.png differ diff --git a/tests/integration/nano/snapshots/nanosp/test_sign_complex_operation/00012.png b/tests/integration/nano/snapshots/nanosp/test_sign_complex_operation/00012.png new file mode 100644 index 000000000..af9beddbf Binary files /dev/null and b/tests/integration/nano/snapshots/nanosp/test_sign_complex_operation/00012.png differ diff --git a/tests/integration/nano/snapshots/nanosp/test_sign_complex_operation/00013.png b/tests/integration/nano/snapshots/nanosp/test_sign_complex_operation/00013.png new file mode 100644 index 000000000..4ce7d2937 Binary files /dev/null and b/tests/integration/nano/snapshots/nanosp/test_sign_complex_operation/00013.png differ diff --git a/tests/integration/nano/snapshots/nanosp/test_sign_complex_operation/00014.png b/tests/integration/nano/snapshots/nanosp/test_sign_complex_operation/00014.png new file mode 100644 index 000000000..a3da0374d Binary files /dev/null and b/tests/integration/nano/snapshots/nanosp/test_sign_complex_operation/00014.png differ diff --git a/tests/integration/nano/snapshots/nanosp/test_sign_complex_operation/00015.png b/tests/integration/nano/snapshots/nanosp/test_sign_complex_operation/00015.png new file mode 100644 index 000000000..878150dd5 Binary files /dev/null and b/tests/integration/nano/snapshots/nanosp/test_sign_complex_operation/00015.png differ diff --git a/tests/integration/nano/snapshots/nanosp/test_sign_complex_operation/00016.png b/tests/integration/nano/snapshots/nanosp/test_sign_complex_operation/00016.png new file mode 100644 index 000000000..976d816ff Binary files /dev/null and b/tests/integration/nano/snapshots/nanosp/test_sign_complex_operation/00016.png differ diff --git a/tests/integration/nano/snapshots/nanosp/test_sign_complex_operation/00017.png b/tests/integration/nano/snapshots/nanosp/test_sign_complex_operation/00017.png new file mode 100644 index 000000000..b66fc657e Binary files /dev/null and b/tests/integration/nano/snapshots/nanosp/test_sign_complex_operation/00017.png differ diff --git a/tests/integration/nano/snapshots/nanosp/test_sign_complex_operation/00018.png b/tests/integration/nano/snapshots/nanosp/test_sign_complex_operation/00018.png new file mode 100644 index 000000000..f8860cd32 Binary files /dev/null and b/tests/integration/nano/snapshots/nanosp/test_sign_complex_operation/00018.png differ diff --git a/tests/integration/nano/snapshots/nanosp/test_sign_complex_operation/00019.png b/tests/integration/nano/snapshots/nanosp/test_sign_complex_operation/00019.png new file mode 100644 index 000000000..ff518831a Binary files /dev/null and b/tests/integration/nano/snapshots/nanosp/test_sign_complex_operation/00019.png differ diff --git a/tests/integration/nano/snapshots/nanosp/test_sign_complex_operation/00020.png b/tests/integration/nano/snapshots/nanosp/test_sign_complex_operation/00020.png new file mode 100644 index 000000000..471324463 Binary files /dev/null and b/tests/integration/nano/snapshots/nanosp/test_sign_complex_operation/00020.png differ diff --git a/tests/integration/nano/snapshots/nanox/test_sign_complex_operation/00000.png b/tests/integration/nano/snapshots/nanox/test_sign_complex_operation/00000.png new file mode 100644 index 000000000..9fa51df29 Binary files /dev/null and b/tests/integration/nano/snapshots/nanox/test_sign_complex_operation/00000.png differ diff --git a/tests/integration/nano/snapshots/nanox/test_sign_complex_operation/00001.png b/tests/integration/nano/snapshots/nanox/test_sign_complex_operation/00001.png new file mode 100644 index 000000000..780c4b54e Binary files /dev/null and b/tests/integration/nano/snapshots/nanox/test_sign_complex_operation/00001.png differ diff --git a/tests/integration/nano/snapshots/nanox/test_sign_complex_operation/00002.png b/tests/integration/nano/snapshots/nanox/test_sign_complex_operation/00002.png new file mode 100644 index 000000000..fc2f4b729 Binary files /dev/null and b/tests/integration/nano/snapshots/nanox/test_sign_complex_operation/00002.png differ diff --git a/tests/integration/nano/snapshots/nanox/test_sign_complex_operation/00003.png b/tests/integration/nano/snapshots/nanox/test_sign_complex_operation/00003.png new file mode 100644 index 000000000..3fa2978d7 Binary files /dev/null and b/tests/integration/nano/snapshots/nanox/test_sign_complex_operation/00003.png differ diff --git a/tests/integration/nano/snapshots/nanox/test_sign_complex_operation/00004.png b/tests/integration/nano/snapshots/nanox/test_sign_complex_operation/00004.png new file mode 100644 index 000000000..908600200 Binary files /dev/null and b/tests/integration/nano/snapshots/nanox/test_sign_complex_operation/00004.png differ diff --git a/tests/integration/nano/snapshots/nanox/test_sign_complex_operation/00005.png b/tests/integration/nano/snapshots/nanox/test_sign_complex_operation/00005.png new file mode 100644 index 000000000..7f0fb6546 Binary files /dev/null and b/tests/integration/nano/snapshots/nanox/test_sign_complex_operation/00005.png differ diff --git a/tests/integration/nano/snapshots/nanox/test_sign_complex_operation/00006.png b/tests/integration/nano/snapshots/nanox/test_sign_complex_operation/00006.png new file mode 100644 index 000000000..742ede852 Binary files /dev/null and b/tests/integration/nano/snapshots/nanox/test_sign_complex_operation/00006.png differ diff --git a/tests/integration/nano/snapshots/nanox/test_sign_complex_operation/00007.png b/tests/integration/nano/snapshots/nanox/test_sign_complex_operation/00007.png new file mode 100644 index 000000000..59fce75cd Binary files /dev/null and b/tests/integration/nano/snapshots/nanox/test_sign_complex_operation/00007.png differ diff --git a/tests/integration/nano/snapshots/nanox/test_sign_complex_operation/00008.png b/tests/integration/nano/snapshots/nanox/test_sign_complex_operation/00008.png new file mode 100644 index 000000000..a2c842416 Binary files /dev/null and b/tests/integration/nano/snapshots/nanox/test_sign_complex_operation/00008.png differ diff --git a/tests/integration/nano/snapshots/nanox/test_sign_complex_operation/00009.png b/tests/integration/nano/snapshots/nanox/test_sign_complex_operation/00009.png new file mode 100644 index 000000000..c1c7ce97d Binary files /dev/null and b/tests/integration/nano/snapshots/nanox/test_sign_complex_operation/00009.png differ diff --git a/tests/integration/nano/snapshots/nanox/test_sign_complex_operation/00010.png b/tests/integration/nano/snapshots/nanox/test_sign_complex_operation/00010.png new file mode 100644 index 000000000..c1811249f Binary files /dev/null and b/tests/integration/nano/snapshots/nanox/test_sign_complex_operation/00010.png differ diff --git a/tests/integration/nano/snapshots/nanox/test_sign_complex_operation/00011.png b/tests/integration/nano/snapshots/nanox/test_sign_complex_operation/00011.png new file mode 100644 index 000000000..fc2f4b729 Binary files /dev/null and b/tests/integration/nano/snapshots/nanox/test_sign_complex_operation/00011.png differ diff --git a/tests/integration/nano/snapshots/nanox/test_sign_complex_operation/00012.png b/tests/integration/nano/snapshots/nanox/test_sign_complex_operation/00012.png new file mode 100644 index 000000000..af9beddbf Binary files /dev/null and b/tests/integration/nano/snapshots/nanox/test_sign_complex_operation/00012.png differ diff --git a/tests/integration/nano/snapshots/nanox/test_sign_complex_operation/00013.png b/tests/integration/nano/snapshots/nanox/test_sign_complex_operation/00013.png new file mode 100644 index 000000000..4ce7d2937 Binary files /dev/null and b/tests/integration/nano/snapshots/nanox/test_sign_complex_operation/00013.png differ diff --git a/tests/integration/nano/snapshots/nanox/test_sign_complex_operation/00014.png b/tests/integration/nano/snapshots/nanox/test_sign_complex_operation/00014.png new file mode 100644 index 000000000..a3da0374d Binary files /dev/null and b/tests/integration/nano/snapshots/nanox/test_sign_complex_operation/00014.png differ diff --git a/tests/integration/nano/snapshots/nanox/test_sign_complex_operation/00015.png b/tests/integration/nano/snapshots/nanox/test_sign_complex_operation/00015.png new file mode 100644 index 000000000..878150dd5 Binary files /dev/null and b/tests/integration/nano/snapshots/nanox/test_sign_complex_operation/00015.png differ diff --git a/tests/integration/nano/snapshots/nanox/test_sign_complex_operation/00016.png b/tests/integration/nano/snapshots/nanox/test_sign_complex_operation/00016.png new file mode 100644 index 000000000..976d816ff Binary files /dev/null and b/tests/integration/nano/snapshots/nanox/test_sign_complex_operation/00016.png differ diff --git a/tests/integration/nano/snapshots/nanox/test_sign_complex_operation/00017.png b/tests/integration/nano/snapshots/nanox/test_sign_complex_operation/00017.png new file mode 100644 index 000000000..b66fc657e Binary files /dev/null and b/tests/integration/nano/snapshots/nanox/test_sign_complex_operation/00017.png differ diff --git a/tests/integration/nano/snapshots/nanox/test_sign_complex_operation/00018.png b/tests/integration/nano/snapshots/nanox/test_sign_complex_operation/00018.png new file mode 100644 index 000000000..f8860cd32 Binary files /dev/null and b/tests/integration/nano/snapshots/nanox/test_sign_complex_operation/00018.png differ diff --git a/tests/integration/nano/snapshots/nanox/test_sign_complex_operation/00019.png b/tests/integration/nano/snapshots/nanox/test_sign_complex_operation/00019.png new file mode 100644 index 000000000..ff518831a Binary files /dev/null and b/tests/integration/nano/snapshots/nanox/test_sign_complex_operation/00019.png differ diff --git a/tests/integration/nano/snapshots/nanox/test_sign_complex_operation/00020.png b/tests/integration/nano/snapshots/nanox/test_sign_complex_operation/00020.png new file mode 100644 index 000000000..471324463 Binary files /dev/null and b/tests/integration/nano/snapshots/nanox/test_sign_complex_operation/00020.png differ diff --git a/tests/integration/nano/test_sign_complex_operation.py b/tests/integration/nano/test_sign_complex_operation.py new file mode 100644 index 000000000..029397d80 --- /dev/null +++ b/tests/integration/nano/test_sign_complex_operation.py @@ -0,0 +1,68 @@ +#!/usr/bin/env python3 +# Copyright 2024 Functori + +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from pathlib import Path + +from utils.app import Screen, Screen_text, DEFAULT_ACCOUNT +from utils.backend import StatusCode +from utils.message import Message + +# Operation (0): Transaction +# Fee: 0.05 XTZ +# Storage limit: 45 +# Amount: 0.24 XTZ +# Destination: KT18amZmM5W7qDWVt2pH6uj7sCEd3kbzLrHT +# Entrypoint: do +# Parameter: CAR + +## Operation (0): Origination +# Source: tz1ixvCiPJYyMjsp2nKBVaq54f6AdbV8hCKa +# Fee: 0.5 XTZ +# Storage limit: 4 +# Balance: 1 XTZ +# Delegate: None +# Code: UNPACK mutez +# Storage: or key chest +## Operation (1): Transfer ticket +# Source: tz1ixvCiPJYyMjsp2nKBVaq54f6AdbV8hCKa +# Fee: 0.01 XTZ +# Storage limit: 5 +# Contents: None +# Type: option nat +# Ticketer: tz1TmFPVZsGQ8MnrBJtnECJgkFUwLa6EWYDm +# Amount: 7 +# Destination: tz3eydffbLkjdVb8zx42BvxpGV87zaRnqL3r +# Entrypoint: default + +def test_sign_complex_operation(app): + test_name = Path(__file__).stem + + app.assert_screen(Screen.Home) + app.setup_expert_mode() + + message = Message.from_bytes("0300000000000000000000000000000000000000000000000000000000000000006d00ffdd6102321bc251e4a5190ad5b12b251069d9b4a0c21e040304c0843d0000000004050d036a000000060764035c038d9e00ffdd6102321bc251e4a5190ad5b12b251069d9b4904e05040500000002030600000004056303620000591e842444265757d6a65e3670ca18b5e662f9c0070002cc8e146741cf31fc00123b8c26baf95c57421a3c0000000764656661756c74") + + data = app.sign(DEFAULT_ACCOUNT, + message, + with_hash=True, + path=test_name) + + app.checker.check_signature( + account=DEFAULT_ACCOUNT, + message=message, + with_hash=True, + data=data) + + app.quit() diff --git a/tests/integration/touch/snapshots/flex/test_sign_complex_operation/enable_expert_mode.png b/tests/integration/touch/snapshots/flex/test_sign_complex_operation/enable_expert_mode.png new file mode 100644 index 000000000..bb1b83017 Binary files /dev/null and b/tests/integration/touch/snapshots/flex/test_sign_complex_operation/enable_expert_mode.png differ diff --git a/tests/integration/touch/snapshots/flex/test_sign_complex_operation/enabled_expert_mode.png b/tests/integration/touch/snapshots/flex/test_sign_complex_operation/enabled_expert_mode.png new file mode 100644 index 000000000..9f409bbc8 Binary files /dev/null and b/tests/integration/touch/snapshots/flex/test_sign_complex_operation/enabled_expert_mode.png differ diff --git a/tests/integration/touch/snapshots/flex/test_sign_complex_operation/expert_mode_splash.png b/tests/integration/touch/snapshots/flex/test_sign_complex_operation/expert_mode_splash.png new file mode 100644 index 000000000..92e453d5c Binary files /dev/null and b/tests/integration/touch/snapshots/flex/test_sign_complex_operation/expert_mode_splash.png differ diff --git a/tests/integration/touch/snapshots/flex/test_sign_complex_operation/operation_sign.png b/tests/integration/touch/snapshots/flex/test_sign_complex_operation/operation_sign.png new file mode 100644 index 000000000..5e787d8ed Binary files /dev/null and b/tests/integration/touch/snapshots/flex/test_sign_complex_operation/operation_sign.png differ diff --git a/tests/integration/touch/snapshots/flex/test_sign_complex_operation/review_01.png b/tests/integration/touch/snapshots/flex/test_sign_complex_operation/review_01.png new file mode 100644 index 000000000..f647695e4 Binary files /dev/null and b/tests/integration/touch/snapshots/flex/test_sign_complex_operation/review_01.png differ diff --git a/tests/integration/touch/snapshots/flex/test_sign_complex_operation/review_02.png b/tests/integration/touch/snapshots/flex/test_sign_complex_operation/review_02.png new file mode 100644 index 000000000..3287886c4 Binary files /dev/null and b/tests/integration/touch/snapshots/flex/test_sign_complex_operation/review_02.png differ diff --git a/tests/integration/touch/snapshots/flex/test_sign_complex_operation/review_03.png b/tests/integration/touch/snapshots/flex/test_sign_complex_operation/review_03.png new file mode 100644 index 000000000..2323e3033 Binary files /dev/null and b/tests/integration/touch/snapshots/flex/test_sign_complex_operation/review_03.png differ diff --git a/tests/integration/touch/snapshots/flex/test_sign_complex_operation/review_04.png b/tests/integration/touch/snapshots/flex/test_sign_complex_operation/review_04.png new file mode 100644 index 000000000..254c9c9fd Binary files /dev/null and b/tests/integration/touch/snapshots/flex/test_sign_complex_operation/review_04.png differ diff --git a/tests/integration/touch/snapshots/flex/test_sign_complex_operation/review_05.png b/tests/integration/touch/snapshots/flex/test_sign_complex_operation/review_05.png new file mode 100644 index 000000000..4439e9247 Binary files /dev/null and b/tests/integration/touch/snapshots/flex/test_sign_complex_operation/review_05.png differ diff --git a/tests/integration/touch/snapshots/flex/test_sign_complex_operation/review_06.png b/tests/integration/touch/snapshots/flex/test_sign_complex_operation/review_06.png new file mode 100644 index 000000000..60de857c4 Binary files /dev/null and b/tests/integration/touch/snapshots/flex/test_sign_complex_operation/review_06.png differ diff --git a/tests/integration/touch/snapshots/flex/test_sign_complex_operation/review_request_sign_operation.png b/tests/integration/touch/snapshots/flex/test_sign_complex_operation/review_request_sign_operation.png new file mode 100644 index 000000000..00bec06df Binary files /dev/null and b/tests/integration/touch/snapshots/flex/test_sign_complex_operation/review_request_sign_operation.png differ diff --git a/tests/integration/touch/snapshots/flex/test_sign_complex_operation/signing_successful.png b/tests/integration/touch/snapshots/flex/test_sign_complex_operation/signing_successful.png new file mode 100644 index 000000000..be51a9d55 Binary files /dev/null and b/tests/integration/touch/snapshots/flex/test_sign_complex_operation/signing_successful.png differ diff --git a/tests/integration/touch/snapshots/stax/test_sign_complex_operation/enable_expert_mode.png b/tests/integration/touch/snapshots/stax/test_sign_complex_operation/enable_expert_mode.png new file mode 100644 index 000000000..2721dadfa Binary files /dev/null and b/tests/integration/touch/snapshots/stax/test_sign_complex_operation/enable_expert_mode.png differ diff --git a/tests/integration/touch/snapshots/stax/test_sign_complex_operation/enabled_expert_mode.png b/tests/integration/touch/snapshots/stax/test_sign_complex_operation/enabled_expert_mode.png new file mode 100644 index 000000000..b3b023d25 Binary files /dev/null and b/tests/integration/touch/snapshots/stax/test_sign_complex_operation/enabled_expert_mode.png differ diff --git a/tests/integration/touch/snapshots/stax/test_sign_complex_operation/expert_mode_splash.png b/tests/integration/touch/snapshots/stax/test_sign_complex_operation/expert_mode_splash.png new file mode 100644 index 000000000..5bc079b4f Binary files /dev/null and b/tests/integration/touch/snapshots/stax/test_sign_complex_operation/expert_mode_splash.png differ diff --git a/tests/integration/touch/snapshots/stax/test_sign_complex_operation/operation_sign.png b/tests/integration/touch/snapshots/stax/test_sign_complex_operation/operation_sign.png new file mode 100644 index 000000000..c1e5457de Binary files /dev/null and b/tests/integration/touch/snapshots/stax/test_sign_complex_operation/operation_sign.png differ diff --git a/tests/integration/touch/snapshots/stax/test_sign_complex_operation/review_01.png b/tests/integration/touch/snapshots/stax/test_sign_complex_operation/review_01.png new file mode 100644 index 000000000..a0c0a56ae Binary files /dev/null and b/tests/integration/touch/snapshots/stax/test_sign_complex_operation/review_01.png differ diff --git a/tests/integration/touch/snapshots/stax/test_sign_complex_operation/review_02.png b/tests/integration/touch/snapshots/stax/test_sign_complex_operation/review_02.png new file mode 100644 index 000000000..aeb521d30 Binary files /dev/null and b/tests/integration/touch/snapshots/stax/test_sign_complex_operation/review_02.png differ diff --git a/tests/integration/touch/snapshots/stax/test_sign_complex_operation/review_03.png b/tests/integration/touch/snapshots/stax/test_sign_complex_operation/review_03.png new file mode 100644 index 000000000..5d5410594 Binary files /dev/null and b/tests/integration/touch/snapshots/stax/test_sign_complex_operation/review_03.png differ diff --git a/tests/integration/touch/snapshots/stax/test_sign_complex_operation/review_04.png b/tests/integration/touch/snapshots/stax/test_sign_complex_operation/review_04.png new file mode 100644 index 000000000..b7fdfd3dd Binary files /dev/null and b/tests/integration/touch/snapshots/stax/test_sign_complex_operation/review_04.png differ diff --git a/tests/integration/touch/snapshots/stax/test_sign_complex_operation/review_05.png b/tests/integration/touch/snapshots/stax/test_sign_complex_operation/review_05.png new file mode 100644 index 000000000..18da3c7bc Binary files /dev/null and b/tests/integration/touch/snapshots/stax/test_sign_complex_operation/review_05.png differ diff --git a/tests/integration/touch/snapshots/stax/test_sign_complex_operation/review_06.png b/tests/integration/touch/snapshots/stax/test_sign_complex_operation/review_06.png new file mode 100644 index 000000000..065c951bd Binary files /dev/null and b/tests/integration/touch/snapshots/stax/test_sign_complex_operation/review_06.png differ diff --git a/tests/integration/touch/snapshots/stax/test_sign_complex_operation/review_request_sign_operation.png b/tests/integration/touch/snapshots/stax/test_sign_complex_operation/review_request_sign_operation.png new file mode 100644 index 000000000..68c268b95 Binary files /dev/null and b/tests/integration/touch/snapshots/stax/test_sign_complex_operation/review_request_sign_operation.png differ diff --git a/tests/integration/touch/snapshots/stax/test_sign_complex_operation/signing_successful.png b/tests/integration/touch/snapshots/stax/test_sign_complex_operation/signing_successful.png new file mode 100644 index 000000000..392165d4f Binary files /dev/null and b/tests/integration/touch/snapshots/stax/test_sign_complex_operation/signing_successful.png differ diff --git a/tests/integration/touch/test_sign_complex_operation.py b/tests/integration/touch/test_sign_complex_operation.py new file mode 100644 index 000000000..d27e9fa64 --- /dev/null +++ b/tests/integration/touch/test_sign_complex_operation.py @@ -0,0 +1,73 @@ +#!/usr/bin/env python3 +# Copyright 2023 Trilitech + +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from utils import ( + tezos_app, + send_initialize_msg, + send_payload, + index_screen +) + +## Operation (0): Origination +# Source: tz1ixvCiPJYyMjsp2nKBVaq54f6AdbV8hCKa +# Fee: 0.5 XTZ +# Storage limit: 4 +# Balance: 1 XTZ +# Delegate: None +# Code: UNPACK mutez +# Storage: or key chest +## Operation (1): Transfer ticket +# Source: tz1ixvCiPJYyMjsp2nKBVaq54f6AdbV8hCKa +# Fee: 0.01 XTZ +# Storage limit: 5 +# Contents: None +# Type: option nat +# Ticketer: tz1TmFPVZsGQ8MnrBJtnECJgkFUwLa6EWYDm +# Amount: 7 +# Destination: tz3eydffbLkjdVb8zx42BvxpGV87zaRnqL3r +# Entrypoint: default + +if __name__ == "__main__": + app = tezos_app(__file__) + + app.assert_home() + + send_initialize_msg(app, "800f000011048000002c800006c18000000080000000") + send_payload(app, "800f81ffb40300000000000000000000000000000000000000000000000000000000000000006d00ffdd6102321bc251e4a5190ad5b12b251069d9b4a0c21e040304c0843d0000000004050d036a000000060764035c038d9e00ffdd6102321bc251e4a5190ad5b12b251069d9b4904e05040500000002030600000004056303620000591e842444265757d6a65e3670ca18b5e662f9c0070002cc8e146741cf31fc00123b8c26baf95c57421a3c0000000764656661756c74") + + screen = "review" + nb_screen = 2 + + for index in range(1, nb_screen+1): + app.review.next() + app.assert_screen(index_screen(screen, index)) + + app.review.next() + app.expert_mode_splash() + + nb_screen_after = 4 + + for index_after in range(index+1, index+nb_screen_after+1): + app.review.next() + app.assert_screen(index_screen(screen, index_after)) + + app.review.next() + app.assert_screen("operation_sign") + + expected_apdu = "5b8e95ffef018702781bef9aa935e05a879b79fa82f11d9cf067281144bb700237b3bcf1cd8222cbb9868341eabe58eddd212ed57c949cde5900444056a62cf049e61ff5acfe18a15166941810d283b52ff0a5b53b24416acb0f71643c925a0d9000" + app.review_confirm_signing(expected_apdu) + + app.assert_home() + app.quit()