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

Rename default options #730

Merged
merged 2 commits into from
Jan 16, 2023
Merged

Rename default options #730

merged 2 commits into from
Jan 16, 2023

Conversation

janndriessen
Copy link
Collaborator

Summary of Changes

Fixes #728

  • Renames defaultOptions to defaultTransaction on multiple ENS-related classes.
By submitting this pull request, you are confirming the following:
  • I have reviewed the Contribution Guidelines.
  • I have performed a self-review of my own code.
  • I have updated my repository to match the develop branch.
  • I have included test data or screenshots that prove my fix is effective or that my feature works.
  • I have checked that all tests work and swiftlint is not throwing any errors/warnings.

@@ -107,7 +106,7 @@ public class ENS {
guard isAddrSupports else {
throw Web3Error.processingError(desc: "Address isn't supported")
}
var options = options ?? defaultOptions
var options = options ?? defaultTransaction
Copy link
Collaborator

Choose a reason for hiding this comment

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

It's better now than it was before that's for sure but the API of class ENS that has functions which accept transactions by the name options is just making things look weird.
I'm accepting this PR and will create a new issue that must be handled in v4.0 to alter that API and rename all options to transaction at least.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Was thinking the same when I saw it and thought, unfortunately, I can't change it without breaking the API. 😅

@yaroslavyaroslav yaroslavyaroslav merged commit 434b4cf into web3swift-team:develop Jan 16, 2023
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.

ETHRegistrarController: rename variable defaultOptions to transaction
3 participants