MCPcopy Index your code
hub / github.com/BlueWallet/BlueWallet / fetch

Function fetch

util/fetch.ts:6–14  ·  view source on GitHub ↗
(input: RequestInfo | URL, init: RequestInit & { timeout?: number } = {})

Source from the content-addressed store, hash-verified

4const nativeFetch = globalThis.fetch.bind(globalThis);
5
6export function fetch(input: RequestInfo | URL, init: RequestInit & { timeout?: number } = {}): Promise<Response> {
7 if (__DEV__) {
8 console.log('fetch wrapper: ', input, init);
9 }
10 const { timeout = DEFAULT_TIMEOUT, ...rest } = init;
11 const controller = new AbortController();
12 const timer = setTimeout(() => controller.abort(), timeout);
13 return nativeFetch(input, { ...rest, signal: controller.signal }).finally(() => clearTimeout(timer));
14}

Callers 15

fetchGetMethod · 0.90
redeemMethod · 0.90
createAccountMethod · 0.90
payInvoiceMethod · 0.90
getUserInvoicesMethod · 0.90
addInvoiceMethod · 0.90
authorizeMethod · 0.90
refreshAcessTokenMethod · 0.90
fetchBtcAddressMethod · 0.90
fetchTransactionsMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected