diff --git a/backend/src/api/websocket-handler.ts b/backend/src/api/websocket-handler.ts
index a2ae6d0c9..92abaab6d 100644
--- a/backend/src/api/websocket-handler.ts
+++ b/backend/src/api/websocket-handler.ts
@@ -332,11 +332,18 @@ class WebsocketHandler {
}
if (client['track-tx']) {
- const utxoSpent = newTransactions.some((tx) => {
- return tx.vin.some((vin) => vin.txid === client['track-tx']);
- });
- if (utxoSpent) {
- response['utxoSpent'] = true;
+ const outspends: object = {};
+ newTransactions.forEach((tx) => tx.vin.forEach((vin, i) => {
+ if (vin.txid === client['track-tx']) {
+ outspends[vin.vout] = {
+ vin: i,
+ txid: tx.txid,
+ };
+ }
+ }));
+
+ if (Object.keys(outspends).length) {
+ response['utxoSpent'] = outspends;
}
if (rbfTransactions[client['track-tx']]) {
@@ -414,7 +421,6 @@ class WebsocketHandler {
}
if (client['track-tx'] && txIds.indexOf(client['track-tx']) > -1) {
- client['track-tx'] = null;
response['txConfirmed'] = true;
}
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 200356ffd..1470e6211 100644
--- a/frontend/src/app/components/transactions-list/transactions-list.component.html
+++ b/frontend/src/app/components/transactions-list/transactions-list.component.html
@@ -186,16 +186,16 @@
-
-
+ |
+
-
+
-
+
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 fd3cf0241..7d3c5d0e4 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, Output, EventEmitter } from '@angular/core';
+import { Component, OnInit, Input, ChangeDetectionStrategy, OnChanges, Output, EventEmitter, ChangeDetectorRef } from '@angular/core';
import { StateService } from '../../services/state.service';
-import { Observable, forkJoin, ReplaySubject, BehaviorSubject, merge } from 'rxjs';
+import { Observable, forkJoin, ReplaySubject, BehaviorSubject, merge, of, Subject, Subscription } 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, share, switchMap } from 'rxjs/operators';
+import { map, share, switchMap, tap } from 'rxjs/operators';
import { BlockExtended } from 'src/app/interfaces/node-api.interface';
@Component({
@@ -27,41 +27,18 @@ export class TransactionsListComponent implements OnInit, OnChanges {
@Output() loadMore = new EventEmitter();
latestBlock$: Observable;
- outspends$: Observable;
+ outspendsSubscription: Subscription;
refreshOutspends$: ReplaySubject |