From 2757aaa20e0305599fd72fc29c4b8e1048120fe7 Mon Sep 17 00:00:00 2001 From: sairajzero Date: Sat, 16 Nov 2019 19:36:11 +0530 Subject: [PATCH] bug fix : removing async sleep --- index.html | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/index.html b/index.html index 756aea2..767136c 100644 --- a/index.html +++ b/index.html @@ -6031,7 +6031,7 @@ return new Promise(resolve => setTimeout(resolve, ms)); } - async function onLoadStartUp() { + function onLoadStartUp() { myPrivKey = prompt("Enter Private Key : ") myPubKey = floCrypto.getPubKeyHex(myPrivKey) myFloID = floCrypto.getFloIDfromPubkeyHex(myPubKey) @@ -6049,10 +6049,11 @@ setInterval(refreshBlockchainData, 3600000); floSupernode.initSupernode(serverPwd, myFloID).then(result => { console.log(result) - await sleep(5000) - connectToAllBackupSupernode().then(result => { - console.log(result) - reactor.dispatchEvent("indicate_supernode_up",myFloID) + sleep(5000).then( _ => { + connectToAllBackupSupernode().then(result => { + console.log(result) + reactor.dispatchEvent("indicate_supernode_up",myFloID) + }) }) }) })