attempting to craft the onReady bit...I think this works?
Signed-off-by: VoR0220 <catalanor0220@gmail.com>
This commit is contained in:
parent
9e1778f62c
commit
0bb1b7bf1c
|
@ -1,4 +1,6 @@
|
||||||
var EmbarkJS = {};
|
var EmbarkJS = {
|
||||||
|
onReady: __embarkContext.execWhenReady
|
||||||
|
};
|
||||||
|
|
||||||
EmbarkJS.isNewWeb3 = function() {
|
EmbarkJS.isNewWeb3 = function() {
|
||||||
var _web3 = new Web3();
|
var _web3 = new Web3();
|
||||||
|
|
|
@ -21,7 +21,7 @@ class App extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount(){
|
componentDidMount(){
|
||||||
__embarkContext.execWhenReady(() => {
|
EmbarkJS.onReady(() => {
|
||||||
if (EmbarkJS.isNewWeb3()) {
|
if (EmbarkJS.isNewWeb3()) {
|
||||||
EmbarkJS.Messages.Providers.whisper.getWhisperVersion((err, version) => {
|
EmbarkJS.Messages.Providers.whisper.getWhisperVersion((err, version) => {
|
||||||
if(!err)
|
if(!err)
|
||||||
|
|
Loading…
Reference in New Issue