Skip to content

Commit

Permalink
Fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
masihyeganeh committed Nov 20, 2024
1 parent 001a46d commit ac7aa4f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 2 additions & 0 deletions app/upgrade/v5/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,11 @@ func New(mm *module.Manager, configurator module.Configurator,
}

sdkCtx := sdk.UnwrapSDKContext(ctx)
//nolint:contextcheck // this is correct context passing.
dexParams := dexKeeper.GetParams(sdkCtx)
// 10core
dexParams.OrderReserve = sdk.NewInt64Coin(chosenNetwork.Denom(), 10_000_000)
//nolint:contextcheck // this is correct context passing.
if err = dexKeeper.SetParams(sdkCtx, dexParams); err != nil {
return nil, err
}
Expand Down
5 changes: 4 additions & 1 deletion x/asset/ft/keeper/keeper_dex.go
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,10 @@ func (k Keeper) updateDEXSettings(
}
}

k.SetDEXSettings(ctx, denom, newSettings)
err = k.SetDEXSettings(ctx, denom, newSettings)
if err != nil {
return err
}

if err := ctx.EventManager().EmitTypedEvent(&types.EventDEXSettingsChanged{
PreviousSettings: prevSettings,
Expand Down
6 changes: 3 additions & 3 deletions x/asset/ft/keeper/keeper_dex_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ func TestKeeper_DEXLimitsWithGlobalFreeze(t *testing.T) {
)

// globally freeze
ftKeeper.SetGlobalFreeze(ctx, ft1CoinToSend.Denom, true)
requireT.NoError(ftKeeper.SetGlobalFreeze(ctx, ft1CoinToSend.Denom, true))
requireT.ErrorContains(
ftKeeper.DEXCheckOrderAmounts(
simapp.CopyContextWithMultiStore(ctx),
Expand All @@ -649,8 +649,8 @@ func TestKeeper_DEXLimitsWithGlobalFreeze(t *testing.T) {
fmt.Sprintf("usage of %s for DEX is blocked because the token is globally frozen", ft1CoinToSend.Denom),
)

ftKeeper.SetGlobalFreeze(ctx, ft1CoinToSend.Denom, false)
ftKeeper.SetGlobalFreeze(ctx, ft2CoinToSend.Denom, true)
requireT.NoError(ftKeeper.SetGlobalFreeze(ctx, ft1CoinToSend.Denom, false))
requireT.NoError(ftKeeper.SetGlobalFreeze(ctx, ft2CoinToSend.Denom, true))
requireT.ErrorContains(
ftKeeper.DEXCheckOrderAmounts(
simapp.CopyContextWithMultiStore(ctx),
Expand Down

0 comments on commit ac7aa4f

Please sign in to comment.