Skip to content

web3 instantiation #1

@phoniks

Description

@phoniks

On the first run, I got the following error: Uncaught TypeError: _web2.default is not a constructor

After digging around a bit I was able to overcome it by replacing this:
web3 = new Web3(window.web3.currentProvider); on line 15 of /src/web3.js

with this:
web3 = new Web3.providers.QtSyncProvider();

As I'm new to dApps I'm still learning how web3 works, so I can't say I understand the effect of the change or whether it's a valid solution to this problem. Any ideas as to why the error occurs and how to properly fix it?

I suppose, more specifically, the purpose of this code seems to be to "Instantiate new web3 local instance" according to the notation. What is a "local" vs a "remote" instance of web3? I notice that the other provider available is the HttpProvider (as opposed to QtSyncProvider), so am I correct in assuming that Http = remote and QtSync = local?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions