mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-11-10 10:05:18 +00:00
fix typo (#330)
This commit is contained in:
parent
535094df96
commit
d018aaebcf
@ -98,7 +98,7 @@ func (k Keeper) WithdrawCollateral(ctx sdk.Context, owner sdk.AccAddress, deposi
|
|||||||
cdp.AccumulatedFees = cdp.AccumulatedFees.Add(fees)
|
cdp.AccumulatedFees = cdp.AccumulatedFees.Add(fees)
|
||||||
cdp.FeesUpdated = ctx.BlockTime()
|
cdp.FeesUpdated = ctx.BlockTime()
|
||||||
cdp.Collateral = cdp.Collateral.Sub(collateral)
|
cdp.Collateral = cdp.Collateral.Sub(collateral)
|
||||||
collateralToDebtRatio := k.CalculateCollateralToDebtRatio(ctx, collateral, cdp.Principal.Add(cdp.AccumulatedFees))
|
collateralToDebtRatio := k.CalculateCollateralToDebtRatio(ctx, cdp.Collateral, cdp.Principal.Add(cdp.AccumulatedFees))
|
||||||
k.SetCdpAndCollateralRatioIndex(ctx, cdp, collateralToDebtRatio)
|
k.SetCdpAndCollateralRatioIndex(ctx, cdp, collateralToDebtRatio)
|
||||||
|
|
||||||
deposit.Amount = deposit.Amount.Sub(collateral)
|
deposit.Amount = deposit.Amount.Sub(collateral)
|
||||||
|
Loading…
Reference in New Issue
Block a user