Skip to content

Commit 9cc2dee

Browse files
authored
Merge pull request #3380 from Sifchain/fix/halborn-audit
Fix/halborn audit
2 parents 40b0d20 + d98b2d4 commit 9cc2dee

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

x/clp/keeper/calculations.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ func CalculatePoolUnits(P, R, A, r, a sdk.Uint, sellNativeSwapFeeRate, buyNative
138138
// we'll default to doing the same thing.
139139

140140
if a.IsZero() || r.IsZero() {
141-
return sdk.Uint{}, sdk.Uint{}, 0, sdk.Uint{}, types.ErrInValidAmount
141+
return sdk.Uint{}, sdk.Uint{}, NoSwap, sdk.Uint{}, types.ErrInValidAmount
142142
}
143143

144144
return r, r, NoSwap, sdk.Uint{}, nil

x/clp/types/keys.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ func GetLiquidityProviderKey(externalTicker string, lp string) []byte {
6363

6464
func GetDefaultRewardParams() *RewardParams {
6565
return &RewardParams{
66-
LiquidityRemovalLockPeriod: 0,
66+
LiquidityRemovalLockPeriod: 0, // set to zero since it's now only used when starting a new chain e.g. localnet
6767
LiquidityRemovalCancelPeriod: 12 * 60 * 24 * 30,
6868
RewardPeriods: nil,
6969
RewardPeriodStartTime: "",

0 commit comments

Comments
 (0)