fix: harden GoPay and 5sim PR paths

This commit is contained in:
QLHazyCoder
2026-05-03 15:14:31 +08:00
parent 29093e08db
commit 61e9b40d85
8 changed files with 134 additions and 35 deletions
+10 -7
View File
@@ -910,13 +910,16 @@
const target = Number.isInteger(frameId)
? await sendGoPayFrameCommand(tabId, frameId, targetMessageType, {})
: await sendGoPayCommand(tabId, targetMessageType, {});
const rect = target?.rect || null;
if (!target?.found || !rect || !Number.isFinite(rect.centerX) || !Number.isFinite(rect.centerY)) {
return { clicked: false, reason: 'target_not_found', clickTarget: target?.target || '' };
}
await clickWithDebugger(tabId, rect);
return { clicked: true, clickTarget: target.target || '' };
}
const rect = target?.rect || null;
if (!target?.found || !rect || !Number.isFinite(rect.centerX) || !Number.isFinite(rect.centerY)) {
return { clicked: false, reason: 'target_not_found', clickTarget: target?.target || '' };
}
if (Number.isInteger(frameId)) {
return { clicked: false, reason: 'debugger_click_skipped_for_frame_target', clickTarget: target.target || '' };
}
await clickWithDebugger(tabId, rect);
return { clicked: true, clickTarget: target.target || '' };
}
async function clickGoPayContinueWithDebugger(tabId, frameId = null) {