diff --git a/src/app/cln/on-chain/utxo-tables/utxos/utxos.component.ts b/src/app/cln/on-chain/utxo-tables/utxos/utxos.component.ts index 492de2a5..3f5dbaf9 100644 --- a/src/app/cln/on-chain/utxo-tables/utxos/utxos.component.ts +++ b/src/app/cln/on-chain/utxo-tables/utxos/utxos.component.ts @@ -81,7 +81,7 @@ export class CLNOnChainUtxosComponent implements OnInit, AfterViewInit, OnDestro this.errorMessage = !this.apiCallStatus.message ? '' : (typeof (this.apiCallStatus.message) === 'object') ? JSON.stringify(this.apiCallStatus.message) : this.apiCallStatus.message; } this.utxos = (this.isDustUTXO) ? utxosSeletor.utxos?.filter((utxo) => +(utxo.value || 0) < 1000) : utxosSeletor.utxos ? utxosSeletor.utxos : []; - if (this.utxos && this.utxos.length > 0 && this.sort && this.paginator) { + if (this.utxos && this.utxos.length > 0 && this.sort && this.paginator && this.displayedColumns.length > 0) { this.loadUTXOsTable(this.utxos); } this.logger.info(utxosSeletor); @@ -89,7 +89,7 @@ export class CLNOnChainUtxosComponent implements OnInit, AfterViewInit, OnDestro } ngAfterViewInit() { - if (this.utxos && this.utxos.length > 0 && this.sort && this.paginator) { + if (this.utxos && this.utxos.length > 0 && this.sort && this.paginator && this.displayedColumns.length > 0) { this.loadUTXOsTable(this.utxos); } } diff --git a/src/app/cln/routing/failed-transactions/failed-transactions.component.ts b/src/app/cln/routing/failed-transactions/failed-transactions.component.ts index 1c03c93f..e2c8648f 100644 --- a/src/app/cln/routing/failed-transactions/failed-transactions.component.ts +++ b/src/app/cln/routing/failed-transactions/failed-transactions.component.ts @@ -84,7 +84,7 @@ export class CLNFailedTransactionsComponent implements OnInit, AfterViewInit, On } this.totalFailedTransactions = ffhSeletor.failedForwardingHistory.totalForwards || 0; this.failedEvents = ffhSeletor.failedForwardingHistory.listForwards || []; - if (this.failedEvents.length > 0 && this.sort && this.paginator) { + if (this.failedEvents.length > 0 && this.sort && this.paginator && this.displayedColumns.length > 0) { this.loadFailedEventsTable(this.failedEvents); } this.logger.info(ffhSeletor); diff --git a/src/app/cln/routing/forwarding-history/forwarding-history.component.ts b/src/app/cln/routing/forwarding-history/forwarding-history.component.ts index 6a25a8a9..9601427a 100644 --- a/src/app/cln/routing/forwarding-history/forwarding-history.component.ts +++ b/src/app/cln/routing/forwarding-history/forwarding-history.component.ts @@ -90,7 +90,7 @@ export class CLNForwardingHistoryComponent implements OnInit, OnChanges, AfterVi if (this.eventsData.length <= 0 && fhSeletor.forwardingHistory.listForwards) { this.totalForwardedTransactions = fhSeletor.forwardingHistory.totalForwards || 0; this.successfulEvents = fhSeletor.forwardingHistory.listForwards || []; - if (this.successfulEvents.length > 0 && this.sort && this.paginator) { + if (this.successfulEvents.length > 0 && this.sort && this.paginator && this.displayedColumns.length > 0) { this.loadForwardingEventsTable(this.successfulEvents); } this.logger.info(fhSeletor); diff --git a/src/app/cln/routing/local-failed-transactions/local-failed-transactions.component.ts b/src/app/cln/routing/local-failed-transactions/local-failed-transactions.component.ts index c5d4d185..9ea274c8 100644 --- a/src/app/cln/routing/local-failed-transactions/local-failed-transactions.component.ts +++ b/src/app/cln/routing/local-failed-transactions/local-failed-transactions.component.ts @@ -85,7 +85,7 @@ export class CLNLocalFailedTransactionsComponent implements OnInit, AfterViewIni } this.totalLocalFailedTransactions = lffhSeletor.localFailedForwardingHistory.totalForwards || 0; this.failedLocalEvents = lffhSeletor.localFailedForwardingHistory.listForwards || []; - if (this.failedLocalEvents.length > 0 && this.sort && this.paginator) { + if (this.failedLocalEvents.length > 0 && this.sort && this.paginator && this.displayedColumns.length > 0) { this.loadLocalfailedLocalEventsTable(this.failedLocalEvents); } this.logger.info(lffhSeletor); diff --git a/src/app/cln/transactions/invoices/invoices-table/lightning-invoices-table.component.ts b/src/app/cln/transactions/invoices/invoices-table/lightning-invoices-table.component.ts index 4fc50913..ff0ca4fc 100644 --- a/src/app/cln/transactions/invoices/invoices-table/lightning-invoices-table.component.ts +++ b/src/app/cln/transactions/invoices/invoices-table/lightning-invoices-table.component.ts @@ -103,7 +103,7 @@ export class CLNLightningInvoicesTableComponent implements OnInit, AfterViewInit this.errorMessage = !this.apiCallStatus.message ? '' : (typeof (this.apiCallStatus.message) === 'object') ? JSON.stringify(this.apiCallStatus.message) : this.apiCallStatus.message; } this.invoiceJSONArr = invoicesSeletor.listInvoices.invoices || []; - if (this.invoiceJSONArr && this.invoiceJSONArr.length > 0 && this.sort && this.paginator) { + if (this.invoiceJSONArr && this.invoiceJSONArr.length > 0 && this.sort && this.paginator && this.displayedColumns.length > 0) { this.loadInvoicesTable(this.invoiceJSONArr); } this.logger.info(invoicesSeletor); @@ -120,7 +120,7 @@ export class CLNLightningInvoicesTableComponent implements OnInit, AfterViewInit } ngAfterViewInit() { - if (this.invoiceJSONArr && this.invoiceJSONArr.length > 0 && this.sort && this.paginator) { + if (this.invoiceJSONArr && this.invoiceJSONArr.length > 0 && this.sort && this.paginator && this.displayedColumns.length > 0) { this.loadInvoicesTable(this.invoiceJSONArr); } } diff --git a/src/app/cln/transactions/offers/offer-bookmarks-table/offer-bookmarks-table.component.ts b/src/app/cln/transactions/offers/offer-bookmarks-table/offer-bookmarks-table.component.ts index 556fd5dd..939eb9ed 100644 --- a/src/app/cln/transactions/offers/offer-bookmarks-table/offer-bookmarks-table.component.ts +++ b/src/app/cln/transactions/offers/offer-bookmarks-table/offer-bookmarks-table.component.ts @@ -80,7 +80,7 @@ export class CLNOfferBookmarksTableComponent implements OnInit, AfterViewInit, O this.errorMessage = !this.apiCallStatus.message ? '' : (typeof (this.apiCallStatus.message) === 'object') ? JSON.stringify(this.apiCallStatus.message) : this.apiCallStatus.message; } this.offersBookmarksJSONArr = offerBMsSeletor.offersBookmarks || []; - if (this.offersBookmarksJSONArr && this.offersBookmarksJSONArr.length > 0 && this.sort && this.paginator) { + if (this.offersBookmarksJSONArr && this.offersBookmarksJSONArr.length > 0 && this.sort && this.paginator && this.displayedColumns.length > 0) { this.loadOffersTable(this.offersBookmarksJSONArr); } this.logger.info(offerBMsSeletor); @@ -88,7 +88,7 @@ export class CLNOfferBookmarksTableComponent implements OnInit, AfterViewInit, O } ngAfterViewInit() { - if (this.offersBookmarksJSONArr && this.offersBookmarksJSONArr.length > 0 && this.sort && this.paginator) { + if (this.offersBookmarksJSONArr && this.offersBookmarksJSONArr.length > 0 && this.sort && this.paginator && this.displayedColumns.length > 0) { this.loadOffersTable(this.offersBookmarksJSONArr); } } diff --git a/src/app/cln/transactions/offers/offers-table/offers-table.component.ts b/src/app/cln/transactions/offers/offers-table/offers-table.component.ts index d6c2d5ea..33e53f3d 100644 --- a/src/app/cln/transactions/offers/offers-table/offers-table.component.ts +++ b/src/app/cln/transactions/offers/offers-table/offers-table.component.ts @@ -105,7 +105,7 @@ export class CLNOffersTableComponent implements OnInit, AfterViewInit, OnDestroy this.errorMessage = !this.apiCallStatus.message ? '' : (typeof (this.apiCallStatus.message) === 'object') ? JSON.stringify(this.apiCallStatus.message) : this.apiCallStatus.message; } this.offerJSONArr = offersSeletor.offers || []; - if (this.offerJSONArr && this.offerJSONArr.length > 0 && this.sort && this.paginator) { + if (this.offerJSONArr && this.offerJSONArr.length > 0 && this.sort && this.paginator && this.displayedColumns.length > 0) { this.loadOffersTable(this.offerJSONArr); } this.logger.info(offersSeletor); @@ -113,7 +113,7 @@ export class CLNOffersTableComponent implements OnInit, AfterViewInit, OnDestroy } ngAfterViewInit() { - if (this.offerJSONArr && this.offerJSONArr.length > 0 && this.sort && this.paginator) { + if (this.offerJSONArr && this.offerJSONArr.length > 0 && this.sort && this.paginator && this.displayedColumns.length > 0) { this.loadOffersTable(this.offerJSONArr); } } diff --git a/src/app/cln/transactions/payments/lightning-payments.component.ts b/src/app/cln/transactions/payments/lightning-payments.component.ts index 8afa2068..e0ad7f03 100644 --- a/src/app/cln/transactions/payments/lightning-payments.component.ts +++ b/src/app/cln/transactions/payments/lightning-payments.component.ts @@ -103,7 +103,7 @@ export class CLNLightningPaymentsComponent implements OnInit, AfterViewInit, OnD this.errorMessage = !this.apiCallStatus.message ? '' : (typeof (this.apiCallStatus.message) === 'object') ? JSON.stringify(this.apiCallStatus.message) : this.apiCallStatus.message; } this.paymentJSONArr = paymentsSeletor.payments || []; - if (this.paymentJSONArr.length && this.paymentJSONArr.length > 0 && this.sort && this.paginator) { + if (this.paymentJSONArr.length && this.paymentJSONArr.length > 0 && this.sort && this.paginator && this.displayedColumns.length > 0) { this.loadPaymentsTable(this.paymentJSONArr); } this.logger.info(paymentsSeletor); @@ -111,7 +111,7 @@ export class CLNLightningPaymentsComponent implements OnInit, AfterViewInit, OnD } ngAfterViewInit() { - if (this.paymentJSONArr.length && this.paymentJSONArr.length > 0 && this.sort && this.paginator) { + if (this.paymentJSONArr.length && this.paymentJSONArr.length > 0 && this.sort && this.paginator && this.displayedColumns.length > 0) { this.loadPaymentsTable(this.paymentJSONArr); } } diff --git a/src/app/eclair/peers-channels/channels/channels-tables/channel-open-table/channel-open-table.component.ts b/src/app/eclair/peers-channels/channels/channels-tables/channel-open-table/channel-open-table.component.ts index b8deb44a..3ea63612 100644 --- a/src/app/eclair/peers-channels/channels/channels-tables/channel-open-table/channel-open-table.component.ts +++ b/src/app/eclair/peers-channels/channels/channels-tables/channel-open-table/channel-open-table.component.ts @@ -88,7 +88,7 @@ export class ECLChannelOpenTableComponent implements OnInit, AfterViewInit, OnDe this.errorMessage = !this.apiCallStatus.message ? '' : (typeof (this.apiCallStatus.message) === 'object') ? JSON.stringify(this.apiCallStatus.message) : this.apiCallStatus.message; } this.activeChannels = allChannelsSelector.activeChannels; - if (this.activeChannels.length > 0 && this.sort && this.paginator) { + if (this.activeChannels.length > 0 && this.sort && this.paginator && this.displayedColumns.length > 0) { this.loadChannelsTable(); } this.logger.info(allChannelsSelector); @@ -108,7 +108,7 @@ export class ECLChannelOpenTableComponent implements OnInit, AfterViewInit, OnDe } ngAfterViewInit() { - if (this.activeChannels.length > 0 && this.sort && this.paginator) { + if (this.activeChannels.length > 0 && this.sort && this.paginator && this.displayedColumns.length > 0) { this.loadChannelsTable(); } } diff --git a/src/app/eclair/routing/forwarding-history/forwarding-history.component.ts b/src/app/eclair/routing/forwarding-history/forwarding-history.component.ts index 95ace53c..42ce1fce 100644 --- a/src/app/eclair/routing/forwarding-history/forwarding-history.component.ts +++ b/src/app/eclair/routing/forwarding-history/forwarding-history.component.ts @@ -79,7 +79,7 @@ export class ECLForwardingHistoryComponent implements OnInit, OnChanges, AfterVi this.errorMessage = !this.apiCallStatus.message ? '' : (typeof (this.apiCallStatus.message) === 'object') ? JSON.stringify(this.apiCallStatus.message) : this.apiCallStatus.message; } this.eventsData = paymentsSelector.payments && paymentsSelector.payments.relayed ? paymentsSelector.payments.relayed : []; - if (this.eventsData.length > 0 && this.sort && this.paginator) { + if (this.eventsData.length > 0 && this.sort && this.paginator && this.displayedColumns.length > 0) { this.loadForwardingEventsTable(this.eventsData); } this.logger.info(this.eventsData); diff --git a/src/app/eclair/transactions/invoices/lightning-invoices.component.ts b/src/app/eclair/transactions/invoices/lightning-invoices.component.ts index c81b2354..1d94458d 100644 --- a/src/app/eclair/transactions/invoices/lightning-invoices.component.ts +++ b/src/app/eclair/transactions/invoices/lightning-invoices.component.ts @@ -102,7 +102,7 @@ export class ECLLightningInvoicesComponent implements OnInit, AfterViewInit, OnD this.errorMessage = !this.apiCallStatus.message ? '' : (typeof (this.apiCallStatus.message) === 'object') ? JSON.stringify(this.apiCallStatus.message) : this.apiCallStatus.message; } this.invoiceJSONArr = (invoicesSelector.invoices && invoicesSelector.invoices.length > 0) ? invoicesSelector.invoices : []; - if (this.invoiceJSONArr && this.invoiceJSONArr.length > 0 && this.sort && this.paginator) { + if (this.invoiceJSONArr && this.invoiceJSONArr.length > 0 && this.sort && this.paginator && this.displayedColumns.length > 0) { this.loadInvoicesTable(this.invoiceJSONArr); } this.logger.info(invoicesSelector); @@ -119,7 +119,7 @@ export class ECLLightningInvoicesComponent implements OnInit, AfterViewInit, OnD } ngAfterViewInit() { - if (this.invoiceJSONArr && this.invoiceJSONArr.length > 0 && this.sort && this.paginator) { + if (this.invoiceJSONArr && this.invoiceJSONArr.length > 0 && this.sort && this.paginator && this.displayedColumns.length > 0) { this.loadInvoicesTable(this.invoiceJSONArr); } } diff --git a/src/app/eclair/transactions/payments/lightning-payments.component.ts b/src/app/eclair/transactions/payments/lightning-payments.component.ts index 4aa229c8..765ab375 100644 --- a/src/app/eclair/transactions/payments/lightning-payments.component.ts +++ b/src/app/eclair/transactions/payments/lightning-payments.component.ts @@ -103,7 +103,7 @@ export class ECLLightningPaymentsComponent implements OnInit, AfterViewInit, OnD this.errorMessage = !this.apiCallStatus.message ? '' : (typeof (this.apiCallStatus.message) === 'object') ? JSON.stringify(this.apiCallStatus.message) : this.apiCallStatus.message; } this.paymentJSONArr = (paymentsSeletor.payments && paymentsSeletor.payments.sent && paymentsSeletor.payments.sent.length > 0) ? paymentsSeletor.payments.sent : []; - if (this.paymentJSONArr.length > 0 && this.sort && this.paginator) { + if (this.paymentJSONArr.length > 0 && this.sort && this.paginator && this.displayedColumns.length > 0) { this.loadPaymentsTable(this.paymentJSONArr); } this.logger.info(paymentsSeletor); diff --git a/src/app/lnd/routing/non-routing-peers/non-routing-peers.component.ts b/src/app/lnd/routing/non-routing-peers/non-routing-peers.component.ts index cf4040f2..05987d79 100644 --- a/src/app/lnd/routing/non-routing-peers/non-routing-peers.component.ts +++ b/src/app/lnd/routing/non-routing-peers/non-routing-peers.component.ts @@ -80,7 +80,7 @@ export class NonRoutingPeersComponent implements OnInit, AfterViewInit, OnDestro } else { this.routingPeersData = []; } - if (this.routingPeersData.length > 0 && this.sort && this.paginator) { + if (this.routingPeersData.length > 0 && this.sort && this.paginator && this.displayedColumns.length > 0) { this.loadNonRoutingPeersTable(this.routingPeersData); } this.logger.info(fhSelector.apiCallStatus); diff --git a/src/app/lnd/transactions/invoices/lightning-invoices.component.ts b/src/app/lnd/transactions/invoices/lightning-invoices.component.ts index 9aa3f380..6eaafb4a 100644 --- a/src/app/lnd/transactions/invoices/lightning-invoices.component.ts +++ b/src/app/lnd/transactions/invoices/lightning-invoices.component.ts @@ -110,7 +110,7 @@ export class LightningInvoicesComponent implements OnInit, AfterViewInit, OnDest this.firstOffset = +(invoicesSelector.listInvoices.first_index_offset || -1); this.lastOffset = +(invoicesSelector.listInvoices.last_index_offset || -1); this.invoicesData = invoicesSelector.listInvoices.invoices || []; - if (this.invoicesData.length > 0 && this.sort && this.paginator) { + if (this.invoicesData.length > 0 && this.sort && this.paginator && this.displayedColumns.length > 0) { this.loadInvoicesTable(this.invoicesData); } this.logger.info(invoicesSelector); diff --git a/src/app/lnd/transactions/payments/lightning-payments.component.ts b/src/app/lnd/transactions/payments/lightning-payments.component.ts index 3ea38411..cc8abac6 100644 --- a/src/app/lnd/transactions/payments/lightning-payments.component.ts +++ b/src/app/lnd/transactions/payments/lightning-payments.component.ts @@ -109,7 +109,7 @@ export class LightningPaymentsComponent implements OnInit, AfterViewInit, OnDest this.totalPayments = this.paymentJSONArr.length; this.firstOffset = +(paymentsSelector.listPayments.first_index_offset || -1); this.lastOffset = +(paymentsSelector.listPayments.last_index_offset || -1); - if (this.paymentJSONArr && this.paymentJSONArr.length > 0 && this.sort && this.paginator) { + if (this.paymentJSONArr && this.paymentJSONArr.length > 0 && this.sort && this.paginator && this.displayedColumns.length > 0) { // this.loadPaymentsTable(this.paymentJSONArr); this.loadPaymentsTable(this.paymentJSONArr.slice(0, this.pageSize)); } diff --git a/src/app/shared/components/ln-services/boltz/swaps/swaps.component.ts b/src/app/shared/components/ln-services/boltz/swaps/swaps.component.ts index eb5828b8..d94dc846 100755 --- a/src/app/shared/components/ln-services/boltz/swaps/swaps.component.ts +++ b/src/app/shared/components/ln-services/boltz/swaps/swaps.component.ts @@ -60,7 +60,7 @@ export class BoltzSwapsComponent implements OnInit, AfterViewInit, OnChanges, On this.tableSettingSwapOut = settings.pageSettings.find((page) => page.pageId === this.PAGE_ID)?.tables.find((table) => table.tableId === this.tableSettingSwapOut.tableId) || LND_DEFAULT_PAGE_SETTINGS.find((page) => page.pageId === this.PAGE_ID)?.tables.find((table) => table.tableId === this.tableSettingSwapOut.tableId)!; this.tableSettingSwapIn = settings.pageSettings.find((page) => page.pageId === this.PAGE_ID)?.tables.find((table) => table.tableId === this.tableSettingSwapIn.tableId) || LND_DEFAULT_PAGE_SETTINGS.find((page) => page.pageId === this.PAGE_ID)?.tables.find((table) => table.tableId === this.tableSettingSwapIn.tableId)!; this.setTableColumns(); - if (this.swapsData && this.swapsData.length > 0 && this.sort && this.paginator) { + if (this.swapsData && this.swapsData.length > 0 && this.sort && this.paginator && this.displayedColumns.length > 0) { this.loadSwapsTable(this.swapsData); } this.logger.info(this.displayedColumns); diff --git a/src/app/shared/components/ln-services/loop/swaps/swaps.component.ts b/src/app/shared/components/ln-services/loop/swaps/swaps.component.ts index bc50354c..6071fafb 100755 --- a/src/app/shared/components/ln-services/loop/swaps/swaps.component.ts +++ b/src/app/shared/components/ln-services/loop/swaps/swaps.component.ts @@ -64,7 +64,7 @@ export class SwapsComponent implements OnInit, AfterViewInit, OnChanges, OnDestr } this.displayedColumns.push('actions'); this.pageSize = this.tableSetting.recordsPerPage ? +this.tableSetting.recordsPerPage : PAGE_SIZE; - if (this.swapsData && this.swapsData.length > 0 && this.sort && this.paginator) { + if (this.swapsData && this.swapsData.length > 0 && this.sort && this.paginator && this.displayedColumns.length > 0) { this.loadSwapsTable(this.swapsData); } this.logger.info(this.displayedColumns);