diff --git a/backend/src/api/websocket-handler.ts b/backend/src/api/websocket-handler.ts
index 53d74925d..a2ae6d0c9 100644
--- a/backend/src/api/websocket-handler.ts
+++ b/backend/src/api/websocket-handler.ts
@@ -331,21 +331,30 @@ class WebsocketHandler {
}
}
- if (client['track-tx'] && rbfTransactions[client['track-tx']]) {
- for (const rbfTransaction in rbfTransactions) {
- if (client['track-tx'] === rbfTransaction) {
- const rbfTx = rbfTransactions[rbfTransaction];
- if (config.MEMPOOL.BACKEND !== 'esplora') {
- try {
- const fullTx = await transactionUtils.$getTransactionExtended(rbfTransaction, true);
- response['rbfTransaction'] = fullTx;
- } catch (e) {
- logger.debug('Error finding transaction in mempool: ' + (e instanceof Error ? e.message : e));
+ if (client['track-tx']) {
+ const utxoSpent = newTransactions.some((tx) => {
+ return tx.vin.some((vin) => vin.txid === client['track-tx']);
+ });
+ if (utxoSpent) {
+ response['utxoSpent'] = true;
+ }
+
+ if (rbfTransactions[client['track-tx']]) {
+ for (const rbfTransaction in rbfTransactions) {
+ if (client['track-tx'] === rbfTransaction) {
+ const rbfTx = rbfTransactions[rbfTransaction];
+ if (config.MEMPOOL.BACKEND !== 'esplora') {
+ try {
+ const fullTx = await transactionUtils.$getTransactionExtended(rbfTransaction, true);
+ response['rbfTransaction'] = fullTx;
+ } catch (e) {
+ logger.debug('Error finding transaction in mempool: ' + (e instanceof Error ? e.message : e));
+ }
+ } else {
+ response['rbfTransaction'] = rbfTx;
}
- } else {
- response['rbfTransaction'] = rbfTx;
+ break;
}
- break;
}
}
}
diff --git a/frontend/src/app/components/transaction/transaction.component.ts b/frontend/src/app/components/transaction/transaction.component.ts
index bd77c564f..8b8526336 100644
--- a/frontend/src/app/components/transaction/transaction.component.ts
+++ b/frontend/src/app/components/transaction/transaction.component.ts
@@ -185,15 +185,12 @@ export class TransactionComponent implements OnInit, OnDestroy {
this.error = undefined;
this.waitingForTransaction = false;
this.setMempoolBlocksSubscription();
+ this.websocketService.startTrackTransaction(tx.txid);
- if (!tx.status.confirmed) {
- this.websocketService.startTrackTransaction(tx.txid);
-
- if (tx.firstSeen) {
- this.transactionTime = tx.firstSeen;
- } else {
- this.getTransactionTime();
- }
+ if (!tx.status.confirmed && tx.firstSeen) {
+ this.transactionTime = tx.firstSeen;
+ } else {
+ this.getTransactionTime();
}
if (this.tx.status.confirmed) {
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 f80953738..85b91cf66 100644
--- a/frontend/src/app/components/transactions-list/transactions-list.component.html
+++ b/frontend/src/app/components/transactions-list/transactions-list.component.html
@@ -82,7 +82,7 @@
-
@@ -183,16 +183,16 @@
-
-
+ |
+
-
+
-
+
@@ -204,7 +204,7 @@
|
-
+
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 2740075b8..fd3cf0241 100644
--- a/frontend/src/app/components/transactions-list/transactions-list.component.ts
+++ b/frontend/src/app/components/transactions-list/transactions-list.component.ts
@@ -1,11 +1,11 @@
-import { Component, OnInit, Input, ChangeDetectionStrategy, OnChanges, ChangeDetectorRef, Output, EventEmitter } from '@angular/core';
+import { Component, OnInit, Input, ChangeDetectionStrategy, OnChanges, Output, EventEmitter } from '@angular/core';
import { StateService } from '../../services/state.service';
-import { Observable, forkJoin } from 'rxjs';
+import { Observable, forkJoin, ReplaySubject, BehaviorSubject, merge } from 'rxjs';
import { Outspend, Transaction } from '../../interfaces/electrs.interface';
import { ElectrsApiService } from '../../services/electrs-api.service';
import { environment } from 'src/environments/environment';
import { AssetsService } from 'src/app/services/assets.service';
-import { map } from 'rxjs/operators';
+import { map, share, switchMap } from 'rxjs/operators';
import { BlockExtended } from 'src/app/interfaces/node-api.interface';
@Component({
@@ -17,7 +17,6 @@ import { BlockExtended } from 'src/app/interfaces/node-api.interface';
export class TransactionsListComponent implements OnInit, OnChanges {
network = '';
nativeAssetId = this.stateService.network === 'liquidtestnet' ? environment.nativeTestAssetId : environment.nativeAssetId;
- displayDetails = false;
@Input() transactions: Transaction[];
@Input() showConfirmations = false;
@@ -28,15 +27,41 @@ export class TransactionsListComponent implements OnInit, OnChanges {
@Output() loadMore = new EventEmitter();
latestBlock$: Observable;
- outspends: Outspend[] = [];
+ outspends$: Observable;
+ refreshOutspends$: ReplaySubject | |