Skip to content

Commit

Permalink
chore: update delay and retryTimes
Browse files Browse the repository at this point in the history
  • Loading branch information
perfogic committed Sep 9, 2024
1 parent f34ee97 commit 2c98d20
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions helper/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@ export const getAddressByEIP191 = async (isSwitchWallet?: boolean) => {
return accounts[0].address;
};

export const retryOrbs = async (fn, retryTimes = 10, delay = 1000) => {
export const retryOrbs = async (fn, retryTimes = 30, delay = 1000) => {
try {
return await fn();
} catch (error) {
Expand All @@ -651,7 +651,7 @@ export const retryOrbs = async (fn, retryTimes = 10, delay = 1000) => {
return;
}
if (message?.includes("No working liteservers")) {
await sleep(delay);
await sleep(delay * 2);
return await retryOrbs(fn, retryTimes, delay);
}
await sleep(delay * 5);
Expand Down

0 comments on commit 2c98d20

Please sign in to comment.