From 137f9ae8bf1d4106f755b576cb9c92aa4afd332a Mon Sep 17 00:00:00 2001 From: Michael Bumann Date: Wed, 3 Apr 2019 20:06:40 +0200 Subject: [PATCH] Add Kredits preflight checks This should identify potential config issues and print a usefull error message. e.g. if ipfs is not available. --- app/routes/application.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/routes/application.js b/app/routes/application.js index 2c633b0..114b1a7 100644 --- a/app/routes/application.js +++ b/app/routes/application.js @@ -8,6 +8,10 @@ export default Route.extend({ const kredits = this.kredits; return kredits.setup().then(() => { + kredits.get('kredits').preflightChecks().catch((error) => { + console.error('Kredits preflight check failed!'); + console.error(error); + }); if (kredits.get('accountNeedsUnlock')) { if (confirm('It looks like you have an Ethereum wallet available. Please unlock your account.')) { transition.retry();