diff --git a/Models.go b/Models.go index 084b65d..fd3a786 100644 --- a/Models.go +++ b/Models.go @@ -120,10 +120,10 @@ func (p *Payment) ToValue() Value.Value { } func (p *Payment) EnsureMinUTXO(cc Base.ChainContext) { + if len(p.Units) == 0 && p.Lovelace >= 1_000_000 { + return + } txOut := p.ToTxOut() - am := txOut.GetAmount() - am.SetLovelace(0) - txOut.SetAmount(am) coins := Utils.MinLovelacePostAlonzo(*txOut, cc) if int64(p.Lovelace) < coins { p.Lovelace = int(coins)