diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a3b60a..4d0113f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### Added + +- Add E2E test for gasless transfers `Wallet.createTransfer({..., gasless: true})` + ### Fixed - Fixed a bug where non-checksummed asset IDs were throwing an error. diff --git a/tests/test_e2e.py b/tests/test_e2e.py index ab74f88..19a885b 100644 --- a/tests/test_e2e.py +++ b/tests/test_e2e.py @@ -170,3 +170,27 @@ def test_historical_balances(imported_wallet): balances = list(imported_wallet.default_address.historical_balances("eth")) assert balances assert all(balance.amount > 0 for balance in balances) + + +@pytest.mark.e2e +def test_gasless_transfer(imported_wallet): + """Test gasless transfer.""" + destination_wallet = Wallet.create() + + initial_source_balance = imported_wallet.balance("usdc") + initial_dest_balance = destination_wallet.balance("usdc") + + transfer = imported_wallet.transfer( + amount=Decimal("0.000001"), asset_id="usdc", gasless=True, destination=destination_wallet + ).wait() + + time.sleep(20) + + assert transfer.status.value == "complete" + + final_source_balance = imported_wallet.balance("usdc") + final_dest_balance = destination_wallet.balance("usdc") + + assert final_source_balance < initial_source_balance + assert final_dest_balance > initial_dest_balance + assert final_dest_balance == Decimal("0.000001")