fix: don't add zero mint to unallocated

This commit is contained in:
Gaze
2024-04-20 18:35:25 +07:00
parent 8f4621b2ad
commit 22691fc781

View File

@@ -109,8 +109,10 @@ func (p *Processor) processTx(ctx context.Context, tx *types.Transaction, blockH
if err != nil {
return errors.Wrap(err, "error during mint")
}
unallocated[mintRuneId] = unallocated[mintRuneId].Add(amount)
mints[mintRuneId] = amount
if !amount.IsZero() {
unallocated[mintRuneId] = unallocated[mintRuneId].Add(amount)
mints[mintRuneId] = amount
}
}
etching, etchedRuneId, etchedRune, err := p.getEtchedRune(ctx, tx, runestone)