Skip to content

Commit

Permalink
Updating some test files and snapshots.
Browse files Browse the repository at this point in the history
  • Loading branch information
joaoccmartins committed Feb 5, 2025
1 parent 64bff71 commit c5f0d95
Show file tree
Hide file tree
Showing 28 changed files with 17 additions and 5 deletions.
Binary file added test/python/snapshots/flex/review/00000.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added test/python/snapshots/flex/review/00001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added test/python/snapshots/flex/review/00002.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/python/snapshots/flex/test_aptos_fund_valid_1/review/00001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 17 additions & 5 deletions test/python/test_aptos.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,24 @@ class AptosTests(ExchangeTestRunner):
fake_payout = "abcdabcd"
fake_payout_memo = "1"
def perform_final_tx(self, destination, send_amount, fees, memo):
# Base and trail apdu for Aptos, builds a transaction by concatenating them
# ex: base_apdu + dest_1 + middle_apdu + amount_1 + trail_apdu
base_apdu = "b5e97db07fa0bd0e5598aa3643a9bc6f6693bddc1a9fec9e674a461eaa00b193783135e8b00430253a22ba041d860c373d7a1501ccf7ac2d1ad37a8ed2775aee000000000000000002000000000000000000000000000000000000000000000000000000000000000104636f696e087472616e73666572010700000000000000000000000000000000000000000000000000000000000000010a6170746f735f636f696e094170746f73436f696e000220";
middle_apdu = "08"
trail_apdu = "00000000204e0000000000006400000000000000565c51630000000022"
#valid_destination_1 encoded as bcs address
dest_1 = "544E62745A53706B6E61517643376A50434C55347A6E4A4D676D386668754700"
#valid_destination_2 encoded as bcs address
dest_2 = "54426F545A6341527A5756676E4E7542395379453353356731527773586F5100"

built_apdu = base_apdu
if destination == self.valid_destination_1:
transaction = bytes.fromhex("b5e97db07fa0bd0e5598aa3643a9bc6f6693bddc1a9fec9e674a461eaa00b193783135e8b00430253a22ba041d860c373d7a1501ccf7ac2d1ad37a8ed2775aee000000000000000002000000000000000000000000000000000000000000000000000000000000000104636f696e087472616e73666572010700000000000000000000000000000000000000000000000000000000000000010a6170746f735f636f696e094170746f73436f696e000220544e62745a53706b6e61517643376a50434c55347a6e4a4d676d386668754700082a00000000000000204e0000000000006400000000000000565c51630000000022")
AptosCommandSender(self.backend).sign_tx(transaction=transaction)
if destination == self.valid_destination_2:
transaction = bytes.fromhex("b5e97db07fa0bd0e5598aa3643a9bc6f6693bddc1a9fec9e674a461eaa00b193783135e8b00430253a22ba041d860c373d7a1501ccf7ac2d1ad37a8ed2775aee000000000000000002000000000000000000000000000000000000000000000000000000000000000104636f696e087472616e73666572010700000000000000000000000000000000000000000000000000000000000000010a6170746f735f636f696e094170746f73436f696e00022054426F545A6341527A5756676E4E7542395379453353356731527773586F510008ceb4a01a00000000204e0000000000006400000000000000565c51630000000022")
AptosCommandSender(self.backend).sign_tx(transaction=transaction)
built_apdu += dest_1 + middle_apdu
else:
built_apdu += dest_2 + middle_apdu
built_apdu += send_amount.to_bytes(4,'little').hex() + trail_apdu
transaction = bytes.fromhex(built_apdu)
AptosCommandSender(self.backend).sign_tx(transaction=transaction)


# Use a class to reuse the same Speculos instance
Expand Down

0 comments on commit c5f0d95

Please sign in to comment.