MCPcopy Create free account
hub / github.com/0xProject/0x-examples / fetchStatus

Function fetchStatus

gasless-v2-headless-example/index.ts:259–269  ·  view source on GitHub ↗
(tradeHash: string)

Source from the content-addressed store, hash-verified

257
258 // 5. Check trade status
259 async function fetchStatus(tradeHash: string) {
260 const url =
261 "https://api.0x.org/gasless/status/" +
262 tradeHash +
263 "?" +
264 "chainId=" +
265 client.chain.id.toString();
266
267 const response = await fetch(url, { headers });
268 return fetchJsonOrThrow(response);
269 }
270
271 async function fetchStatusPeriodically(tradeHash: string) {
272 const intervalId = setInterval(async () => {

Callers 2

fetchStatusPeriodicallyFunction · 0.85
waitForStatusMethod · 0.85

Calls 1

fetchJsonOrThrowFunction · 0.85

Tested by

no test coverage detected