Removed timeout

This commit is contained in:
Richard Ramos 2018-04-27 11:47:35 -04:00
parent c8effb7dcb
commit dbb640642b
1 changed files with 8 additions and 10 deletions

View File

@ -21,30 +21,28 @@ class App extends React.Component {
}
componentDidMount(){
let _this = this;
setTimeout(() => {
__embarkContext.execWhenReady(() => {
if (EmbarkJS.isNewWeb3()) {
EmbarkJS.Messages.Providers.whisper.getWhisperVersion(function(err, version){
EmbarkJS.Messages.Providers.whisper.getWhisperVersion((err, version) => {
if(!err)
_this.setState({whisperEnabled: true})
this.setState({whisperEnabled: true})
else
console.log(err);
});
} else {
if (EmbarkJS.Messages.providerName === 'whisper') {
EmbarkJS.Messages.getWhisperVersion(function(err, version) {
EmbarkJS.Messages.getWhisperVersion((err, version) => {
if(!err)
_this.setState({whisperEnabled: true})
this.setState({whisperEnabled: true})
else
console.log(err);
});
}
}
}, 500);
this.setState({
storageEnabled: true
this.setState({
storageEnabled: true
});
});
}