Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from "./network.fetch";
export * from "./network.fake";
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Pretend this is the real network request to avoid having to run a server on http://localhost:3000/ as required by network.fetch.ts
export const get = async (_url: Url) => {
await new Promise(resolve => setTimeout(resolve, 4000*Math.random()));
if (Math.random() < 0.2) throw new Error("Failed to fetch rates!!");
return { RPC: {
RPC: 1,
IMC: Math.random(),
WPU: Math.random(),
DRG: Math.random(),
ZKL: 0,
} };
};