@@ -81,11 +81,11 @@ def common(firmware: Firmware,
81
81
end_text = "Accept"
82
82
else :
83
83
end_text = r"(Sign|Accept (risk|threat))"
84
- scenario_navigator .review_approve (test_name = test_name , custom_screen_text = end_text , do_comparison = test_name != "" )
84
+ scenario_navigator .review_approve (test_name = test_name , custom_screen_text = end_text , do_comparison = test_name != "" )
85
85
86
86
# verify signature
87
87
vrs = ResponseParser .signature (app_client .response ().data )
88
- if v is not None : # temporary until web3.py supports 7702
88
+ if v is not None : # temporary until web3.py supports 7702
89
89
print (vrs )
90
90
print (v )
91
91
print (r )
@@ -174,7 +174,14 @@ def test_sign_legacy_send_bsc(firmware: Firmware,
174
174
"value" : Web3 .to_wei (AMOUNT2 , "ether" ),
175
175
"chainId" : 56
176
176
}
177
- common (firmware , backend , navigator , scenario_navigator , default_screenshot_path , tx_params , None , test_name , BIP32_PATH2 )
177
+ common (firmware ,
178
+ backend ,
179
+ navigator ,
180
+ scenario_navigator ,
181
+ default_screenshot_path ,
182
+ tx_params ,
183
+ test_name = test_name ,
184
+ path = BIP32_PATH2 )
178
185
179
186
180
187
# Transfer on network 112233445566 on Ethereum
@@ -192,7 +199,14 @@ def test_sign_legacy_chainid(firmware: Firmware,
192
199
"value" : Web3 .to_wei (AMOUNT2 , "ether" ),
193
200
"chainId" : 112233445566
194
201
}
195
- common (firmware , backend , navigator , scenario_navigator , default_screenshot_path , tx_params , None , test_name , BIP32_PATH2 )
202
+ common (firmware ,
203
+ backend ,
204
+ navigator ,
205
+ scenario_navigator ,
206
+ default_screenshot_path ,
207
+ tx_params ,
208
+ test_name = test_name ,
209
+ path = BIP32_PATH2 )
196
210
197
211
198
212
def test_1559 (firmware : Firmware ,
@@ -232,9 +246,8 @@ def test_sign_simple(firmware: Firmware,
232
246
scenario_navigator ,
233
247
default_screenshot_path ,
234
248
tx_params ,
235
- None ,
236
- test_name ,
237
- BIP32_PATH2 )
249
+ test_name = test_name ,
250
+ path = BIP32_PATH2 )
238
251
239
252
240
253
def test_sign_limit_nonce (firmware : Firmware ,
@@ -257,9 +270,8 @@ def test_sign_limit_nonce(firmware: Firmware,
257
270
scenario_navigator ,
258
271
default_screenshot_path ,
259
272
tx_params ,
260
- None ,
261
- test_name ,
262
- BIP32_PATH2 )
273
+ test_name = test_name ,
274
+ path = BIP32_PATH2 )
263
275
264
276
265
277
def test_sign_nonce_display (firmware : Firmware ,
@@ -285,9 +297,9 @@ def test_sign_nonce_display(firmware: Firmware,
285
297
scenario_navigator ,
286
298
default_screenshot_path ,
287
299
tx_params ,
288
- None ,
289
- test_name ,
290
- BIP32_PATH2 )
300
+ test_name = test_name ,
301
+ path = BIP32_PATH2 )
302
+
291
303
292
304
def test_sign_reject (backend : BackendInterface , scenario_navigator : NavigateWithScenario ):
293
305
tx_params : dict = {
@@ -352,8 +364,8 @@ def test_sign_eip_2930(firmware: Firmware,
352
364
scenario_navigator ,
353
365
default_screenshot_path ,
354
366
tx_params ,
355
- None ,
356
- test_name )
367
+ test_name = test_name )
368
+
357
369
358
370
def test_sign_eip_7702 (firmware : Firmware ,
359
371
backend : BackendInterface ,
@@ -364,11 +376,19 @@ def test_sign_eip_7702(firmware: Firmware,
364
376
if firmware == Firmware .NANOS :
365
377
pytest .skip ("Not supported on LNS" )
366
378
tx_params = {
367
- "chainId" : 1
379
+ "chainId" : 1
368
380
}
369
381
tx_raw = bytes .fromhex ("04f888018205390101825208941212121212121212121212121212121212121212872386f26fc1000080c0f85ef85c8094020202020202020202020202020202020202020282053901a0a24f35cafc6b408ce32539d4bd89a67edd4d6303fc676dfddf93b98405b7ee5ea0159456babe656692959ca3d829ca269e8f82387c91e40a33633d190dda7a3c5c" )
370
- common (firmware , backend , navigator , scenario_navigator , default_screenshot_path , tx_params , tx_raw , test_name ,
371
- BIP32_PATH , False ,
372
- bytes .fromhex ("01" ),
373
- bytes .fromhex ("9800 ce04 ecb4 6aeb de0f ea80 c663 9225 5eb1 3c3b 3597 aeec 2224 47f6 e1bf cfaf" ),
374
- bytes .fromhex ("787e b825 81e1 a51d 8956 f21a 0ccd 0b96 d8de 14b0 4c11 de0b 7dcb 5e40 0219 902b" ))
382
+ common (firmware ,
383
+ backend ,
384
+ navigator ,
385
+ scenario_navigator ,
386
+ default_screenshot_path ,
387
+ tx_params ,
388
+ tx_raw ,
389
+ test_name = test_name ,
390
+ path = BIP32_PATH ,
391
+ with_simu = False ,
392
+ v = bytes .fromhex ("01" ),
393
+ r = bytes .fromhex ("9800ce04ecb46aebde0fea80c66392255eb13c3b3597aeec222447f6e1bfcfaf" ),
394
+ s = bytes .fromhex ("787eb82581e1a51d8956f21a0ccd0b96d8de14b04c11de0b7dcb5e400219902b" ))
0 commit comments