MCPcopy Create free account
hub / github.com/Tron521/codex-console-temp / fetchSelectedAccountInbox

Function fetchSelectedAccountInbox

static/js/payment.js:1275–1295  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1273}
1274
1275async function fetchSelectedAccountInbox() {
1276 const accountId = Number(document.getElementById("account-select")?.value || 0);
1277 const email = getSelectedAccountEmail();
1278 if (!accountId || !email) {
1279 toast.warning("请先选择账号");
1280 return;
1281 }
1282 toast.info(`正在查询 ${email} 收件箱...`);
1283 try {
1284 const result = await api.post(`/accounts/${accountId}/inbox-code`, {});
1285 if (result?.success && result?.code) {
1286 const code = String(result.code).trim();
1287 copyToClipboard(code);
1288 toast.success(`${email} 最新验证码: ${code}(已复制)`, 8000);
1289 return;
1290 }
1291 toast.error(`查询失败: ${result?.error || "未收到验证码"}`);
1292 } catch (error) {
1293 toast.error(`查询失败: ${formatErrorMessage(error)}`);
1294 }
1295}
1296
1297function stopVendorProgressPolling() {
1298 if (!vendorProgressState.timer) return;

Callers

nothing calls this directly

Calls 8

getSelectedAccountEmailFunction · 0.85
copyToClipboardFunction · 0.85
formatErrorMessageFunction · 0.85
warningMethod · 0.80
infoMethod · 0.80
successMethod · 0.80
errorMethod · 0.80
postMethod · 0.45

Tested by

no test coverage detected