launcher: use edut id verification retry codes
Some checks are pending
check / launcher (push) Waiting to run
Some checks are pending
check / launcher (push) Waiting to run
This commit is contained in:
parent
e94aca6283
commit
923650e570
@ -1133,14 +1133,21 @@ async function onCheckoutConfirm() {
|
|||||||
|
|
||||||
async function confirmCheckoutWithRetry(maxAttempts = 8, intervalMs = 2500) {
|
async function confirmCheckoutWithRetry(maxAttempts = 8, intervalMs = 2500) {
|
||||||
let lastErr = null;
|
let lastErr = null;
|
||||||
|
const retryableCodes = new Set([
|
||||||
|
"tx_verification_failed",
|
||||||
|
"edut_id_verification_failed",
|
||||||
|
"membership_verification_failed",
|
||||||
|
]);
|
||||||
for (let attempt = 1; attempt <= maxAttempts; attempt += 1) {
|
for (let attempt = 1; attempt <= maxAttempts; attempt += 1) {
|
||||||
try {
|
try {
|
||||||
const out = await onCheckoutConfirm();
|
const out = await onCheckoutConfirm();
|
||||||
return out;
|
return out;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
lastErr = err;
|
lastErr = err;
|
||||||
|
const code = String(err?.payload?.code || "").trim().toLowerCase();
|
||||||
const message = String(err || "");
|
const message = String(err || "");
|
||||||
if (!message.includes("tx verification pending/failed")
|
if (!retryableCodes.has(code)
|
||||||
|
&& !message.includes("tx verification pending/failed")
|
||||||
&& !message.includes("edut id verification pending/failed")
|
&& !message.includes("edut id verification pending/failed")
|
||||||
&& !message.includes("membership verification pending/failed")) {
|
&& !message.includes("membership verification pending/failed")) {
|
||||||
throw err;
|
throw err;
|
||||||
|
|||||||
@ -30,6 +30,14 @@ Launcher integrates with EDUT web/backend contracts as follows:
|
|||||||
- `wallet_session_invalid`
|
- `wallet_session_invalid`
|
||||||
- `wallet_session_expired`
|
- `wallet_session_expired`
|
||||||
- `wallet_session_mismatch`
|
- `wallet_session_mismatch`
|
||||||
|
- `edut_id_required` (legacy alias `membership_required`)
|
||||||
|
- `edut_id_inactive` (legacy alias `membership_inactive`)
|
||||||
|
|
||||||
|
## Checkout Quote Compatibility
|
||||||
|
|
||||||
|
1. Launcher sends `include_edut_id_if_missing` as the canonical quote option field.
|
||||||
|
2. Launcher also sends `include_membership_if_missing` as a legacy compatibility alias.
|
||||||
|
3. Backend must treat both fields equivalently when present.
|
||||||
|
|
||||||
## Runtime Mode Signal
|
## Runtime Mode Signal
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user