mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-12-24 15:25:18 +00:00
hotfix (#730)
This commit is contained in:
parent
4c95227c1d
commit
6aa97a8f75
@ -231,7 +231,9 @@ func (k Keeper) ValidateBorrow(ctx sdk.Context, borrower sdk.AccAddress, amount
|
||||
func (k Keeper) IncrementBorrowedCoins(ctx sdk.Context, newCoins sdk.Coins) {
|
||||
borrowedCoins, found := k.GetBorrowedCoins(ctx)
|
||||
if !found {
|
||||
k.SetBorrowedCoins(ctx, newCoins)
|
||||
if !newCoins.Empty() {
|
||||
k.SetBorrowedCoins(ctx, newCoins)
|
||||
}
|
||||
} else {
|
||||
k.SetBorrowedCoins(ctx, borrowedCoins.Add(newCoins...))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user