Get duration in human time
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import Component from '@glimmer/component';
|
||||
import { tracked } from '@glimmer/tracking';
|
||||
import { inject as service } from '@ember/service';
|
||||
import moment from 'moment';
|
||||
|
||||
export default class ConfirmedInComponent extends Component {
|
||||
@service kredits;
|
||||
@@ -20,4 +21,10 @@ export default class ConfirmedInComponent extends Component {
|
||||
// A new block is mined every 30 seconds on average
|
||||
return this.confirmedInBlocks * 30;
|
||||
}
|
||||
|
||||
get confirmedInHumanTime () {
|
||||
console.debug(this.confirmedInBlocks);
|
||||
console.debug(this.confirmedInSeconds);
|
||||
return moment.duration(this.confirmedInSeconds, "seconds").humanize();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user