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 00000000..053fc534 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 00000000..29067d8e 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 00000000..8b798024 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 00000000..97eab5d9 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 00000000..7a12bcc4 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 00000000..78b15b72 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 00000000..ada60041 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 00000000..f4017bca 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 00000000..92b4bce4 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 00000000..404b0233 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 00000000..bbc474df 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 00000000..7e6a184f 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 00000000..8b798024 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 00000000..97eab5d9 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 00000000..9126afa3 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 00000000..d2735a4d 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 00000000..76ba1222 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 00000000..a7d68643 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 00000000..26748650 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 00000000..837dba8b 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 00000000..f31a189f 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 00000000..2283c749 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 00000000..bc576477 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 00000000..218dc051 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 00000000..7e0e2382 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 00000000..9fa51df2 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 00000000..780c4b54 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 00000000..fc2f4b72 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 00000000..3fa2978d 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 00000000..90860020 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 00000000..7f0fb654 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 00000000..742ede85 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 00000000..59fce75c 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 00000000..a2c84241 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 00000000..c1c7ce97 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 00000000..c1811249 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 00000000..fc2f4b72 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 00000000..af9beddb 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 00000000..4ce7d293 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 00000000..a3da0374 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 00000000..878150dd 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 00000000..976d816f 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 00000000..b66fc657 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 00000000..f8860cd3 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 00000000..ff518831 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 00000000..47132446 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 00000000..9fa51df2 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 00000000..780c4b54 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 00000000..fc2f4b72 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 00000000..3fa2978d 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 00000000..90860020 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 00000000..7f0fb654 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 00000000..742ede85 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 00000000..59fce75c 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 00000000..a2c84241 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 00000000..c1c7ce97 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 00000000..c1811249 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 00000000..fc2f4b72 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 00000000..af9beddb 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 00000000..4ce7d293 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 00000000..a3da0374 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 00000000..878150dd 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 00000000..976d816f 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 00000000..b66fc657 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 00000000..f8860cd3 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 00000000..ff518831 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 00000000..47132446 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 00000000..47c248e6 --- /dev/null +++ b/tests/integration/nano/test_sign_complex_operation.py @@ -0,0 +1,69 @@ +#!/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() + app.setup_blindsign_off() + + 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 00000000..bb1b8301 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 00000000..9f409bbc 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 00000000..92e453d5 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 00000000..5e787d8e 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 00000000..f647695e 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 00000000..3287886c 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 00000000..2323e303 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 00000000..254c9c9f 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 00000000..4439e924 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 00000000..60de857c 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 00000000..00bec06d 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 00000000..be51a9d5 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 00000000..2721dadf 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 00000000..b3b023d2 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 00000000..5bc079b4 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 00000000..c1e5457d 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 00000000..a0c0a56a 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 00000000..aeb521d3 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 00000000..5d541059 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 00000000..b7fdfd3d 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 00000000..18da3c7b 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 00000000..065c951b 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 00000000..68c268b9 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 00000000..392165d4 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 00000000..d27e9fa6 --- /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()