PaulLaux / eth-hot-wallet

Ethereum wallet with erc20 support / web wallet - built using react, web3, eth-lightwallet
https://eth-hot-wallet.com/
MIT License
301 stars 188 forks source link

Update Web3 #18

Open drvillo opened 5 years ago

drvillo commented 5 years ago

Hi @PaulLaux we could potentially contribute a PR to update Web3 to 1.0 and I'd like to check if you had done any previous analysis on how that would work, considering both eth-lightwallet and hooked-web3-provider (and ethjs-provider-signer for that matter) depend on 0.20 or lower.

Any suggestion from your side?

PaulLaux commented 5 years ago

I did not try this with the wallet, but I don't think it's going to be a problem to simply update web3.js version.

web3.js requires a provider to work:

const provider = new SignerProvider(rpcAddress, {
        signTransaction: keystore.signTransaction.bind(keystore),
        accounts: (cb) => cb(null, keystore.getAddresses()),
      });

web3.setProvider(provider);

If we update web3, it will still rely on the same eth-lightwallet and ethjs-provider-signer which in turn relay internally on web3@0.20.

This is not optimal for bundle size but should work without additional changes. Unfortunately, web3.js tend to lag behind as a dependancy of dependency on many projects.