Use real numbers for supply and contrib count
This commit is contained in:
+3
-1
@@ -6,7 +6,9 @@ export default Ember.Route.extend({
|
||||
|
||||
model() {
|
||||
return Ember.RSVP.hash({
|
||||
contributors: this.get('kredits').getContributors()
|
||||
contributors: this.get('kredits').getContributors(),
|
||||
totalSupply: this.get('kredits').getValueFromContract('totalSupply'),
|
||||
contributorsCount: this.get('kredits').getValueFromContract('contributorsCount')
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -40,11 +40,6 @@ export default Ember.Service.extend({
|
||||
return contract;
|
||||
}.property('web3'),
|
||||
|
||||
totalSupply: function() {
|
||||
return 23000;
|
||||
// return this.get('kreditsContract').totalSupply();
|
||||
}.property('kreditsContract'),
|
||||
|
||||
getValueFromContract(contractMethod, ...args) {
|
||||
return new Ember.RSVP.Promise((resolve, reject) => {
|
||||
this.get('kreditsContract')[contractMethod](...args, (err, data) => {
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
{{contributor-list contributors=model.contributors}}
|
||||
|
||||
<p class="stats">
|
||||
<span class="number">{{kredits.totalSupply}}</span> kredits issued and distributed among
|
||||
<span class="number">{{kredits.contributorsCount}}</span> contributors.
|
||||
<span class="number">{{model.totalSupply}}</span> kredits issued and distributed among
|
||||
<span class="number">{{model.contributorsCount}}</span> contributors.
|
||||
</p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
Reference in New Issue
Block a user