From 99431d296821297b0f15fd73e37205a7066cf5a1 Mon Sep 17 00:00:00 2001 From: andycreed0x <11888868+andycreed0x@users.noreply.github.com> Date: Mon, 3 Aug 2026 13:44:47 -0300 Subject: [PATCH] expires at --- scripts/prompts/prompt_test_wapupay.md | 2 +- src/aqua/server.py | 2 +- src/aqua/tools.py | 4 ++-- src/aqua/wapupay.py | 8 +++----- tests/test_wapupay.py | 2 +- 5 files changed, 8 insertions(+), 10 deletions(-) diff --git a/scripts/prompts/prompt_test_wapupay.md b/scripts/prompts/prompt_test_wapupay.md index ae7d948..bc56d6e 100644 --- a/scripts/prompts/prompt_test_wapupay.md +++ b/scripts/prompts/prompt_test_wapupay.md @@ -146,7 +146,7 @@ as the refund address. Show me the funding instructions but DO NOT pay yet. - Invokes `wapupay_create_order(amount_ars="10000", alias="test.alias.mp", receiver_name="Test Receiver", refund_address="lq1qqw4...k6lng")` - Returns `tentative_id`, `status` (`FUNDING_ISSUED`), `address_destination` (Liquid `lq1…/ex1…/VJL…`), `asset_id` (USDT on Liquid), `funding_amount_usdt`, `total_amount_usdt`, - `total_funding_amount_base_units`, `funding_expires_at`, `pay_instructions`, `qr_code_path` + `total_funding_amount_base_units`, `expires_at`, `pay_instructions`, `qr_code_path` - ⚠️ The agent shows the funding address/QR **but must NOT call `lw_send_asset`** — keep this dry --- diff --git a/src/aqua/server.py b/src/aqua/server.py index ccde754..1355371 100644 --- a/src/aqua/server.py +++ b/src/aqua/server.py @@ -1141,7 +1141,7 @@ "Creates the tentative (freezing the quote) and issues " "funding instructions. Returns address_destination (Liquid), asset_id " "(USDT), funding_amount_usdt, total_amount_usdt, " - "total_funding_amount_base_units, funding_expires_at and a QR. Pay the " + "total_funding_amount_base_units, expires_at and a QR. Pay the " "TOTAL with lw_send_asset (amount = total_funding_amount_base_units); " "WapuPay then makes a P2P payer settle ARS to the bank account. Does NOT broadcast the " "payment itself — confirm the quote with the user first via wapupay_quote." diff --git a/src/aqua/tools.py b/src/aqua/tools.py index 03e1fec..e620b76 100644 --- a/src/aqua/tools.py +++ b/src/aqua/tools.py @@ -1233,7 +1233,7 @@ def wapupay_create_order( The result includes `address_destination` (a Liquid address), `asset_id` (USDT on Liquid), `funding_amount_usdt`, `total_amount_usdt`, - `total_funding_amount_base_units`, and `funding_expires_at`. Pay the TOTAL + `total_funding_amount_base_units`, and `expires_at`. Pay the TOTAL with `lw_send_asset` (amount = `total_funding_amount_base_units`, the exact total_amount_usdt in USDT base units; asset_id from the response); WapuPay then settles `amount_ars` ARS to the bank account. This tool never @@ -1258,7 +1258,7 @@ def wapupay_create_order( Returns: The order record incl. tentative_id, status, address_destination, asset_id, funding_amount_usdt, total_amount_usdt, - total_funding_amount_base_units, funding_expires_at, funded, + total_funding_amount_base_units, expires_at, funded, pay_instructions, and qr_code_path (QR of the funding address). """ result = get_wapupay_manager().create_order( diff --git a/src/aqua/wapupay.py b/src/aqua/wapupay.py index 64317fc..d593425 100644 --- a/src/aqua/wapupay.py +++ b/src/aqua/wapupay.py @@ -229,7 +229,6 @@ def _to_decimal(value: str | int | float | Decimal) -> Decimal: "address_destination", "asset_id", "expires_at", - "funding_expires_at", "refund_address", "funding_transaction_id", "executed_transaction_id", @@ -330,7 +329,6 @@ class WapuPayOrder: address_destination: Optional[str] = None asset_id: Optional[str] = None expires_at: Optional[str] = None - funding_expires_at: Optional[str] = None refund_address: Optional[str] = None funding_transaction_id: Optional[str] = None executed_transaction_id: Optional[str] = None @@ -723,7 +721,7 @@ def create_order( Returns the order record including ``address_destination`` (Liquid), ``asset_id`` (USDT), ``funding_amount_usdt`` / ``total_amount_usdt`` / - ``total_funding_amount_base_units`` and ``funding_expires_at``. The + ``total_funding_amount_base_units`` and ``expires_at``. The caller pays the TOTAL with ``lw_send_asset`` — this method never broadcasts. """ @@ -892,9 +890,9 @@ def _funded_result(order: "WapuPayOrder") -> dict: if order.address_destination and order.total_funding_amount_base_units is not None: fee_display = order.fee_amount_usdt if order.fee_amount_usdt is not None else 0 expires_note = ( - f" Funding window: expires at {order.funding_expires_at} UTC" + f" Funding window: expires at {order.expires_at} UTC" f" (convert to the user's local timezone before displaying)." - if order.funding_expires_at + if order.expires_at else "" ) diff --git a/tests/test_wapupay.py b/tests/test_wapupay.py index d0d4e79..d7c2c5d 100644 --- a/tests/test_wapupay.py +++ b/tests/test_wapupay.py @@ -219,7 +219,7 @@ def side_effect(req, timeout=None): "address_destination": "lq1qqfunding0address", "asset_id": "ce091c998b83c78bb71a632313ba3760f1763d9cfcffae02258ffa9865a37bd2", "funding_amount_usdt": 6.99, - "funding_expires_at": "2026-05-24T14:35:00Z", + "expires_at": "2026-05-24T14:35:00Z", }