Skip to content

Commit

Permalink
Skip retry for registered wallets
Browse files Browse the repository at this point in the history
Signed-off-by: Parthib Datta <[email protected]>
  • Loading branch information
ptdatta committed Jun 24, 2024
1 parent 6e5e75b commit cb10ef4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion typescript/src/lib/utils/backoff.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,9 @@ export function backoffRetrier<T>(
retries: number,
backoffStepMs: number = 1000,
logger: ExecutionLoggerFn = console.debug,
errorMatcher: ErrorMatcherFn = retryAll
errorMatcher: ErrorMatcherFn = skipRetryWhenMatched([
"Wallet with the given ID has not been registered",
])
): RetrierFn<T> {
return async (fn: () => Promise<T>): Promise<T> => {
for (let attempt = 0; attempt < retries; attempt++) {
Expand Down

0 comments on commit cb10ef4

Please sign in to comment.