Skip to content

Commit

Permalink
Added a delay to the retry mechanism in getRegisteredStealthKeys
Browse files Browse the repository at this point in the history
  • Loading branch information
jferas committed Mar 26, 2024
1 parent a7ff51c commit 2f0d54b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions frontend/src/store/wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,9 @@ async function getRegisteredStealthKeys(account: string, provider: Provider) {
} catch (err) {
window.logger.warn(err);
retryCounter++;
if (retryCounter < 3) {
await new Promise((resolve) => setTimeout(resolve, 2000)); // Wait for 2 seconds
}
}
}
return null;
Expand Down

0 comments on commit 2f0d54b

Please sign in to comment.