mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-12-24 15:25: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,11 +350,12 @@ func (k Keeper) PlaceReverseBidCollateral(ctx sdk.Context, a types.CollateralAuc
|
|||||||
}
|
}
|
||||||
for i, payout := range lotPayouts {
|
for i, payout := range lotPayouts {
|
||||||
// if the payout amount is 0, don't send 0 coins
|
// if the payout amount is 0, don't send 0 coins
|
||||||
if payout.IsPositive() {
|
if !payout.IsPositive() {
|
||||||
err = k.supplyKeeper.SendCoinsFromModuleToAccount(ctx, types.ModuleName, a.LotReturns.Addresses[i], sdk.NewCoins(payout))
|
break
|
||||||
if err != nil {
|
}
|
||||||
return a, err
|
err = k.supplyKeeper.SendCoinsFromModuleToAccount(ctx, types.ModuleName, a.LotReturns.Addresses[i], sdk.NewCoins(payout))
|
||||||
}
|
if err != nil {
|
||||||
|
return a, err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user