Commit 77c95831 authored by dev0tion's avatar dev0tion

Add fee amount to transaction balance

parent 59b01923
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
<li class="list-inline-item col-4 amount text-left align-baseline"> <li class="list-inline-item col-4 amount text-left align-baseline">
<span *ngIf="transaction.transactionType == 'received'" class="text-success">+</span> <span *ngIf="transaction.transactionType == 'received'" class="text-success">+</span>
<span *ngIf="transaction.transactionType == 'sent'" class="text-danger">-</span> <span *ngIf="transaction.transactionType == 'sent'" class="text-danger">-</span>
{{ transaction.transactionAmount | coinNotation }} {{ transaction.transactionAmount + transaction.transactionFee | coinNotation }}
<small class="text-uppercase">{{ coinUnit }}</small> <small class="text-uppercase">{{ coinUnit }}</small>
<span *ngIf="transaction.transactionConfirmedInBlock" class="badge badge-success text-capitalize">Confirmed</span> <span *ngIf="transaction.transactionConfirmedInBlock" class="badge badge-success text-capitalize">Confirmed</span>
<span *ngIf="!transaction.transactionConfirmedInBlock" class="badge badge-warning text-capitalize">Pending</span> <span *ngIf="!transaction.transactionConfirmedInBlock" class="badge badge-warning text-capitalize">Pending</span>
......
...@@ -134,7 +134,12 @@ export class DashboardComponent implements OnInit { ...@@ -134,7 +134,12 @@ export class DashboardComponent implements OnInit {
} }
let transactionId = transaction.id; let transactionId = transaction.id;
let transactionAmount = transaction.amount; let transactionAmount = transaction.amount;
let transactionFee = transaction.fee; let transactionFee;
if (transaction.fee) {
transactionFee = transaction.fee;
} else {
transactionFee = 0;
}
let transactionConfirmedInBlock = transaction.confirmedInBlock; let transactionConfirmedInBlock = transaction.confirmedInBlock;
let transactionTimestamp = transaction.timestamp; let transactionTimestamp = transaction.timestamp;
let transactionConfirmed; let transactionConfirmed;
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
<li class="list-inline-item col-4 amount text-left align-baseline"> <li class="list-inline-item col-4 amount text-left align-baseline">
<span *ngIf="transaction.transactionType == 'received'" class="text-success">+</span> <span *ngIf="transaction.transactionType == 'received'" class="text-success">+</span>
<span *ngIf="transaction.transactionType == 'sent'" class="text-danger">-</span> <span *ngIf="transaction.transactionType == 'sent'" class="text-danger">-</span>
{{ transaction.transactionAmount | coinNotation }} {{ transaction.transactionAmount + transaction.transactionFee | coinNotation }}
<small class="text-uppercase"> {{ coinUnit }} </small> <small class="text-uppercase"> {{ coinUnit }} </small>
<span *ngIf="transaction.transactionConfirmedInBlock" class="badge badge-success text-capitalize">Confirmed</span> <span *ngIf="transaction.transactionConfirmedInBlock" class="badge badge-success text-capitalize">Confirmed</span>
<span *ngIf="!transaction.transactionConfirmedInBlock" class="badge badge-warning text-capitalize">Pending</span> <span *ngIf="!transaction.transactionConfirmedInBlock" class="badge badge-warning text-capitalize">Pending</span>
......
...@@ -89,7 +89,12 @@ export class HistoryComponent { ...@@ -89,7 +89,12 @@ export class HistoryComponent {
} }
let transactionId = transaction.id; let transactionId = transaction.id;
let transactionAmount = transaction.amount; let transactionAmount = transaction.amount;
let transactionFee = transaction.fee; let transactionFee;
if (transaction.fee) {
transactionFee = transaction.fee;
} else {
transactionFee = 0;
}
let transactionConfirmedInBlock = transaction.confirmedInBlock; let transactionConfirmedInBlock = transaction.confirmedInBlock;
let transactionTimestamp = transaction.timestamp; let transactionTimestamp = transaction.timestamp;
let transactionConfirmed; let transactionConfirmed;
......
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