mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-12-26 08:15:19 +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) {
|
func (k Keeper) IncrementBorrowedCoins(ctx sdk.Context, newCoins sdk.Coins) {
|
||||||
borrowedCoins, found := k.GetBorrowedCoins(ctx)
|
borrowedCoins, found := k.GetBorrowedCoins(ctx)
|
||||||
if !found {
|
if !found {
|
||||||
k.SetBorrowedCoins(ctx, newCoins)
|
if !newCoins.Empty() {
|
||||||
|
k.SetBorrowedCoins(ctx, newCoins)
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
k.SetBorrowedCoins(ctx, borrowedCoins.Add(newCoins...))
|
k.SetBorrowedCoins(ctx, borrowedCoins.Add(newCoins...))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user