Skip to content
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

Merged
merged 8 commits into from
Oct 23, 2023

Conversation

livingrockrises
Copy link
Contributor

@livingrockrises livingrockrises commented Oct 11, 2023

Summary

Related Issue: # (issue number)

Change Type

  • Bug Fix
  • Refactor
  • New Feature
  • Breaking Change
  • Documentation Update
  • Performance Improvement
  • Other

Checklist

  • My code follows this project's style guidelines
  • I've reviewed my own code
  • I've added comments for any hard-to-understand areas
  • I've updated the documentation if necessary
  • My changes generate no new warnings
  • I've added tests that prove my fix is effective or my feature works
  • All unit tests pass locally with my changes
  • Any dependent changes have been merged and published

Additional Information

Branch Naming

Copy link
Contributor

@AmanRaj1608 AmanRaj1608 left a 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> => {
Copy link
Collaborator

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

Copy link
Contributor

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);

Copy link
Collaborator

@tomarsachin2271 tomarsachin2271 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@AmanRaj1608
Copy link
Contributor

Reverted the last commit as per discussion with @livingrockrises
The concern is user might not have the funding id in case of token paymaster and it will result in error.

@livingrockrises livingrockrises merged commit def6384 into development Oct 23, 2023
2 checks passed
@Aboudjem Aboudjem deleted the feat/userop-status branch November 2, 2023 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants