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

web3 instance error: Variable used within its own initial value #310

Closed
AlleniCode opened this issue Mar 18, 2021 · 2 comments
Closed

web3 instance error: Variable used within its own initial value #310

AlleniCode opened this issue Mar 18, 2021 · 2 comments

Comments

@AlleniCode
Copy link

AlleniCode commented Mar 18, 2021

web3 instance error: Variable used within its own initial value

My code:

func getETHBalance() {
        let endpoint = "https://some.endpoint"
        let web3 = web3(provider: Web3HttpProvider(URL(string: endpoint)!)!)
        
    }

From web3 instance: https://github.com/skywinder/web3swift/blob/master/Documentation/Usage.md#web3-instance

QQ20210318-0

@rehatkathuria
Copy link

This looks like a naming issue. Try replacing the following: let web3 with let client.

@AlleniCode
Copy link
Author

This looks like a naming issue. Try replacing the following: let web3 with let client.

OK, Thanks♪(・ω・)ノ

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

No branches or pull requests

3 participants