Cleanup
This commit is contained in:
@@ -112,7 +112,7 @@ export default Service.extend({
|
||||
|
||||
totalSupply: computed(function() {
|
||||
return this.kredits.Token.functions.totalSupply().then(total => {
|
||||
return Promise.resolve(formatKredits(total));
|
||||
return formatKredits(total);
|
||||
})
|
||||
}),
|
||||
|
||||
|
||||
@@ -1,14 +1,6 @@
|
||||
import { computed } from '@ember/object';
|
||||
import ethers from 'npm:ethers';
|
||||
//import formatKredits from 'kredits-web/utils/format-kredits.js';
|
||||
|
||||
function formatKredits(value, options) {
|
||||
let etherValue = ethers.utils.formatEther(value);
|
||||
if (!options.decimals) {
|
||||
etherValue = parseInt(etherValue).toString();
|
||||
}
|
||||
return etherValue;
|
||||
}
|
||||
import formatKredits from 'kredits-web/utils/format-kredits';
|
||||
|
||||
export default function(dependentKey, options = {}) {
|
||||
return computed(dependentKey, {
|
||||
|
||||
Reference in New Issue
Block a user