Fixing tx tracking issues.

This commit is contained in:
Simon Lindh
2019-07-25 14:20:02 +03:00
parent 04d970786c
commit 057691bdbb
4 changed files with 10 additions and 7 deletions

View File

@@ -1,5 +1,5 @@
<div class="txBubble" [ngStyle]="txBubbleStyle" *ngIf="txTrackingEnabled && tx">
<span class="txBubbleText" ngClass="arrow-{{ arrowPosition }}">
<span class="txBubbleText" ngClass="arrow-{{ txBubbleArrowPosition }}">
<table style="width: 100%;">
<tr>
<td class="text-left"><b>Transaction hash</b></td>

View File

@@ -12,7 +12,7 @@ export class TxBubbleComponent implements OnInit, OnDestroy {
tx: ITransaction | null = null;
txTrackingBlockHeight = 0;
latestBlockHeight = 0;
arrowPosition: 'top' | 'right' | 'bottom' | 'top-right' | 'top-left' = 'top';
txBubbleArrowPosition: 'top' | 'right' | 'bottom' | 'top-right' | 'top-left' = 'top';
txTrackingSubscription: Subscription;
projectedBlocksSubscription: Subscription;
@@ -35,8 +35,6 @@ export class TxBubbleComponent implements OnInit, OnDestroy {
txTrackingTx: ITransaction | null = null;
txShowTxNotFound = false;
txBubbleArrowPosition = 'top';
@HostListener('window:resize', ['$event'])
onResize(event: Event) {
this.moveTxBubbleToPosition();
@@ -77,6 +75,7 @@ export class TxBubbleComponent implements OnInit, OnDestroy {
if (this.txTrackingBlockHeight) {
this.confirmations = (this.latestBlockHeight - this.txTrackingBlockHeight) + 1;
}
setTimeout(() => this.moveTxBubbleToPosition(), 1000);
});
this.memPoolService.conversions$
@@ -117,7 +116,7 @@ export class TxBubbleComponent implements OnInit, OnDestroy {
} else {
this.txBubbleStyle['left'] = window.innerWidth - 220 + 'px';
this.txBubbleArrowPosition = 'right';
this.txBubbleStyle['top'] = '425px';
this.txBubbleStyle['top'] = '460px';
}
} else {
this.txBubbleArrowPosition = 'top';