Merge pull request #4802 from mempool/natsoni/fix-bowtie-tooltip-bug

Fix bowtie tooltip bug
This commit is contained in:
softsimon 2024-03-21 11:31:18 +09:00 committed by GitHub
commit 7bf7d02a18
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -71,6 +71,7 @@ export class TxBowtieGraphTooltipComponent implements OnChanges {
if (changes.line?.currentValue) { if (changes.line?.currentValue) {
if (changes.line.currentValue.type === 'input') { if (changes.line.currentValue.type === 'input') {
if (!this.inputStatus[changes.line.currentValue.index]) { if (!this.inputStatus[changes.line.currentValue.index]) {
if (changes.line.currentValue.txid) {
this.apiService.getTransactionStatus$(changes.line.currentValue.txid).pipe( this.apiService.getTransactionStatus$(changes.line.currentValue.txid).pipe(
tap((status) => { tap((status) => {
changes.line.currentValue.status = status; changes.line.currentValue.status = status;
@ -78,6 +79,7 @@ export class TxBowtieGraphTooltipComponent implements OnChanges {
this.fetchPrices(changes); this.fetchPrices(changes);
}) })
).subscribe(); ).subscribe();
}
} else { } else {
changes.line.currentValue.status = this.inputStatus[changes.line.currentValue.index]; changes.line.currentValue.status = this.inputStatus[changes.line.currentValue.index];
this.fetchPrices(changes); this.fetchPrices(changes);