FIx error handling logic in ord-data
This commit is contained in:
parent
3b9601a82e
commit
65f080d526
@ -1,8 +1,3 @@
|
||||
@if (error) {
|
||||
<div>
|
||||
<i>Error fetching data (code {{ error.status }})</i>
|
||||
</div>
|
||||
} @else {
|
||||
@if (minted) {
|
||||
<ng-container i18n="ord.mint-n-runes">
|
||||
<span>Mint</span>
|
||||
@ -54,11 +49,8 @@
|
||||
<div class="skeleton-loader" style="width: 50%;"></div>
|
||||
}
|
||||
|
||||
@if (!inscriptions?.length && type === 'vin') {
|
||||
<div>
|
||||
<i>Error decoding inscription data</i>
|
||||
</div>
|
||||
}
|
||||
@if ((runestone && !minted && !runestone.etching?.supply && !transferredRunes?.length && type === 'vout') || (!inscriptions?.length && type === 'vin')) {
|
||||
<i i18n="error.decoding-data">Error decoding data</i>
|
||||
}
|
||||
|
||||
<ng-template #runeName let-id>
|
||||
|
@ -1,5 +1,4 @@
|
||||
import { ChangeDetectionStrategy, Component, Input, OnChanges, SimpleChanges } from '@angular/core';
|
||||
import { HttpErrorResponse } from '@angular/common/http';
|
||||
import { Runestone, Etching } from '../../shared/ord/rune.utils';
|
||||
|
||||
export interface Inscription {
|
||||
@ -20,7 +19,6 @@ export class OrdDataComponent implements OnChanges {
|
||||
@Input() inscriptions: Inscription[];
|
||||
@Input() runestone: Runestone;
|
||||
@Input() runeInfo: { [id: string]: { etching: Etching; txid: string } };
|
||||
@Input() error: HttpErrorResponse;
|
||||
@Input() type: 'vin' | 'vout';
|
||||
|
||||
toNumber = (value: bigint): number => Number(value);
|
||||
|
@ -103,7 +103,7 @@
|
||||
}">
|
||||
<td></td>
|
||||
<td colspan="2">
|
||||
<app-ord-data [inscriptions]="showOrdData[tx.txid + '-vin-' + vindex]['inscriptions']" [type]="'vin'" [error]="showOrdData[tx.txid + '-vin-' + vindex]['error']"></app-ord-data>
|
||||
<app-ord-data [inscriptions]="showOrdData[tx.txid + '-vin-' + vindex]['inscriptions']" [type]="'vin'"></app-ord-data>
|
||||
</td>
|
||||
</tr>
|
||||
<tr *ngIf="(showDetails$ | async) === true">
|
||||
@ -297,7 +297,7 @@
|
||||
'highlight': this.address !== '' && (vout.scriptpubkey_address === this.address || (vout.scriptpubkey_type === 'p2pk' && vout.scriptpubkey.slice(2, -2) === this.address))
|
||||
}">
|
||||
<td colspan="3">
|
||||
<app-ord-data [runestone]="showOrdData[tx.txid + '-vout-' + vindex]['runestone']" [runeInfo]="showOrdData[tx.txid + '-vout-' + vindex]['runeInfo']" [type]="'vout'" [error]="showOrdData[tx.txid + '-vout-' + vindex]['error']"></app-ord-data>
|
||||
<app-ord-data [runestone]="showOrdData[tx.txid + '-vout-' + vindex]['runestone']" [runeInfo]="showOrdData[tx.txid + '-vout-' + vindex]['runeInfo']" [type]="'vout'"></app-ord-data>
|
||||
</td>
|
||||
</tr>
|
||||
<tr *ngIf="(showDetails$ | async) === true">
|
||||
|
Loading…
x
Reference in New Issue
Block a user