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

feat: fetch call status via bundler url #5171

Merged
merged 6 commits into from
Sep 18, 2024
Merged

Conversation

ganchoradkov
Copy link
Member

@ganchoradkov ganchoradkov commented Jul 10, 2024

Description

Implemented functionality in universal-provider where if bundler name is provided, it will do a http call to get the status instead of sending the request to the wallet. If bundler name is not provided then the request is sent to the wallet

based on #4649

Type of change

  • Chore (non-breaking change that addresses non-functional tasks, maintenance, or code quality improvements)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Draft PR (breaking/non-breaking change which needs more work for having a proper functionality [Mark this PR as ready to review only when completely ready])
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

How has this been tested?

tests

Checklist

  • I have performed a self-review of my own code
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

Copy link
Contributor

@Cali93 Cali93 left a comment

Choose a reason for hiding this comment

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

LGTM, left some minor suggestions.

Comment on lines +49 to +50
case "wallet_getCallsStatus":
return (await this.getCallStatus(args)) as unknown as T;
Copy link
Contributor

Choose a reason for hiding this comment

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

Wouldn't this result in a unhandled promise rejection if the call throws ?

Copy link
Member Author

Choose a reason for hiding this comment

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

no, it as http calls are try/catched. Only if the request can't be sent to thte wallet and/or is rejected by the wallet it would throw

Copy link
Member

@arein arein left a comment

Choose a reason for hiding this comment

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

how was this tested?

Copy link
Member

@arein arein left a comment

Choose a reason for hiding this comment

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

This doesn't work with strict content-security-policies where arbitrary Bundler URLs cannot be called. That's why we need the Wallet Service. I'd expect some mention around these problems somewhere

@ganchoradkov ganchoradkov merged commit b54b309 into v2.0 Sep 18, 2024
9 checks passed
@ganchoradkov ganchoradkov deleted the feat/bundler-proxy branch September 18, 2024 07:28
This was referenced Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants