(tradeHash: string)
| 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 () => { |
no test coverage detected