Remove redundant test_eip1559

This commit is contained in:
Charles-Edouard de la Vergne
2024-04-10 12:07:52 +02:00
parent 29630f9cf3
commit ae6c7bfff5
20 changed files with 0 additions and 63 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 374 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 296 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 434 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 403 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 343 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 345 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 414 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 349 B

View File

@@ -1 +0,0 @@
../nanox/test_sign_eip_1559

Binary file not shown.

Before

Width:  |  Height:  |  Size: 414 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 353 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 558 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 412 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 472 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 381 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

View File

@@ -1,62 +0,0 @@
from web3 import Web3
from client.client import EthAppClient
import client.response_parser as ResponseParser
from client.utils import recover_transaction
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"
NONCE = 1
GAS_PRICE = 40000
GAS_LIMIT = 10
ADDR = bytes.fromhex("cccccccccccccccccccccccccccccccccccccccc")
AMOUNT = 0.01
CHAIN_ID = 1
def test_sign_eip_1559(firmware: Firmware,
backend: BackendInterface,
navigator: Navigator,
test_name: str):
tx_params = {
"nonce": NONCE,
"gas": Web3.to_wei(GAS_PRICE, "gwei"),
"maxFeePerGas": Web3.to_wei(GAS_LIMIT, "gwei"),
"maxPriorityFeePerGas": Web3.to_wei(GAS_LIMIT, "gwei"),
"to": ADDR,
"chainId": CHAIN_ID,
}
app_client = EthAppClient(backend)
with app_client.get_public_addr(bip32_path=BIP32_PATH, display=False):
pass
_, DEVICE_ADDR, _ = ResponseParser.pk_addr(app_client.response().data)
with app_client.sign(BIP32_PATH, tx_params):
if firmware.device.startswith("nano"):
next_action = NavInsID.RIGHT_CLICK
confirm_action = NavInsID.BOTH_CLICK
end_text = "Accept"
else:
next_action = NavInsID.USE_CASE_REVIEW_TAP
confirm_action = NavInsID.USE_CASE_REVIEW_CONFIRM
end_text = "Sign"
navigator.navigate_until_text_and_compare(next_action,
[confirm_action],
end_text,
ROOT_SNAPSHOT_PATH,
test_name)
# verify signature
vrs = ResponseParser.signature(app_client.response().data)
addr = recover_transaction(tx_params, vrs)
assert addr == DEVICE_ADDR