mirror of
https://github.com/mempool/mempool.git
synced 2024-11-20 02:11:49 +01:00
Merge pull request #3871 from mempool/mononaut/rbf-removed-not-mined
Change RBF status badges
This commit is contained in:
commit
e5efc2957a
@ -537,7 +537,7 @@ describe('Mainnet', () => {
|
|||||||
cy.get('.container-xl > :nth-child(3)').invoke('css', 'width').should('equal', alertWidth);
|
cy.get('.container-xl > :nth-child(3)').invoke('css', 'width').should('equal', alertWidth);
|
||||||
});
|
});
|
||||||
|
|
||||||
cy.get('.btn-danger').then(getRectangle).then((rectA) => {
|
cy.get('.btn-warning').then(getRectangle).then((rectA) => {
|
||||||
cy.get('.alert').then(getRectangle).then((rectB) => {
|
cy.get('.alert').then(getRectangle).then((rectB) => {
|
||||||
expect(areOverlapping(rectA, rectB), 'Confirmations box and RBF alert are overlapping').to.be.false;
|
expect(areOverlapping(rectA, rectB), 'Confirmations box and RBF alert are overlapping').to.be.false;
|
||||||
});
|
});
|
||||||
@ -582,7 +582,7 @@ describe('Mainnet', () => {
|
|||||||
cy.get(alertLocator).invoke('css', 'width').should('equal', firstWidth);
|
cy.get(alertLocator).invoke('css', 'width').should('equal', firstWidth);
|
||||||
});
|
});
|
||||||
|
|
||||||
cy.get('.btn-danger').then(getRectangle).then((rectA) => {
|
cy.get('.btn-warning').then(getRectangle).then((rectA) => {
|
||||||
cy.get('.alert').then(getRectangle).then((rectB) => {
|
cy.get('.alert').then(getRectangle).then((rectB) => {
|
||||||
expect(areOverlapping(rectA, rectB), 'Confirmations box and RBF alert are overlapping').to.be.false;
|
expect(areOverlapping(rectA, rectB), 'Confirmations box and RBF alert are overlapping').to.be.false;
|
||||||
});
|
});
|
||||||
|
@ -18,7 +18,12 @@
|
|||||||
</span>
|
</span>
|
||||||
|
|
||||||
<div class="container-buttons">
|
<div class="container-buttons">
|
||||||
<app-confirmations [chainTip]="latestBlock?.height" [height]="tx?.status?.block_height" [replaced]="replaced"></app-confirmations>
|
<app-confirmations
|
||||||
|
[chainTip]="latestBlock?.height"
|
||||||
|
[height]="tx?.status?.block_height"
|
||||||
|
[replaced]="replaced"
|
||||||
|
[removed]="this.rbfInfo?.mined && !this.tx?.status?.confirmed"
|
||||||
|
></app-confirmations>
|
||||||
</div>
|
</div>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</div>
|
</div>
|
||||||
|
@ -6,8 +6,11 @@
|
|||||||
</button>
|
</button>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
<ng-template [ngIf]="!hideUnconfirmed && !confirmations && replaced">
|
<ng-template [ngIf]="!hideUnconfirmed && !confirmations && replaced">
|
||||||
<button type="button" class="btn btn-sm btn-danger {{buttonClass}}" i18n="transaction.unconfirmed|Transaction unconfirmed state">Replaced</button>
|
<button type="button" class="btn btn-sm btn-warning {{buttonClass}}" i18n="transaction.replaced|Transaction replaced state">Replaced</button>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
<ng-template [ngIf]="!hideUnconfirmed && !confirmations && !replaced">
|
<ng-template [ngIf]="!hideUnconfirmed && !confirmations && !replaced && removed">
|
||||||
|
<button type="button" class="btn btn-sm btn-warning {{buttonClass}}" i18n="transaction.audit.removed|Transaction removed state">Removed</button>
|
||||||
|
</ng-template>
|
||||||
|
<ng-template [ngIf]="!hideUnconfirmed && !confirmations && !replaced && !removed">
|
||||||
<button type="button" class="btn btn-sm btn-danger {{buttonClass}}" i18n="transaction.unconfirmed|Transaction unconfirmed state">Unconfirmed</button>
|
<button type="button" class="btn btn-sm btn-danger {{buttonClass}}" i18n="transaction.unconfirmed|Transaction unconfirmed state">Unconfirmed</button>
|
||||||
</ng-template>
|
</ng-template>
|
@ -11,6 +11,7 @@ export class ConfirmationsComponent implements OnChanges {
|
|||||||
@Input() chainTip: number;
|
@Input() chainTip: number;
|
||||||
@Input() height: number;
|
@Input() height: number;
|
||||||
@Input() replaced: boolean = false;
|
@Input() replaced: boolean = false;
|
||||||
|
@Input() removed: boolean = false;
|
||||||
@Input() hideUnconfirmed: boolean = false;
|
@Input() hideUnconfirmed: boolean = false;
|
||||||
@Input() buttonClass: string = '';
|
@Input() buttonClass: string = '';
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user