Skip to content

Commit

Permalink
fix: lint and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
emidev98 committed Feb 27, 2024
1 parent ba16547 commit 3b6c54a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions x/alliance/keeper/tests/unbonding_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,9 @@ func TestBeginUnbondingOnABCIAlliances(t *testing.T) {
RewardWeightRange: types.RewardWeightRange{Min: math.LegacyNewDec(0), Max: math.LegacyNewDec(1)},
IsInitialized: true,
}
app.AllianceKeeper.SetAsset(ctx, allianceAsset)
err := app.AllianceKeeper.SetAsset(ctx, allianceAsset)
require.NoError(t, err)

// Get the native delegations to have a validator address where to delegate
delegations, err := app.StakingKeeper.GetAllDelegations(ctx)
require.NoError(t, err)
Expand All @@ -150,11 +152,12 @@ func TestBeginUnbondingOnABCIAlliances(t *testing.T) {
require.Equal(t, math.LegacyNewDec(1000_000_000), *res2)

// Execute the deltion of the alliance
app.AllianceKeeper.DeleteAlliance(ctx, &types.MsgDeleteAllianceProposal{
err = app.AllianceKeeper.DeleteAlliance(ctx, &types.MsgDeleteAllianceProposal{
Title: "",
Description: "",
Denom: AllianceDenom,
})
require.NoError(t, err)

// ABCI execution: set alliance as dissolving and begin the unbonding of the delegations
err = app.AllianceKeeper.BeginUnbondingsForDissolvingAlliances(ctx)
Expand Down
2 changes: 1 addition & 1 deletion x/alliance/keeper/unbonding.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ func (k Keeper) BeginUnbondingsForDissolvingAlliances(ctx sdk.Context) (err erro
return true
}

// Increment the amount of unbondings executed so at the begining of the
// Increment the amount of unbondings executed so at the beginning of the
// loop we can check if we have executed 50 unbondings and stop the loop.
amountOfUndelegationsExecuted++

Expand Down

0 comments on commit 3b6c54a

Please sign in to comment.