Show confirmation ETA for proposed reimbursements

This commit is contained in:
Râu Cao
2023-01-11 14:19:03 +08:00
parent 6c7de97e38
commit 662e76979b
4 changed files with 36 additions and 18 deletions
+1 -9
View File
@@ -1,20 +1,12 @@
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;
@tracked confirmedAtBlock = null;
constructor(confirmedAtBlock) {
super(...arguments);
this.confirmedAtBlock = confirmedAtBlock;
}
get confirmedInBlocks () {
return this.confirmedAtBlock - this.kredits.currentBlock;
return this.args.confirmedAtBlock - this.kredits.currentBlock;
}
get confirmedInSeconds () {
+1
View File
@@ -0,0 +1 @@
Confirming in <strong>{{this.confirmedInBlocks}}</strong> blocks (~ {{this.confirmedInHumanTime}})