From 0f72030d5e56164f15e109931ecf94dcc8a38a96 Mon Sep 17 00:00:00 2001 From: softsimon Date: Tue, 29 Sep 2020 15:05:52 +0700 Subject: [PATCH] Enhancement: "Load more" is now "Load all" fixes #117 --- .../transactions-list.component.html | 12 +++++----- .../transactions-list.component.ts | 24 +++---------------- 2 files changed, 9 insertions(+), 27 deletions(-) diff --git a/frontend/src/app/components/transactions-list/transactions-list.component.html b/frontend/src/app/components/transactions-list/transactions-list.component.html index 833eb014a..5a5fbac13 100644 --- a/frontend/src/app/components/transactions-list/transactions-list.component.html +++ b/frontend/src/app/components/transactions-list/transactions-list.component.html @@ -17,7 +17,7 @@
- + - + @@ -73,7 +73,7 @@
@@ -61,9 +61,9 @@
- +
- + - + diff --git a/frontend/src/app/components/transactions-list/transactions-list.component.ts b/frontend/src/app/components/transactions-list/transactions-list.component.ts index 9c1cf454b..adc33e8b4 100644 --- a/frontend/src/app/components/transactions-list/transactions-list.component.ts +++ b/frontend/src/app/components/transactions-list/transactions-list.component.ts @@ -51,8 +51,8 @@ export class TransactionsListComponent implements OnInit, OnChanges { } const observableObject = {}; this.transactions.forEach((tx, i) => { - tx['@voutLength'] = 10; - tx['@vinLength'] = 10; + tx['@voutLimit'] = true; + tx['@vinLimit'] = true; if (this.outspends[i]) { return; } @@ -88,28 +88,10 @@ export class TransactionsListComponent implements OnInit, OnChanges { this.stateService.viewFiat$.next(oldvalue); } - trackByFn(index: number, tx: Transaction) { + trackByFn(index: number, tx: Transaction): string { return tx.txid + tx.status.confirmed; } - loadMoreVin(tx: Transaction) { - tx['@vinLength'] += 10; - this.ref.markForCheck(); - } - - loadMoreVout(tx: Transaction) { - tx['@voutLength'] += 10; - this.ref.markForCheck(); - } - - getFilteredTxVin(tx: Transaction) { - return tx.vin.slice(0, tx['@vinLength']); - } - - getFilteredTxVout(tx: Transaction) { - return tx.vout.slice(0, tx['@voutLength']); - } - trackByIndexFn(index: number) { return index; }
{{ vout.scriptpubkey_address | shortenString : 16 }} @@ -111,9 +111,9 @@
- +