From e440c3f235070e135713ada13b4299235cbf7f8a Mon Sep 17 00:00:00 2001 From: natsoni Date: Tue, 8 Oct 2024 12:40:25 +0900 Subject: [PATCH] Fix edicts displaying --- .../src/app/components/ord-data/ord-data.component.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/frontend/src/app/components/ord-data/ord-data.component.ts b/frontend/src/app/components/ord-data/ord-data.component.ts index ccc77bce6..ccf8f6eae 100644 --- a/frontend/src/app/components/ord-data/ord-data.component.ts +++ b/frontend/src/app/components/ord-data/ord-data.component.ts @@ -34,10 +34,8 @@ export class OrdDataComponent implements OnChanges { ngOnChanges(changes: SimpleChanges): void { if (changes.runestone && this.runestone) { - this.transferredRunes = Object.entries(this.runeInfo).map(([key, runeInfo]) => ({ key, ...runeInfo })); if (this.runestone.mint && this.runeInfo[this.runestone.mint.toString()]) { const mint = this.runestone.mint.toString(); - this.transferredRunes = this.transferredRunes.filter(rune => rune.key !== mint); const terms = this.runeInfo[mint].etching.terms; const amount = terms?.amount; const divisibility = this.runeInfo[mint].etching.divisibility; @@ -45,6 +43,12 @@ export class OrdDataComponent implements OnChanges { this.minted = this.getAmount(amount, divisibility); } } + + this.runestone.edicts.forEach(edict => { + if (this.runeInfo[edict.id.toString()]) { + this.transferredRunes.push({ key: edict.id.toString(), ...this.runeInfo[edict.id.toString()] }); + } + }); } if (changes.inscriptions && this.inscriptions) {