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

fix: provider connect method accept options #1388

Merged
merged 19 commits into from
Nov 5, 2023
Merged

Conversation

LuizAsFight
Copy link
Contributor

@LuizAsFight LuizAsFight commented Oct 31, 2023

I can create a Provider passing custom client options with

const provider = await Provider.create(url, { fetch: customFetch });

but when connecting to a new network url, we cannot pass the options anymore

await provider.connect(newNetworkUrl);

this PR aims to

  • allow connect method to receive options

Closes #1396

Copy link
Contributor

github-actions bot commented Oct 31, 2023

This PR is published in NPM with version 0.0.0-pr-1388-20231103191640

Copy link
Contributor

github-actions bot commented Oct 31, 2023

Coverage report

St.
Category Percentage Covered / Total
🟢 Statements
85.95% (-0.02% 🔻)
5725/6661
🟡 Branches
69.17% (-0.03% 🔻)
846/1223
🟡 Functions
75.71% (-0.08% 🔻)
932/1231
🟢 Lines
85.96% (-0.02% 🔻)
5469/6362
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🟡
... / provider.ts
58.7% (-0.43% 🔻)
52.24% (-0.07% 🔻)
51.72% (-1.72% 🔻)
60.09% (-0.45% 🔻)

Test suite run success

1368 tests passing in 248 suites.

Report generated by 🧪jest coverage report action from 590d16f

packages/providers/src/provider.ts Outdated Show resolved Hide resolved
@Dhaiwat10 Dhaiwat10 self-assigned this Nov 3, 2023
@Dhaiwat10
Copy link
Contributor

Thanks @LuizAsFight, I'll get this one over the line

@Dhaiwat10 Dhaiwat10 added the feat Issue is a feature label Nov 3, 2023
@Dhaiwat10 Dhaiwat10 marked this pull request as ready for review November 3, 2023 19:19
@Dhaiwat10 Dhaiwat10 enabled auto-merge (squash) November 3, 2023 19:23
@arboleya arboleya self-assigned this Nov 5, 2023
@arboleya arboleya dismissed luizstacio’s stale review November 5, 2023 11:41

The requested change was addressed.

@Dhaiwat10 Dhaiwat10 merged commit fe579dc into master Nov 5, 2023
@Dhaiwat10 Dhaiwat10 deleted the lf/fix/provider-options branch November 5, 2023 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat Issue is a feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Accept ProviderOptions via Provider.connect
5 participants