INNER CODE UNIT · TypeScript

Promise

0xinevitable/bento · adapters/bnb/index.ts:110

  await new Promise((resolve) => setTimeout(resolve, 2000));
  return new Promise<K>((resolve, reject) => {
    promise
      .then((res) => resolve(res))
      .catch((error) => {
        console.error(n, error.message);
        if (error instanceof AxiosError) {
          retry(n + 1, promise)
            .then(resolve)
            .catch(reject);
        }
      });
  });
};

export const getAccount: ChainGetAccount = async (account) => {
  const items = await Promise.all([
    bnbChain.getBalance(account),

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…