hooked-web3-provider icon indicating copy to clipboard operation
hooked-web3-provider copied to clipboard

Symbol unvailable: suggest for replacement

Open hacktar opened this issue 9 years ago • 5 comments

We are using hooked provider and lightwallet libs for our mobile wallet LETH (https://github.com/inzhoop-co/LETH) and we find some issues using Symbol on android devices.

In hooked-web3-provider.js 
row 49: ... requests[Symbol.iterator]() ...

Symbol is unvailable for more devices so we suggest a fix with a replacement using forEach, like this :

requests.forEach(function(request) {
   if (request.method == "eth_sendTransaction") {
       throw new Error("HookedWeb3Provider does not support synchronous transactions. Please provide a callback.");
}

Look at our version on github for complete file: https://github.com/inzhoop-co/LETH/blob/master/www/lib/thirdparty/hooked-web3-provider.js

Great work!

hacktar avatar Feb 24 '16 11:02 hacktar

Also seems to fail on safari browsers ( tested on v 8.0.8 )

sponnet avatar Mar 06 '16 01:03 sponnet

And I also tested this modification - it also works on safari

sponnet avatar Mar 06 '16 01:03 sponnet

Just faced the same problem using Firefox for Linux and Safari.

danielnovy avatar Apr 24 '16 15:04 danielnovy

Note that we solved this problem using the link above... Please Let us know if this also solves yours. Thx

sponnet avatar Apr 24 '16 15:04 sponnet

Thanks @sponnet, it does work for my cases as well.

danielnovy avatar Apr 24 '16 16:04 danielnovy