trufflesuite / drizzle-legacy

Reactive Ethereum datastore for dapp UIs.
http://truffleframework.com/docs/drizzle/getting-started
MIT License
503 stars 128 forks source link

Usage with uport #54

Closed tayzlor closed 5 years ago

tayzlor commented 6 years ago

Can you use this in conjunction with uport? As uport injects its own web3 instance?

eccentricexit commented 6 years ago

@tayzlor did you manage to do it?

barlock commented 5 years ago

So far I've determined that no, it's not currently possible.

The things in the way are:

  1. uport-connect uses web3 < 1.0. This will change when uport-connect releases v1.0.0.

  2. drizzle doesn't easily support constom providers, you can pretty easily hack that though.... window.web3 = { currentProvider: new Provider(...) };

  3. uport-connect's provider seems to be incompatible with drizzle. As best I can tell, drizzle expects either a websocket from ganache or metamask. You would need to get feature parity with probably metamask to make uport work. A uPort dev suggested that maybe using Metamask's provider engine and reimplementing their own provider would likely do the trick.

OnlyOneJMJQ commented 5 years ago

@tayzlor @barlock addressed this quite well. We do plan to more easily support custom providers in the future (especially relevant for hardware wallets), but uPort's in particular will need to upgrade to support websockets.

barlock commented 5 years ago

Is there an issue to track custom providers?