Commit f99a4a4f authored by Pieterjan Vanhoof's avatar Pieterjan Vanhoof Committed by GitHub

Merge pull request #259 from stratisproject/ui

Remove to/from from transaction details
parents 22459cad a80a81de
export class TransactionInfo { export class TransactionInfo {
constructor(transactionType: string, transactionId: string, transactionAmount: number, transactionAddress: any, transactionFee: number, transactionConfirmedInBlock: number, transactionTimestamp: number) { constructor(transactionType: string, transactionId: string, transactionAmount: number, transactionFee: number, transactionConfirmedInBlock: number, transactionTimestamp: number) {
this.transactionType = transactionType; this.transactionType = transactionType;
this.transactionId = transactionId; this.transactionId = transactionId;
this.transactionAmount = transactionAmount; this.transactionAmount = transactionAmount;
this.transactionAddress = transactionAddress;
this.transactionFee = transactionFee; this.transactionFee = transactionFee;
this.transactionConfirmedInBlock = transactionConfirmedInBlock; this.transactionConfirmedInBlock = transactionConfirmedInBlock;
this.transactionTimestamp = transactionTimestamp; this.transactionTimestamp = transactionTimestamp;
...@@ -13,7 +12,6 @@ export class TransactionInfo { ...@@ -13,7 +12,6 @@ export class TransactionInfo {
public transactionType: string; public transactionType: string;
public transactionId: string; public transactionId: string;
public transactionAmount: number; public transactionAmount: number;
public transactionAddress: string;
public transactionFee: number; public transactionFee: number;
public transactionConfirmedInBlock?: number; public transactionConfirmedInBlock?: number;
public transactionTimestamp: number; public transactionTimestamp: number;
......
...@@ -132,18 +132,12 @@ export class DashboardComponent implements OnInit { ...@@ -132,18 +132,12 @@ export class DashboardComponent implements OnInit {
} }
let transactionId = transaction.id; let transactionId = transaction.id;
let transactionAmount = transaction.amount; let transactionAmount = transaction.amount;
let transactionAddress;
if (transaction.payments[0]) {
transactionAddress = transaction.payments[0].destinationAddress;
} else if (transaction.toAddress) {
transactionAddress = transaction.toAddress;
}
let transactionFee = transaction.fee; let transactionFee = transaction.fee;
let transactionConfirmedInBlock = transaction.confirmedInBlock; let transactionConfirmedInBlock = transaction.confirmedInBlock;
let transactionTimestamp = transaction.timestamp; let transactionTimestamp = transaction.timestamp;
let transactionConfirmed; let transactionConfirmed;
this.transactionArray.push(new TransactionInfo(transactionType, transactionId, transactionAmount, transactionAddress, transactionFee, transactionConfirmedInBlock, transactionTimestamp)); this.transactionArray.push(new TransactionInfo(transactionType, transactionId, transactionAmount, transactionFee, transactionConfirmedInBlock, transactionTimestamp));
} }
} }
......
...@@ -88,18 +88,12 @@ export class HistoryComponent { ...@@ -88,18 +88,12 @@ export class HistoryComponent {
} }
let transactionId = transaction.id; let transactionId = transaction.id;
let transactionAmount = transaction.amount; let transactionAmount = transaction.amount;
let transactionAddress;
if (transaction.payments[0]) {
transactionAddress = transaction.payments[0].destinationAddress;
} else if (transaction.toAddress) {
transactionAddress = transaction.toAddress;
}
let transactionFee = transaction.fee; let transactionFee = transaction.fee;
let transactionConfirmedInBlock = transaction.confirmedInBlock; let transactionConfirmedInBlock = transaction.confirmedInBlock;
let transactionTimestamp = transaction.timestamp; let transactionTimestamp = transaction.timestamp;
let transactionConfirmed; let transactionConfirmed;
this.transactions.push(new TransactionInfo(transactionType, transactionId, transactionAmount, transactionAddress, transactionFee, transactionConfirmedInBlock, transactionTimestamp)); this.transactions.push(new TransactionInfo(transactionType, transactionId, transactionAmount, transactionFee, transactionConfirmedInBlock, transactionTimestamp));
} }
} }
......
...@@ -15,11 +15,6 @@ ...@@ -15,11 +15,6 @@
<li *ngIf="transaction.transactionType == 'received'" class="list-inline-item col-9 blockText text-success">{{ transaction.transactionAmount | coinNotation }} {{ coinUnit }}</li> <li *ngIf="transaction.transactionType == 'received'" class="list-inline-item col-9 blockText text-success">{{ transaction.transactionAmount | coinNotation }} {{ coinUnit }}</li>
<li *ngIf="transaction.transactionType == 'sent'" class="list-inline-item col-9 blockText text-danger">-{{ transaction.transactionAmount | coinNotation }} {{ coinUnit }}</li> <li *ngIf="transaction.transactionType == 'sent'" class="list-inline-item col-9 blockText text-danger">-{{ transaction.transactionAmount | coinNotation }} {{ coinUnit }}</li>
</ul> </ul>
<ul class="list-inline row">
<li *ngIf="transaction.transactionType == 'received'" class="list-inline-item col blockLabel">From</li>
<li *ngIf="transaction.transactionType == 'sent'" class="list-inline-item col blockLabel">To</li>
<li class="list-inline-item col-9 blockText"><code>{{ transaction.transactionAddress }}</code></li>
</ul>
<ul class="list-inline row"> <ul class="list-inline row">
<li class="list-inline-item col blockLabel">Date</li> <li class="list-inline-item col blockLabel">Date</li>
<li class="list-inline-item col-9 blockText">{{ transaction.transactionTimestamp * 1000 | date:'medium' }}</li> <li class="list-inline-item col-9 blockText">{{ transaction.transactionTimestamp * 1000 | date:'medium' }}</li>
......
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