mirror of
https://github.com/mempool/mempool.git
synced 2025-03-12 19:04:07 +01:00
Fix edicts displaying
This commit is contained in:
parent
177bbc83f3
commit
e440c3f235
1 changed files with 6 additions and 2 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue