From 0bb1b7bf1cc506d8a841b29d3ac52253292cc7aa Mon Sep 17 00:00:00 2001 From: VoR0220 Date: Fri, 11 May 2018 11:27:27 -0500 Subject: [PATCH] attempting to craft the onReady bit...I think this works? Signed-off-by: VoR0220 --- js/embark.js | 4 +++- templates/demo/app/dapp.js | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/js/embark.js b/js/embark.js index 912ab4157..1d2fec12f 100644 --- a/js/embark.js +++ b/js/embark.js @@ -1,4 +1,6 @@ -var EmbarkJS = {}; +var EmbarkJS = { + onReady: __embarkContext.execWhenReady +}; EmbarkJS.isNewWeb3 = function() { var _web3 = new Web3(); diff --git a/templates/demo/app/dapp.js b/templates/demo/app/dapp.js index 5c5f121aa..a598da263 100644 --- a/templates/demo/app/dapp.js +++ b/templates/demo/app/dapp.js @@ -21,7 +21,7 @@ class App extends React.Component { } componentDidMount(){ - __embarkContext.execWhenReady(() => { + EmbarkJS.onReady(() => { if (EmbarkJS.isNewWeb3()) { EmbarkJS.Messages.Providers.whisper.getWhisperVersion((err, version) => { if(!err)