Commit d550e128 authored by dev0tion's avatar dev0tion

Add transaction fee to send confirmation

parent 5deb9d0f
...@@ -20,6 +20,10 @@ ...@@ -20,6 +20,10 @@
<li class="list-inline-item col blockLabel">Amount</li> <li class="list-inline-item col blockLabel">Amount</li>
<li class="list-inline-item col-9 blockText text-danger">-{{ transaction.amount | number:'1.8-8' }} {{ coinUnit }}</li> <li class="list-inline-item col-9 blockText text-danger">-{{ transaction.amount | number:'1.8-8' }} {{ coinUnit }}</li>
</ul> </ul>
<ul class="list-inline row">
<li class="list-inline-item col blockLabel">Fee</li>
<li class="list-inline-item col-9 blockText text-danger">-{{ transactionFee }} {{ coinUnit }}</li>
</ul>
<ul class="list-inline row"> <ul class="list-inline row">
<li class="list-inline-item col blockLabel">Destination</li> <li class="list-inline-item col blockLabel">Destination</li>
<li class="list-inline-item col blockText mt-2"><code>{{ transaction.destinationAddress }}</code></li> <li class="list-inline-item col blockText mt-2"><code>{{ transaction.destinationAddress }}</code></li>
......
...@@ -4,6 +4,8 @@ import { NgbModal, NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; ...@@ -4,6 +4,8 @@ import { NgbModal, NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
import { GlobalService } from '../../../shared/services/global.service'; import { GlobalService } from '../../../shared/services/global.service';
import { CoinNotationPipe } from '../../../shared/pipes/coin-notation.pipe';
@Component({ @Component({
selector: 'app-send-confirmation', selector: 'app-send-confirmation',
templateUrl: './send-confirmation.component.html', templateUrl: './send-confirmation.component.html',
...@@ -12,6 +14,7 @@ import { GlobalService } from '../../../shared/services/global.service'; ...@@ -12,6 +14,7 @@ import { GlobalService } from '../../../shared/services/global.service';
export class SendConfirmationComponent implements OnInit { export class SendConfirmationComponent implements OnInit {
@Input() transaction: any; @Input() transaction: any;
@Input() transactionFee: any;
constructor(private globalService: GlobalService, public activeModal: NgbActiveModal) { } constructor(private globalService: GlobalService, public activeModal: NgbActiveModal) { }
public showDetails: boolean = false; public showDetails: boolean = false;
...@@ -19,6 +22,8 @@ export class SendConfirmationComponent implements OnInit { ...@@ -19,6 +22,8 @@ export class SendConfirmationComponent implements OnInit {
ngOnInit() { ngOnInit() {
this.coinUnit = this.globalService.getCoinUnit(); this.coinUnit = this.globalService.getCoinUnit();
this.transactionFee = new CoinNotationPipe(this.globalService).transform(this.transactionFee);
this.transaction.amount = +this.transaction.amount + +this.transactionFee;
} }
toggleDetails() { toggleDetails() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment