From 0812ff346752b1564e4325ec4ffa8813ed1612b0 Mon Sep 17 00:00:00 2001 From: bumi Date: Wed, 4 Apr 2018 14:02:27 +0200 Subject: [PATCH] Add comment about ethProvider loading. It is loaded in the route and thus available for the rest of the application. --- app/services/kredits.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/services/kredits.js b/app/services/kredits.js index b1edc3c..2ac2ec3 100644 --- a/app/services/kredits.js +++ b/app/services/kredits.js @@ -31,6 +31,8 @@ export default Service.extend({ ethProvider: null, currentUserAccounts: null, // default to not having an account. this is the wen web3 is loaded. + // this is called called in the routes beforeModel(). So it is initialized before everything else + // and we can rely on the ethProvider and the potential currentUserAccounts to be available initEthProvider: function() { return new Ember.RSVP.Promise((resolve, reject) => { let ethProvider;