Skip to content

Commit

Permalink
fix(tests): correct mypy type cheking
Browse files Browse the repository at this point in the history
  • Loading branch information
keiff3r committed Dec 10, 2024
1 parent 1f3640a commit bd884d8
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions tests/application_client/boilerplate_command_sender.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,43 +306,43 @@ def sign_transfer_to_public(
temp_data = pack_derivation_path(path)
temp_data += header_and_type
# send the header and type (no display)
response = self.backend.exchange(
temp_response = self.backend.exchange(
cla=CLA,
ins=InsType.TRANSFER_TO_PUBLIC,
p1=P1.P1_INITIAL_TRANSFER_TO_PUBLIC,
p2=P2.P2_NONE,
data=temp_data,
)

if response.status != 0x9000:
raise ExceptionRAPDU(response.status)
if temp_response.status != 0x9000:
raise ExceptionRAPDU(temp_response.status)
# send remaining ammount [192] + transaction amount [8]

Check failure on line 319 in tests/application_client/boilerplate_command_sender.py

View workflow job for this annotation

GitHub Actions / Check misspellings

ammount ==> amount
# + ammount index [1] + proof size [1] (no display)

Check failure on line 320 in tests/application_client/boilerplate_command_sender.py

View workflow job for this annotation

GitHub Actions / Check misspellings

ammount ==> amount
response = self.backend.exchange(
temp_response = self.backend.exchange(
cla=CLA,
ins=InsType.TRANSFER_TO_PUBLIC,
p1=P1.P1_REMAINING_AMOUNT_TRANSFER_TO_PUBLIC,
p2=P2.P2_NONE,
data=data,
)
print("km------------response 2", response)
if response.status != 0x9000:
raise ExceptionRAPDU(response.status)
print("km------------temp_response 2", temp_response)
if temp_response.status != 0x9000:
raise ExceptionRAPDU(temp_response.status)

# send proof in chunks
proof_chunks = split_message(proof, MAX_APDU_LEN)
last_chunk = proof_chunks.pop()
for chunk in proof_chunks:
response = self.backend.exchange(
temp_response = self.backend.exchange(
cla=CLA,
ins=InsType.TRANSFER_TO_PUBLIC,
p1=P1.P1_PROOF_TRANSFER_TO_PUBLIC,
p2=P2.P2_NONE,
data=chunk,
)
print("km------------response 3", response)
if response.status != 0x9000:
raise ExceptionRAPDU(response.status)
print("km------------temp_response 3", temp_response)
if temp_response.status != 0x9000:
raise ExceptionRAPDU(temp_response.status)
with self.backend.exchange_async(
cla=CLA,
ins=InsType.TRANSFER_TO_PUBLIC,
Expand Down

0 comments on commit bd884d8

Please sign in to comment.