Fix Get Fee Estimate and result icons

This commit is contained in:
everoddandeven 2024-10-27 11:02:22 +01:00
parent 7ade17ec3f
commit ad99acce26
4 changed files with 14 additions and 9 deletions

View file

@ -47,7 +47,7 @@
<div class="row g-5 p-2">
<div class="col-md-7 col-lg-12">
<div *ngIf="setBansSuccess" class="alert alert-success d-flex align-items-center justify-content-center text-center" role="alert">
<h4><i class="bi bi-send-check m-2"></i></h4>&nbsp;&nbsp;
<h4><i class="bi bi-check-circle m-2"></i></h4>&nbsp;&nbsp;
<div>
Successfully set bans
</div>

View file

@ -279,7 +279,7 @@
<div class="tab-pane fade" id="pills-flush-tx-pool" role="tabpanel" aria-labelledby="pills-flush-tx-pool-tab" tabindex="0">
<div *ngIf="flushSuccess" class="alert alert-success d-flex align-items-center justify-content-center text-center" role="alert">
<h4><i class="bi bi-send-check m-2"></i></h4>&nbsp;&nbsp;
<h4><i class="bi bi-check-circle m-2"></i></h4>&nbsp;&nbsp;
<div>
Successfully flushed txs
</div>
@ -322,7 +322,7 @@
<div class="tab-pane fade" id="pills-flush-cache" role="tabpanel" aria-labelledby="pills-flush-cache-tab" tabindex="0">
<div *ngIf="flushCacheSuccess" class="alert alert-success d-flex align-items-center justify-content-center text-center" role="alert">
<h4><i class="bi bi-send-check m-2"></i></h4>&nbsp;&nbsp;
<h4><i class="bi bi-check-circle m-2"></i></h4>&nbsp;&nbsp;
<div>
Successfully flushed cache
</div>

View file

@ -310,14 +310,19 @@ export class TransactionsComponent extends BasePageComponent implements AfterVie
this.feeEstimateCards = [
new SimpleBootstrapCard('Fee Per Byte', `${this.getFeeEstimateResult.fee}`),
new SimpleBootstrapCard('Quantization Mask', `${this.getFeeEstimateResult.quantizationMask}`),
new SimpleBootstrapCard('Fee (slow)', `${this.getFeeEstimateResult.fees[0]}`),
new SimpleBootstrapCard('Fee (normal)', `${this.getFeeEstimateResult.fees[1]}`),
new SimpleBootstrapCard('Fee (fast)', `${this.getFeeEstimateResult.fees[2]}`),
new SimpleBootstrapCard('Fee (fastest)', `${this.getFeeEstimateResult.fees[3]}`)
];
if (this.getFeeEstimateResult.fees.length > 0) {
this.feeEstimateCards.push(
new SimpleBootstrapCard('Fee (slow)', `${this.getFeeEstimateResult.fees[0]}`),
new SimpleBootstrapCard('Fee (normal)', `${this.getFeeEstimateResult.fees[1]}`),
new SimpleBootstrapCard('Fee (fast)', `${this.getFeeEstimateResult.fees[2]}`),
new SimpleBootstrapCard('Fee (fastest)', `${this.getFeeEstimateResult.fees[3]}`)
);
}
this.getFeeEstimateSuccess = true;
this.getFeeEstimateError = ``;
}
catch(error: any) {
console.error(error);

View file

@ -11,7 +11,7 @@ export class FeeEstimate {
public static parse(estimate: any): FeeEstimate {
const fee: number = estimate.fee;
const fees: number[] = estimate.fees;
const fees: number[] = estimate.fees ? estimate.fees : [];
const quantizationMask: number = estimate.quantization_mask;
return new FeeEstimate(fee, fees, quantizationMask);