-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
setup: devs can optionally just rely on biconomy_getUserOpStatus #315
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -105,27 +133,83 @@ export class Bundler implements IBundler { | |||
userOpHash: sendUserOperationResponse.result, | |||
wait: (confirmations?: number): Promise<UserOpReceipt> => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Give a default value of confirmations = 0 in the method
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the logic is already like this, so if confirmations is not defined or 0 it will just resolve and send back receipt
if (confirmations) {
const latestBlock = await provider.getBlockNumber();
const confirmedBlocks = latestBlock - userOpResponse.receipt.blockNumber;
if (confirmations >= confirmedBlocks) {
clearInterval(intervalId);
resolve(userOpResponse);
}
}
clearInterval(intervalId);
resolve(userOpResponse);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
Reverted the last commit as per discussion with @livingrockrises |
Summary
Related Issue: # (issue number)
Change Type
Checklist
Additional Information
Branch Naming