Extract kredits module
This commit is contained in:
@@ -7,7 +7,7 @@ export default Route.extend({
|
||||
beforeModel(transition) {
|
||||
const kredits = this.get('kredits');
|
||||
|
||||
return kredits.initEthProvider().then(() => {
|
||||
return kredits.setup().then(() => {
|
||||
if (kredits.get('accountNeedsUnlock')) {
|
||||
if (confirm('It looks like you have an Ethereum wallet available. Please unlock your account.')) {
|
||||
transition.retry();
|
||||
|
||||
+1
-2
@@ -9,8 +9,7 @@ export default Ember.Route.extend({
|
||||
newContributor.set('kind', 'person');
|
||||
|
||||
let kredits = this.get('kredits');
|
||||
let totalSupply = kredits.get('tokenContract')
|
||||
.then((contract) => contract.totalSupply());
|
||||
let totalSupply = kredits.get('kredits').Token.functions.totalSupply();
|
||||
|
||||
return Ember.RSVP.hash({
|
||||
contributors: kredits.getContributors(),
|
||||
|
||||
Reference in New Issue
Block a user