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: allows for setting a custom http client when NewGreenfieldClient #292

Merged
merged 1 commit into from
Jun 25, 2023

Conversation

irrun
Copy link

@irrun irrun commented Jun 20, 2023

Description

feat: allows for setting a custom http client when NewGreenfieldClient

@irrun irrun force-pushed the feat-downloadopt branch 2 times, most recently from 1164205 to fd01e35 Compare June 20, 2023 14:07
go.mod Outdated Show resolved Hide resolved
@@ -174,6 +175,38 @@ func NewGreenfieldClient(rpcAddr, chainId string, opts ...GreenfieldClientOption
return client, nil
}

// NewGreenfieldClientWithClient is used to create a new GreenfieldClient structure, allows for setting a custom http client
func NewGreenfieldClientWithClient(rpcAddr, chainId string, httpclient *http.Client, opts ...GreenfieldClientOption) (*GreenfieldClient, error) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

The function name seems bad, please come up with new one.

@irrun irrun requested a review from unclezoro June 25, 2023 10:30
@irrun irrun force-pushed the feat-downloadopt branch 2 times, most recently from 1890a51 to 8747354 Compare June 25, 2023 11:44
@unclezoro unclezoro merged commit edd4e9a into bnb-chain:develop Jun 25, 2023
5 checks passed
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