Port 'old_test_eip191' from 'speculos' to 'ragger'
|
Before Width: | Height: | Size: 463 B After Width: | Height: | Size: 463 B |
|
Before Width: | Height: | Size: 423 B After Width: | Height: | Size: 423 B |
|
Before Width: | Height: | Size: 407 B After Width: | Height: | Size: 407 B |
|
After Width: | Height: | Size: 349 B |
|
After Width: | Height: | Size: 497 B |
|
After Width: | Height: | Size: 498 B |
|
After Width: | Height: | Size: 480 B |
|
After Width: | Height: | Size: 440 B |
|
Before Width: | Height: | Size: 407 B After Width: | Height: | Size: 407 B |
|
After Width: | Height: | Size: 349 B |
|
Before Width: | Height: | Size: 368 B After Width: | Height: | Size: 368 B |
|
Before Width: | Height: | Size: 423 B After Width: | Height: | Size: 423 B |
|
Before Width: | Height: | Size: 407 B After Width: | Height: | Size: 407 B |
|
Before Width: | Height: | Size: 449 B After Width: | Height: | Size: 449 B |
BIN
tests/ragger/snapshots/nanos/test_personal_sign_reject/00004.png
Normal file
|
After Width: | Height: | Size: 349 B |
1
tests/ragger/snapshots/nanosp/test_personal_sign_metamask
Symbolic link
@@ -0,0 +1 @@
|
||||
../nanox/test_personal_sign_metamask
|
||||
1
tests/ragger/snapshots/nanosp/test_personal_sign_non_ascii
Symbolic link
@@ -0,0 +1 @@
|
||||
../nanox/test_personal_sign_non_ascii
|
||||
1
tests/ragger/snapshots/nanosp/test_personal_sign_opensea
Symbolic link
@@ -0,0 +1 @@
|
||||
../nanox/test_personal_sign_opensea/
|
||||
1
tests/ragger/snapshots/nanosp/test_personal_sign_reject
Symbolic link
@@ -0,0 +1 @@
|
||||
../nanox/test_personal_sign_reject
|
||||
|
After Width: | Height: | Size: 623 B |
|
After Width: | Height: | Size: 457 B |
|
After Width: | Height: | Size: 381 B |
|
After Width: | Height: | Size: 917 B |
|
After Width: | Height: | Size: 526 B |
|
After Width: | Height: | Size: 457 B |
|
After Width: | Height: | Size: 381 B |
|
After Width: | Height: | Size: 857 B |
|
After Width: | Height: | Size: 832 B |
|
After Width: | Height: | Size: 720 B |
|
After Width: | Height: | Size: 850 B |
|
After Width: | Height: | Size: 626 B |
|
After Width: | Height: | Size: 621 B |
|
After Width: | Height: | Size: 912 B |
|
After Width: | Height: | Size: 692 B |
|
After Width: | Height: | Size: 457 B |
|
After Width: | Height: | Size: 381 B |
|
Before Width: | Height: | Size: 415 B After Width: | Height: | Size: 415 B |
BIN
tests/ragger/snapshots/nanox/test_personal_sign_reject/00001.png
Normal file
|
After Width: | Height: | Size: 500 B |
BIN
tests/ragger/snapshots/nanox/test_personal_sign_reject/00002.png
Normal file
|
After Width: | Height: | Size: 457 B |
|
Before Width: | Height: | Size: 499 B After Width: | Height: | Size: 499 B |
BIN
tests/ragger/snapshots/nanox/test_personal_sign_reject/00004.png
Normal file
|
After Width: | Height: | Size: 381 B |
|
After Width: | Height: | Size: 6.8 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 7.5 KiB |
|
After Width: | Height: | Size: 5.5 KiB |
|
After Width: | Height: | Size: 6.8 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 7.5 KiB |
|
After Width: | Height: | Size: 5.5 KiB |
BIN
tests/ragger/snapshots/stax/test_personal_sign_opensea/00000.png
Normal file
|
After Width: | Height: | Size: 6.8 KiB |
BIN
tests/ragger/snapshots/stax/test_personal_sign_opensea/00001.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
tests/ragger/snapshots/stax/test_personal_sign_opensea/00002.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
tests/ragger/snapshots/stax/test_personal_sign_opensea/00003.png
Normal file
|
After Width: | Height: | Size: 7.5 KiB |
BIN
tests/ragger/snapshots/stax/test_personal_sign_opensea/00004.png
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
BIN
tests/ragger/snapshots/stax/test_personal_sign_reject/00000.png
Normal file
|
After Width: | Height: | Size: 6.8 KiB |
BIN
tests/ragger/snapshots/stax/test_personal_sign_reject/00001.png
Normal file
|
After Width: | Height: | Size: 8.1 KiB |
BIN
tests/ragger/snapshots/stax/test_personal_sign_reject/00002.png
Normal file
|
After Width: | Height: | Size: 5.9 KiB |
BIN
tests/ragger/snapshots/stax/test_personal_sign_reject/00003.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
165
tests/ragger/test_eip191.py
Normal file
@@ -0,0 +1,165 @@
|
||||
import pytest
|
||||
|
||||
from ledger_app_clients.ethereum.client import EthAppClient, StatusWord
|
||||
import ledger_app_clients.ethereum.response_parser as ResponseParser
|
||||
from ledger_app_clients.ethereum.utils import recover_message
|
||||
|
||||
from ragger.error import ExceptionRAPDU
|
||||
from ragger.backend import BackendInterface
|
||||
from ragger.firmware import Firmware
|
||||
from ragger.navigator import Navigator, NavInsID
|
||||
|
||||
from constants import ROOT_SNAPSHOT_PATH
|
||||
|
||||
|
||||
BIP32_PATH = "m/44'/60'/0'/0/0"
|
||||
|
||||
|
||||
def test_personal_sign_metamask(firmware: Firmware,
|
||||
backend: BackendInterface,
|
||||
navigator: Navigator,
|
||||
test_name: str):
|
||||
|
||||
msg = "Example `personal_sign` message"
|
||||
|
||||
app_client = EthAppClient(backend)
|
||||
|
||||
with app_client.get_public_addr(display=False):
|
||||
pass
|
||||
_, DEVICE_ADDR, _ = ResponseParser.pk_addr(app_client.response().data)
|
||||
|
||||
with app_client.personal_sign(BIP32_PATH, msg.encode('utf-8')):
|
||||
if firmware.device.startswith("nano"):
|
||||
next_action = NavInsID.RIGHT_CLICK
|
||||
confirm_action = NavInsID.BOTH_CLICK
|
||||
initial_instructions = [NavInsID.RIGHT_CLICK]
|
||||
# Skip 1st screen because 'Sign' is already present
|
||||
navigator.navigate(initial_instructions,
|
||||
screen_change_after_last_instruction=False)
|
||||
else:
|
||||
next_action = NavInsID.USE_CASE_REVIEW_TAP
|
||||
confirm_action = NavInsID.USE_CASE_REVIEW_CONFIRM
|
||||
|
||||
navigator.navigate_until_text_and_compare(next_action,
|
||||
[confirm_action],
|
||||
"Sign",
|
||||
ROOT_SNAPSHOT_PATH,
|
||||
test_name)
|
||||
|
||||
# verify signature
|
||||
vrs = ResponseParser.signature(app_client.response().data)
|
||||
addr = recover_message(msg.encode('utf-8'), vrs)
|
||||
assert addr == DEVICE_ADDR
|
||||
|
||||
|
||||
def test_personal_sign_non_ascii(firmware: Firmware,
|
||||
backend: BackendInterface,
|
||||
navigator: Navigator,
|
||||
test_name: str):
|
||||
|
||||
msg = "0x9c22ff5f21f0b81b113e63f7db6da94fedef11b2119b4088b89664fb9a3cb658"
|
||||
|
||||
app_client = EthAppClient(backend)
|
||||
|
||||
with app_client.get_public_addr(display=False):
|
||||
pass
|
||||
_, DEVICE_ADDR, _ = ResponseParser.pk_addr(app_client.response().data)
|
||||
|
||||
with app_client.personal_sign(BIP32_PATH, msg.encode('utf-8')):
|
||||
if firmware.device.startswith("nano"):
|
||||
next_action = NavInsID.RIGHT_CLICK
|
||||
confirm_action = NavInsID.BOTH_CLICK
|
||||
initial_instructions = [NavInsID.RIGHT_CLICK]
|
||||
# Skip 1st screen because 'Sign' is already present
|
||||
navigator.navigate(initial_instructions,
|
||||
screen_change_before_first_instruction=False,
|
||||
screen_change_after_last_instruction=False)
|
||||
else:
|
||||
next_action = NavInsID.USE_CASE_REVIEW_TAP
|
||||
confirm_action = NavInsID.USE_CASE_REVIEW_CONFIRM
|
||||
|
||||
navigator.navigate_until_text_and_compare(next_action,
|
||||
[confirm_action],
|
||||
"Sign",
|
||||
ROOT_SNAPSHOT_PATH,
|
||||
test_name)
|
||||
|
||||
# verify signature
|
||||
vrs = ResponseParser.signature(app_client.response().data)
|
||||
addr = recover_message(msg.encode('utf-8'), vrs)
|
||||
assert addr == DEVICE_ADDR
|
||||
|
||||
|
||||
def test_personal_sign_opensea(firmware: Firmware,
|
||||
backend: BackendInterface,
|
||||
navigator: Navigator,
|
||||
test_name: str):
|
||||
|
||||
msg = "Welcome to OpenSea!\n\nClick to sign in and accept the OpenSea Terms of Service: https://opensea.io/tos\n\nThis request will not trigger a blockchain transaction or cost any gas fees.\n\nYour authentication status will reset after 24 hours.\n\nWallet address:\n0x9858effd232b4033e47d90003d41ec34ecaeda94\n\nNonce:\n2b02c8a0-f74f-4554-9821-a28054dc9121"
|
||||
|
||||
app_client = EthAppClient(backend)
|
||||
|
||||
with app_client.get_public_addr(display=False):
|
||||
pass
|
||||
_, DEVICE_ADDR, _ = ResponseParser.pk_addr(app_client.response().data)
|
||||
|
||||
if firmware.device == "nanos":
|
||||
pytest.skip("Not supported on LNS")
|
||||
with app_client.personal_sign(BIP32_PATH, msg.encode('utf-8')):
|
||||
if firmware.device.startswith("nano"):
|
||||
next_action = NavInsID.RIGHT_CLICK
|
||||
confirm_action = NavInsID.BOTH_CLICK
|
||||
initial_instructions = [NavInsID.RIGHT_CLICK]
|
||||
# Skip 1st screen because 'Sign' is already present
|
||||
navigator.navigate(initial_instructions,
|
||||
screen_change_before_first_instruction=False,
|
||||
screen_change_after_last_instruction=False)
|
||||
else:
|
||||
next_action = NavInsID.USE_CASE_REVIEW_TAP
|
||||
confirm_action = NavInsID.USE_CASE_REVIEW_CONFIRM
|
||||
|
||||
navigator.navigate_until_text_and_compare(next_action,
|
||||
[confirm_action],
|
||||
"Sign",
|
||||
ROOT_SNAPSHOT_PATH,
|
||||
test_name)
|
||||
|
||||
# verify signature
|
||||
vrs = ResponseParser.signature(app_client.response().data)
|
||||
addr = recover_message(msg.encode('utf-8'), vrs)
|
||||
assert addr == DEVICE_ADDR
|
||||
|
||||
|
||||
def test_personal_sign_reject(firmware: Firmware,
|
||||
backend: BackendInterface,
|
||||
navigator: Navigator,
|
||||
test_name: str):
|
||||
|
||||
msg = "This is an reject sign"
|
||||
|
||||
app_client = EthAppClient(backend)
|
||||
|
||||
try:
|
||||
with app_client.personal_sign(BIP32_PATH, msg.encode('utf-8')):
|
||||
if firmware.device.startswith("nano"):
|
||||
next_action = NavInsID.RIGHT_CLICK
|
||||
confirm_action = NavInsID.BOTH_CLICK
|
||||
navigator.navigate_until_text_and_compare(next_action,
|
||||
[confirm_action],
|
||||
"Cancel",
|
||||
ROOT_SNAPSHOT_PATH,
|
||||
test_name)
|
||||
else:
|
||||
# instructions = [NavInsID.USE_CASE_REVIEW_TAP]
|
||||
instructions = [NavInsID.USE_CASE_CHOICE_REJECT,
|
||||
NavInsID.USE_CASE_CHOICE_CONFIRM,
|
||||
NavInsID.USE_CASE_STATUS_DISMISS]
|
||||
navigator.navigate_and_compare(ROOT_SNAPSHOT_PATH,
|
||||
test_name,
|
||||
instructions)
|
||||
|
||||
|
||||
except ExceptionRAPDU as e:
|
||||
assert e.status == StatusWord.CONDITION_NOT_SATISFIED
|
||||
else:
|
||||
assert False # An exception should have been raised
|
||||
@@ -1,209 +0,0 @@
|
||||
from time import sleep
|
||||
|
||||
import pytest
|
||||
|
||||
import ethereum_client
|
||||
from ethereum_client.utils import compare_screenshot, compare_screenshot, parse_sign_response, save_screenshot, PATH_IMG
|
||||
from ethereum_client.transaction import PersonalTransaction
|
||||
|
||||
def test_personal_sign_metamask(cmd):
|
||||
result: list = []
|
||||
|
||||
bip32_path="44'/60'/0'/0/0"
|
||||
transaction = PersonalTransaction(
|
||||
msg="Example `personal_sign` message"
|
||||
)
|
||||
|
||||
with cmd.personal_sign_tx(bip32_path=bip32_path, transaction=transaction, result=result) as ex:
|
||||
sleep(0.5)
|
||||
|
||||
if cmd.model == "nanos":
|
||||
# Sign message
|
||||
compare_screenshot(cmd, f"screenshots/eip191/{PATH_IMG[cmd.model]}/personal_sign_metamask/00000.png")
|
||||
cmd.client.press_and_release('right')
|
||||
|
||||
# Message 1/2, 2/2
|
||||
compare_screenshot(cmd, f"screenshots/eip191/{PATH_IMG[cmd.model]}/personal_sign_metamask/00001.png")
|
||||
cmd.client.press_and_release('right')
|
||||
compare_screenshot(cmd, f"screenshots/eip191/{PATH_IMG[cmd.model]}/personal_sign_metamask/00002.png")
|
||||
cmd.client.press_and_release('right')
|
||||
|
||||
# Sign message
|
||||
compare_screenshot(cmd, f"screenshots/eip191/{PATH_IMG[cmd.model]}/personal_sign_metamask/00003.png")
|
||||
cmd.client.press_and_release('both')
|
||||
if cmd.model == "nanox" or cmd.model == "nanosp":
|
||||
# Sign message
|
||||
compare_screenshot(cmd, f"screenshots/eip191/{PATH_IMG[cmd.model]}/personal_sign_metamask/00000.png")
|
||||
cmd.client.press_and_release('right')
|
||||
|
||||
# Message
|
||||
compare_screenshot(cmd, f"screenshots/eip191/{PATH_IMG[cmd.model]}/personal_sign_metamask/00001.png")
|
||||
cmd.client.press_and_release('right')
|
||||
|
||||
# Sign message
|
||||
compare_screenshot(cmd, f"screenshots/eip191/{PATH_IMG[cmd.model]}/personal_sign_metamask/00002.png")
|
||||
cmd.client.press_and_release('both')
|
||||
|
||||
v, r, s = result
|
||||
|
||||
assert v == 0x1c # 28
|
||||
assert r.hex() == "916099cf0d9c21911c85f0770a47a9696a8189e78c259cf099749748c507baae"
|
||||
assert s.hex() == "0d72234bc0ac2e94c5f7a5f4f9cd8610a52be4ea55515a85b9703f1bb158415c"
|
||||
|
||||
def test_personal_sign_reject(cmd):
|
||||
result: list = []
|
||||
|
||||
bip32_path="44'/60'/0'/0/0"
|
||||
transaction = PersonalTransaction(
|
||||
msg="This is an reject sign"
|
||||
)
|
||||
|
||||
with pytest.raises(ethereum_client.exception.errors.DenyError) as error:
|
||||
with cmd.personal_sign_tx(bip32_path=bip32_path, transaction=transaction, result=result) as ex:
|
||||
sleep(0.5)
|
||||
|
||||
if cmd.model == "nanos":
|
||||
# Sign message
|
||||
compare_screenshot(cmd, f"screenshots/eip191/{PATH_IMG[cmd.model]}/personal_sign_reject/00000.png")
|
||||
cmd.client.press_and_release('right')
|
||||
|
||||
# Message 1/2, 2/2
|
||||
compare_screenshot(cmd, f"screenshots/eip191/{PATH_IMG[cmd.model]}/personal_sign_reject/00001.png")
|
||||
cmd.client.press_and_release('right')
|
||||
compare_screenshot(cmd, f"screenshots/eip191/{PATH_IMG[cmd.model]}/personal_sign_reject/00002.png")
|
||||
cmd.client.press_and_release('right')
|
||||
|
||||
# Sign message
|
||||
compare_screenshot(cmd, f"screenshots/eip191/{PATH_IMG[cmd.model]}/personal_sign_reject/00003.png")
|
||||
cmd.client.press_and_release('right')
|
||||
|
||||
# Cancel signature
|
||||
compare_screenshot(cmd, f"screenshots/eip191/{PATH_IMG[cmd.model]}/personal_sign_reject/00004.png")
|
||||
cmd.client.press_and_release('both')
|
||||
|
||||
if cmd.model == "nanox" or cmd.model == "nanosp":
|
||||
# Sign message
|
||||
compare_screenshot(cmd, f"screenshots/eip191/{PATH_IMG[cmd.model]}/personal_sign_reject/00000.png")
|
||||
cmd.client.press_and_release('right')
|
||||
|
||||
# Message
|
||||
compare_screenshot(cmd, f"screenshots/eip191/{PATH_IMG[cmd.model]}/personal_sign_reject/00001.png")
|
||||
cmd.client.press_and_release('right')
|
||||
|
||||
# Sign message
|
||||
compare_screenshot(cmd, f"screenshots/eip191/{PATH_IMG[cmd.model]}/personal_sign_reject/00002.png")
|
||||
cmd.client.press_and_release('right')
|
||||
|
||||
# Cancel signature
|
||||
compare_screenshot(cmd, f"screenshots/eip191/{PATH_IMG[cmd.model]}/personal_sign_reject/00003.png")
|
||||
cmd.client.press_and_release('both')
|
||||
assert error.args[0] == '0x6985'
|
||||
|
||||
def test_personal_sign_non_ascii(cmd):
|
||||
result: list = []
|
||||
|
||||
bip32_path="44'/60'/0'/0/0"
|
||||
transaction = PersonalTransaction(
|
||||
msg="0x9c22ff5f21f0b81b113e63f7db6da94fedef11b2119b4088b89664fb9a3cb658"
|
||||
)
|
||||
|
||||
with cmd.personal_sign_tx(bip32_path=bip32_path, transaction=transaction, result=result) as ex:
|
||||
sleep(0.5)
|
||||
|
||||
if cmd.model == "nanos":
|
||||
# Sign message
|
||||
compare_screenshot(cmd, f"screenshots/eip191/{PATH_IMG[cmd.model]}/personal_sign_non_ascii/00000.png")
|
||||
cmd.client.press_and_release('right')
|
||||
|
||||
# Message 1/4, 2/4, 3/4, 4/4
|
||||
compare_screenshot(cmd, f"screenshots/eip191/{PATH_IMG[cmd.model]}/personal_sign_non_ascii/00001.png")
|
||||
cmd.client.press_and_release('right')
|
||||
compare_screenshot(cmd, f"screenshots/eip191/{PATH_IMG[cmd.model]}/personal_sign_non_ascii/00002.png")
|
||||
cmd.client.press_and_release('right')
|
||||
compare_screenshot(cmd, f"screenshots/eip191/{PATH_IMG[cmd.model]}/personal_sign_non_ascii/00003.png")
|
||||
cmd.client.press_and_release('right')
|
||||
compare_screenshot(cmd, f"screenshots/eip191/{PATH_IMG[cmd.model]}/personal_sign_non_ascii/00004.png")
|
||||
cmd.client.press_and_release('right')
|
||||
|
||||
# Sign message
|
||||
compare_screenshot(cmd, f"screenshots/eip191/{PATH_IMG[cmd.model]}/personal_sign_non_ascii/00005.png")
|
||||
cmd.client.press_and_release('both')
|
||||
if cmd.model == "nanox" or cmd.model == "nanosp":
|
||||
# Sign message
|
||||
compare_screenshot(cmd, f"screenshots/eip191/{PATH_IMG[cmd.model]}/personal_sign_non_ascii/00000.png")
|
||||
cmd.client.press_and_release('right')
|
||||
|
||||
# Message 1/2, 2/2
|
||||
compare_screenshot(cmd, f"screenshots/eip191/{PATH_IMG[cmd.model]}/personal_sign_non_ascii/00001.png")
|
||||
cmd.client.press_and_release('right')
|
||||
compare_screenshot(cmd, f"screenshots/eip191/{PATH_IMG[cmd.model]}/personal_sign_non_ascii/00002.png")
|
||||
cmd.client.press_and_release('right')
|
||||
|
||||
# Sign message
|
||||
compare_screenshot(cmd, f"screenshots/eip191/{PATH_IMG[cmd.model]}/personal_sign_non_ascii/00003.png")
|
||||
cmd.client.press_and_release('both')
|
||||
|
||||
v, r, s = result
|
||||
|
||||
assert v == 0x1c # 28
|
||||
assert r.hex() == "64bdbdb6959425445d00ff2536a7018d2dce904e1f7475938fe4221c3c72500c"
|
||||
assert s.hex() == "7c9208e99b6b9266a73aae17b73472d06499746edec34fd47a9dab42f06f2e42"
|
||||
|
||||
def test_personal_sign_opensea(cmd):
|
||||
result: list = []
|
||||
|
||||
bip32_path="44'/60'/0'/0/0"
|
||||
transaction = PersonalTransaction(
|
||||
msg="Welcome to OpenSea!\n\nClick to sign in and accept the OpenSea Terms of Service: https://opensea.io/tos\n\nThis request will not trigger a blockchain transaction or cost any gas fees.\n\nYour authentication status will reset after 24 hours.\n\nWallet address:\n0x9858effd232b4033e47d90003d41ec34ecaeda94\n\nNonce:\n2b02c8a0-f74f-4554-9821-a28054dc9121"
|
||||
)
|
||||
|
||||
with cmd.personal_sign_tx(bip32_path, transaction, result) as ex:
|
||||
sleep(0.5)
|
||||
|
||||
if cmd.model == "nanos":
|
||||
# Sign message
|
||||
compare_screenshot(cmd, f"screenshots/eip191/{PATH_IMG[cmd.model]}/personal_sign_opensea/00000.png")
|
||||
cmd.client.press_and_release('right')
|
||||
|
||||
# Message 1/5, 2/5, 3/5, 4/5, 5/5
|
||||
compare_screenshot(cmd, f"screenshots/eip191/{PATH_IMG[cmd.model]}/personal_sign_opensea/00001.png")
|
||||
cmd.client.press_and_release('right')
|
||||
compare_screenshot(cmd, f"screenshots/eip191/{PATH_IMG[cmd.model]}/personal_sign_opensea/00002.png")
|
||||
cmd.client.press_and_release('right')
|
||||
compare_screenshot(cmd, f"screenshots/eip191/{PATH_IMG[cmd.model]}/personal_sign_opensea/00003.png")
|
||||
cmd.client.press_and_release('right')
|
||||
compare_screenshot(cmd, f"screenshots/eip191/{PATH_IMG[cmd.model]}/personal_sign_opensea/00004.png")
|
||||
cmd.client.press_and_release('right')
|
||||
compare_screenshot(cmd, f"screenshots/eip191/{PATH_IMG[cmd.model]}/personal_sign_opensea/00005.png")
|
||||
cmd.client.press_and_release('right')
|
||||
|
||||
# Sign message
|
||||
compare_screenshot(cmd, f"screenshots/eip191/{PATH_IMG[cmd.model]}/personal_sign_opensea/00006.png")
|
||||
cmd.client.press_and_release('both')
|
||||
|
||||
if cmd.model == "nanox" or cmd.model == "nanosp":
|
||||
# Sign message
|
||||
compare_screenshot(cmd, f"screenshots/eip191/{PATH_IMG[cmd.model]}/personal_sign_opensea/00000.png")
|
||||
cmd.client.press_and_release('right')
|
||||
|
||||
# Message 1/5, 2/5, 3/5, 4/5, 5/5
|
||||
compare_screenshot(cmd, f"screenshots/eip191/{PATH_IMG[cmd.model]}/personal_sign_opensea/00001.png")
|
||||
cmd.client.press_and_release('right')
|
||||
compare_screenshot(cmd, f"screenshots/eip191/{PATH_IMG[cmd.model]}/personal_sign_opensea/00002.png")
|
||||
cmd.client.press_and_release('right')
|
||||
compare_screenshot(cmd, f"screenshots/eip191/{PATH_IMG[cmd.model]}/personal_sign_opensea/00003.png")
|
||||
cmd.client.press_and_release('right')
|
||||
compare_screenshot(cmd, f"screenshots/eip191/{PATH_IMG[cmd.model]}/personal_sign_opensea/00004.png")
|
||||
cmd.client.press_and_release('right')
|
||||
compare_screenshot(cmd, f"screenshots/eip191/{PATH_IMG[cmd.model]}/personal_sign_opensea/00005.png")
|
||||
cmd.client.press_and_release('right')
|
||||
|
||||
# Sign message
|
||||
compare_screenshot(cmd, f"screenshots/eip191/{PATH_IMG[cmd.model]}/personal_sign_opensea/00006.png")
|
||||
cmd.client.press_and_release('both')
|
||||
|
||||
v, r, s = result
|
||||
|
||||
assert v == 0x1c # 28
|
||||
assert r.hex() == "61a68c986f087730d2f6ecf89d6d1e48ab963ac461102bb02664bc05c3db75bb"
|
||||
assert s.hex() == "5714729ef441e097673a7b29a681e97f6963d875eeed2081f26b0b6686cd2bd2"
|
||||
|
Before Width: | Height: | Size: 368 B |
|
Before Width: | Height: | Size: 492 B |
|
Before Width: | Height: | Size: 489 B |
|
Before Width: | Height: | Size: 474 B |
|
Before Width: | Height: | Size: 490 B |
|
Before Width: | Height: | Size: 368 B |
|
Before Width: | Height: | Size: 475 B |
|
Before Width: | Height: | Size: 471 B |
|
Before Width: | Height: | Size: 465 B |
|
Before Width: | Height: | Size: 449 B |
|
Before Width: | Height: | Size: 466 B |
|
Before Width: | Height: | Size: 407 B |
|
Before Width: | Height: | Size: 368 B |
|
Before Width: | Height: | Size: 449 B |
|
Before Width: | Height: | Size: 624 B |
|
Before Width: | Height: | Size: 463 B |
|
Before Width: | Height: | Size: 415 B |
|
Before Width: | Height: | Size: 882 B |
|
Before Width: | Height: | Size: 570 B |
|
Before Width: | Height: | Size: 463 B |
|
Before Width: | Height: | Size: 415 B |
|
Before Width: | Height: | Size: 853 B |
|
Before Width: | Height: | Size: 852 B |
|
Before Width: | Height: | Size: 837 B |
|
Before Width: | Height: | Size: 814 B |
|
Before Width: | Height: | Size: 522 B |
|
Before Width: | Height: | Size: 463 B |
|
Before Width: | Height: | Size: 415 B |
|
Before Width: | Height: | Size: 503 B |
|
Before Width: | Height: | Size: 463 B |