Skip to content
This repository has been archived by the owner on Mar 3, 2021. It is now read-only.

initiate provider #1325

Merged
merged 2 commits into from
Nov 12, 2019
Merged

initiate provider #1325

merged 2 commits into from
Nov 12, 2019

Conversation

Aniket-Engg
Copy link
Collaborator

To resolve the error in running test file using remix-tests through CLI

@@ -44,8 +44,10 @@ commander
log.info('verbosity level set to ' + commander.verbose.blue)
}
let web3 = new Web3()
let provider = new Provider()
Copy link
Collaborator

Choose a reason for hiding this comment

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

As you are not reassigning the web3 and provider object you can use const

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

@@ -44,8 +44,10 @@ commander
log.info('verbosity level set to ' + commander.verbose.blue)
}
let web3 = new Web3()
let provider = new Provider()
await provider.init()
web3.setProvider(provider)
// web3.setProvider(new web3.providers.HttpProvider('http://localhost:8545'))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Remove comments if you're not using it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

@Aniket-Engg
Copy link
Collaborator Author

I see with this, eth_accounts is running twice @iurimatias

@Aniket-Engg
Copy link
Collaborator Author

I see even without these changes, eth_accounts runs twice.

@Aniket-Engg Aniket-Engg merged commit b44aa54 into master Nov 12, 2019
@Aniket-Engg Aniket-Engg deleted the remix-tests-CLI-issue branch November 12, 2019 16:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants