Tighten payment tx validation before submit

This commit is contained in:
2569718930@qq.com
2026-05-29 12:11:19 +08:00
parent 618bac8b57
commit 1d9f0033a6
5 changed files with 145 additions and 2 deletions
@@ -549,6 +549,8 @@ export function usePaymentFlow(params: UsePaymentFlowParams) {
const txHashNorm = String(txHash || "").toLowerCase();
setLastTxHash(txHashNorm);
setLastPaymentStartedAt(Date.now());
setPaymentInfo(`交易已提交: ${shortAddress(txHashNorm)},等待链上回执...`);
await waitForReceipt(txHashNorm, eth);
const submitRes = await fetch(`/api/payments/intents/${intentId}/submit`, {
method: "POST", headers: authHeaders, body: JSON.stringify({ tx_hash: txHashNorm, from_address: payingWallet }),