wait for latest block to eensure web3 object is ready
This commit is contained in:
parent
f4789d0d60
commit
679609aef8
|
@ -147,10 +147,10 @@ export default class Subspace {
|
|||
};
|
||||
}
|
||||
|
||||
// TO FIX: this line makes everything explode
|
||||
// It's supposed to obtain the current balance immediatly
|
||||
// callFn();
|
||||
|
||||
this.web3.getBlock('latest').then(block => {
|
||||
callFn();
|
||||
});
|
||||
|
||||
this.callables.push(callFn);
|
||||
|
||||
return sub.pipe(distinctUntilChanged((a, b) => equal(a, b)));
|
||||
|
|
Loading…
Reference in New Issue