diff --git a/frontend/components/account/__tests__/paymentSecurity.test.ts b/frontend/components/account/__tests__/paymentSecurity.test.ts index f68265fc..075c9f19 100644 --- a/frontend/components/account/__tests__/paymentSecurity.test.ts +++ b/frontend/components/account/__tests__/paymentSecurity.test.ts @@ -53,17 +53,28 @@ export function runTests() { const hookSource = fs.existsSync(hookPath) ? fs.readFileSync(hookPath, "utf8") : ""; + const paymentFlowPath = path.join( + projectRoot, + "components", + "account", + "usePaymentFlow.ts", + ); + const paymentFlowSource = fs.existsSync(paymentFlowPath) + ? fs.readFileSync(paymentFlowPath, "utf8") + : ""; // The receiver validation now lives in the extracted hook file (called // from createManualPaymentIntent and createIntentAndPay). assert( accountCenterSource.includes("assertExpectedPaymentReceiver") || - hookSource.includes("assertExpectedPaymentReceiver"), + hookSource.includes("assertExpectedPaymentReceiver") || + paymentFlowSource.includes("assertExpectedPaymentReceiver"), "AccountCenter must validate backend-returned manual payment receiver before displaying it", ); assert( accountCenterSource.includes("EXPECTED_PAYMENT_RECEIVER_ADDRESS") || - hookSource.includes("EXPECTED_PAYMENT_RECEIVER_ADDRESS"), + hookSource.includes("EXPECTED_PAYMENT_RECEIVER_ADDRESS") || + paymentFlowSource.includes("EXPECTED_PAYMENT_RECEIVER_ADDRESS"), "AccountCenter must show the pinned payment receiver address in its payment guard", ); diff --git a/frontend/components/account/__tests__/paymentShell.test.ts b/frontend/components/account/__tests__/paymentShell.test.ts index 14473880..cf590466 100644 --- a/frontend/components/account/__tests__/paymentShell.test.ts +++ b/frontend/components/account/__tests__/paymentShell.test.ts @@ -39,6 +39,9 @@ export function runTests() { "wallet.ts", "payment-utils.ts", "usePaymentState.ts", + "useWalletBind.ts", + "usePaymentFlow.ts", + "useBilling.ts", ] .map((file) => fs.readFileSync(path.join(accountDir, file), "utf8")) .join("\n");