-
Notifications
You must be signed in to change notification settings - Fork 442
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
Add convenience init for Web3HttpProvider #717
Add convenience init for Web3HttpProvider #717
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.
We're still in our way to include swiftlint checks within ci/cd pipeline, so those checks are yet made manually by us.
public init( | ||
url: URL, | ||
network: Networks, | ||
keystoreManager: KeystoreManager? = nil | ||
) { |
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.
These style doesn't match with all the other code in our project, please format it in more swift way, like init attributes should be in one line and open curly brackets should follow them
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.
done e893cb3
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.
@yaroslavyaroslav For large long functions and inits I'd break them into multiple lines.
E.g. for the init?
of Web3HttpProvider
:
public init?(_ httpProviderURL: URL,
network net: Networks? = nil,
keystoreManager: KeystoreManager? = nil) async {
...
}
instead of what we currently have.
@rinat-enikeev Nothing to change for you in this PR, just raising commenting on this topic.
Summary of Changes
Adds the ability to initialise
Web3HttpProvider
sync and non optionally.Test Data or Screenshots
Motivation: no need to make init sync and optional if client is sure the network provider is working.
By submitting this pull request, you are confirming the following:
develop
branch.