Fix payment confirm response with runtime intent fields

This commit is contained in:
2569718930@qq.com
2026-06-15 14:56:37 +08:00
parent 6b9caf8dc2
commit 15e0cb09b8
2 changed files with 13 additions and 3 deletions
+6
View File
@@ -235,6 +235,9 @@ def test_confirm_direct_transfer_uses_intent_chain_rpc(monkeypatch, tmp_path):
metadata={},
)
confirmed_intent = PaymentIntentRecord(**{**intent.__dict__, "status": "confirmed"})
# get_intent attaches user_id at runtime; the confirmation response must ignore
# non-dataclass attributes when rebuilding the returned intent payload.
setattr(intent, "user_id", "user-1")
intents = [intent, confirmed_intent]
get_intent_calls = []
requested_chains = []
@@ -653,6 +656,9 @@ def test_confirm_direct_transfer_uses_erc20_transfer_without_wallet_binding(monk
metadata={},
)
confirmed_intent = PaymentIntentRecord(**{**intent.__dict__, "status": "confirmed"})
# Production get_intent attaches user_id at runtime; the confirmation
# response must ignore non-dataclass attributes when rebuilding the intent.
setattr(intent, "user_id", "user-1")
intents = [intent, confirmed_intent]
rest_calls = []