makoto / blockparty

NO BLOCK NO PARTY
MIT License
164 stars 41 forks source link

Mist #4

Closed makoto closed 8 years ago

makoto commented 8 years ago

Here is the main point of making your dapp "Mist ready"

  1. check if mist or web3 object is already defined by mist.
  2. If yes, keep the existing provider info, then re-instantiate web3 using Web3, which comes from your Dapp. Make sure you do not re-define the variable(eg: var web3).
  3. If no, you instantiate provider and define web3 object.