Add Kredits preflight checks

This should identify potential config issues and print a usefull error
message. e.g. if ipfs is not available.
This commit is contained in:
2019-04-03 20:06:40 +02:00
parent e44a8efa4a
commit 137f9ae8bf
+4
View File
@@ -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();