diff --git a/web-ui/src/app/components/address-details/address-details.component.html b/web-ui/src/app/components/address-details/address-details.component.html
index be32e951..3297a214 100644
--- a/web-ui/src/app/components/address-details/address-details.component.html
+++ b/web-ui/src/app/components/address-details/address-details.component.html
@@ -56,7 +56,12 @@
{{'label.transactions' | translate}}
-
+
{{index + 1}} |
@@ -72,11 +77,5 @@ {{'label.transactions' | translate}}
|
-
-
-
-
-
-
diff --git a/web-ui/src/app/components/address-details/address-details.component.ts b/web-ui/src/app/components/address-details/address-details.component.ts
index 672b9f51..38513094 100644
--- a/web-ui/src/app/components/address-details/address-details.component.ts
+++ b/web-ui/src/app/components/address-details/address-details.component.ts
@@ -1,4 +1,4 @@
-import { Component, OnInit } from '@angular/core';
+import { Component, OnInit, HostListener } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { Balance } from '../../models/balance';
@@ -6,6 +6,8 @@ import { AddressesService } from '../../services/addresses.service';
import { ErrorService } from '../../services/error.service';
import { LightWalletTransaction } from '../..//models/light-wallet-transaction';
+import { getNumberOfRowsForScreen } from '../../utils';
+
@Component({
selector: 'app-address-details',
templateUrl: './address-details.component.html',
@@ -17,7 +19,7 @@ export class AddressDetailsComponent implements OnInit {
addressString: string;
// pagination
- limit = 10;
+ limit = 30;
items: LightWalletTransaction[] = [];
constructor(
@@ -26,6 +28,8 @@ export class AddressDetailsComponent implements OnInit {
private errorService: ErrorService) { }
ngOnInit() {
+ const height = this.getScreenSize();
+ this.limit = getNumberOfRowsForScreen(height);
this.addressString = this.route.snapshot.paramMap.get('address');
this.addressesService.get(this.addressString).subscribe(
response => this.onAddressRetrieved(response),
@@ -47,10 +51,15 @@ export class AddressDetailsComponent implements OnInit {
this.addressesService
.getTransactionsV2(this.addressString, this.limit, lastSeenTxid, order)
- .do(response => this.items = this.items.concat(response.data))
+ .do(response => this.items.push(...response.data))
.subscribe();
}
+ @HostListener('window:resize', ['$event'])
+ private getScreenSize(_?): number {
+ return window.innerHeight;
+ }
+
private onError(response: any) {
this.errorService.renderServerErrors(null, response);
}