From aba49897f9f2e145b7615504ae7564d4907a61b1 Mon Sep 17 00:00:00 2001 From: nymkappa <1612910616@pm.me> Date: Thu, 30 Mar 2023 17:07:34 +0900 Subject: [PATCH] Fix infinite scroll transaction list component --- .../transactions-list/transactions-list.component.html | 6 +++++- .../transactions-list/transactions-list.component.ts | 9 +-------- 2 files changed, 6 insertions(+), 9 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 cb54e1870..adadf0a1c 100644 --- a/frontend/src/app/components/transactions-list/transactions-list.component.html +++ b/frontend/src/app/components/transactions-list/transactions-list.component.html @@ -1,3 +1,5 @@ +
+
-
+
{{ errorUnblinded }}
@@ -321,6 +323,8 @@ +
+ {{ item.value / pow(10, assetsMinimal[item.asset][3]) | number: '1.' + assetsMinimal[item.asset][3] + '-' + assetsMinimal[item.asset][3] }} {{ assetsMinimal[item.asset][1] }}
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 b71046f68..53ddb449c 100644 --- a/frontend/src/app/components/transactions-list/transactions-list.component.ts +++ b/frontend/src/app/components/transactions-list/transactions-list.component.ts @@ -182,14 +182,7 @@ export class TransactionsListComponent implements OnInit, OnChanges { } onScroll(): void { - const scrollHeight = document.body.scrollHeight; - const scrollTop = document.documentElement.scrollTop; - if (scrollHeight > 0) { - const percentageScrolled = scrollTop * 100 / scrollHeight; - if (percentageScrolled > 50) { - this.loadMore.emit(); - } - } + this.loadMore.emit(); } haveBlindedOutputValues(tx: Transaction): boolean {