Skip to content

Commit

Permalink
feat: Change timeout conditions when broadcasting transactions (#461)
Browse files Browse the repository at this point in the history
  • Loading branch information
jinoosss authored Apr 8, 2024
1 parent 16609da commit c750383
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ export interface ApproveInjectionLoadingProps {
}

const INTERVAL_DURATION = 500;
const TIMEOUT_DEFAULT = 0; // milliseconds

export const ApproveInjectionLoading: React.FC<ApproveInjectionLoadingProps> = ({
wait = 1000,
timeout = 5000,
timeout = TIMEOUT_DEFAULT,
done,
onResponse,
onTimeout,
Expand All @@ -34,7 +35,7 @@ export const ApproveInjectionLoading: React.FC<ApproveInjectionLoadingProps> = (
}
}

if (tick > timeout) {
if (timeout !== 0 && tick > timeout) {
onTimeout();
clearInterval(interval);
return;
Expand Down

0 comments on commit c750383

Please sign in to comment.