Commit 4aa14b7c authored by dev0tion's avatar dev0tion

Show history

parent c8fc92fb
...@@ -18,16 +18,18 @@ export class HistoryComponent { ...@@ -18,16 +18,18 @@ export class HistoryComponent {
private errorMessage: string; private errorMessage: string;
ngOnInit() { ngOnInit() {
this.getWalletHistory(); this.getHistory();
} }
private getWalletHistory() { private getHistory() {
let walletInfo = new WalletInfo(this.globalService.getWalletName(), this.globalService.getCoinType()) let walletInfo = new WalletInfo(this.globalService.getWalletName(), this.globalService.getCoinType())
this.apiService.getWalletHistory(walletInfo) this.apiService.getWalletHistory(walletInfo)
.subscribe( .subscribe(
response => { response => {
if (response.status >= 200 && response.status < 400) { if (response.status >= 200 && response.status < 400) {
this.transactions = response.json().transactions; if (response.json().transactions.length > 0) {
this.transactions = response.json().transactions;
}
} }
}, },
error => { error => {
......
.navbar {
height: 100px;
width: 100%;
margin: 0;
padding: 0;
}
<nav class="navbar navbar-fixed-top"> <nav class="navbar navbar-toggleable-sm navbar-fixed-top navbar-light bg-faded ">
<div class="container"> <div class="container">
<a class="navbar-brand">Breeze</a> <ul class="navbar-nav mr-auto" routerLinkActive="active">
<dashboard-component></dashboard-component> <li class="nav-item"><a class="nav-link" routerLink="dashboard">Dashboard</a></li>
<ul class="nav navbar-nav" routerLinkActive="active"> <li class="nav-item"><a class="nav-link" routerLink="send">Send</a></li>
<li class="nav-item"><a class="nav-link" routerLink="send">Send</a></li> <li class="nav-item"><a class="nav-link" routerLink="receive">Receive</a></li>
<li class="nav-item"><a class="nav-link" routerLink="receive">Receive</a></li> <li class="nav-item"><a class="nav-link" routerLink="history">History</a></li>
<li class="nav-item"><a class="nav-link" routerLink="history">History</a></li> <li class="nav-item"><a class="nav-link" (click)="logOut()">Logout</a></li>
<li class="nav-item"><a class="nav-link" (click)="logOut()">Logout</a></li> </ul>
</ul> <div class="navbar-brand">Breeze</div>
</div> </div>
</nav> </nav>
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