Open jklepatch opened 4 years ago
I stumbled upon 2 problems:
When we create web3 contract instances, we don't have any address available yet for the from
field. Can Web3 send calls with no from
field? Otherwise we could use a dummy address.
When we call connectWallet()
, we need to wait for the saga of the web3 initialization to resolve. We could have a re-try loop for that:
let attempts = 0;
while(true) {
if(attempts > 4) throw new Error('connect wallet failed');
if(typeof web3 !== 'undefined') {
yield delay(10);
attempts++;
next;
}
// rest of connect wallet saga
break;
}
https://github.com/trufflesuite/drizzle/issues/20