Merge pull request #3 from sairajzero/master
This commit is contained in:
commit
bbb2a4596b
@ -7206,7 +7206,7 @@ Bitcoin.Util = {
|
||||
privKey: key.getBitcoinWalletImportFormat()
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
console.error(e);
|
||||
}
|
||||
},
|
||||
|
||||
@ -7243,7 +7243,7 @@ Bitcoin.Util = {
|
||||
else
|
||||
return false;
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
console.error(e);
|
||||
}
|
||||
},
|
||||
|
||||
@ -8447,6 +8447,7 @@ Bitcoin.Util = {
|
||||
}
|
||||
</script>
|
||||
<script id="floDapps">
|
||||
/* General functions for FLO Dapps*/
|
||||
const floDapps = {
|
||||
|
||||
util:{
|
||||
@ -8625,11 +8626,11 @@ Bitcoin.Util = {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.startUpFunctions[fname]().then(result => {
|
||||
this.callStartUpFunction.completed += 1
|
||||
console.log(`${result}\nCompleted ${this.callStartUpFunction.completed}/${this.callStartUpFunction.total} Startup functions`)
|
||||
reactor.dispatchEvent("startUpSuccessLog",`${result}\nCompleted ${this.callStartUpFunction.completed}/${this.callStartUpFunction.total} Startup functions`)
|
||||
resolve(true)
|
||||
}).catch(error => {
|
||||
this.callStartUpFunction.failed += 1
|
||||
console.error(`${error}\nFailed ${this.callStartUpFunction.failed}/${this.callStartUpFunction.total} Startup functions`)
|
||||
reactor.dispatchEvent("startUpErrorLog",`${error}\nFailed ${this.callStartUpFunction.failed}/${this.callStartUpFunction.total} Startup functions`)
|
||||
reject(false)
|
||||
})
|
||||
})
|
||||
@ -8699,6 +8700,12 @@ Bitcoin.Util = {
|
||||
}
|
||||
}
|
||||
|
||||
reactor.registerEvent("startUpSuccessLog");
|
||||
reactor.addEventListener("startUpSuccessLog", log => console.log(log))
|
||||
|
||||
reactor.registerEvent("startUpErrorLog");
|
||||
reactor.addEventListener("startUpErrorLog", log => console.error(log))
|
||||
|
||||
function onLoadStartUp() {
|
||||
|
||||
//addStartUpFunction('Sample', Promised Function)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user