mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-11-10 10:05:18 +00:00
tidy payout function
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
This commit is contained in:
parent
7c477eb75d
commit
d489bacfac
@ -350,13 +350,14 @@ func (k Keeper) PlaceReverseBidCollateral(ctx sdk.Context, a types.CollateralAuc
|
||||
}
|
||||
for i, payout := range lotPayouts {
|
||||
// if the payout amount is 0, don't send 0 coins
|
||||
if payout.IsPositive() {
|
||||
if !payout.IsPositive() {
|
||||
break
|
||||
}
|
||||
err = k.supplyKeeper.SendCoinsFromModuleToAccount(ctx, types.ModuleName, a.LotReturns.Addresses[i], sdk.NewCoins(payout))
|
||||
if err != nil {
|
||||
return a, err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Update Auction
|
||||
a.Bidder = bidder
|
||||
|
Loading…
Reference in New Issue
Block a user