Skip to content

Commit 3389e03

Browse files
committed
fix: typo and lint
1 parent 8806c9f commit 3389e03

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

x/alliance/keeper/tests/unbonding_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ func TestUnbondingMethods(t *testing.T) {
3030
RewardWeightRange: types.RewardWeightRange{Min: math.LegacyNewDec(0), Max: math.LegacyNewDec(1)},
3131
IsInitialized: true,
3232
}
33-
app.AllianceKeeper.SetAsset(ctx, allianceAsset)
33+
err := app.AllianceKeeper.SetAsset(ctx, allianceAsset)
34+
require.NoError(t, err)
3435

3536
// Query staking module unbonding time to assert later on
3637
unbondingTime, err := app.StakingKeeper.UnbondingTime(ctx)

x/alliance/keeper/unbonding.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ func (k Keeper) GetUnbondings(
3030
for ; iter.Valid(); iter.Next() {
3131
key := iter.Key()
3232
// Skip keys that don't have the desired suffix
33-
if bytes.HasSuffix(key, suffix) {
33+
if !bytes.HasSuffix(key, suffix) {
3434
continue
3535
}
3636

x/alliance/tests/e2e/delegate_undelegate_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -251,11 +251,11 @@ func TestDelegatingASmallAmount(t *testing.T) {
251251
require.Equal(t, math.NewInt(100), unbondings[0].Amount)
252252

253253
// Query the unbondings in progress
254-
unbondings, err = app.AllianceKeeper.GetUnbondings(ctx, allianceAsset2, user1, val1.GetOperator())
254+
unbondings2, err := app.AllianceKeeper.GetUnbondings(ctx, allianceAsset2, user1, vals[0])
255255
require.NoError(t, err)
256-
require.Len(t, unbondings, 2)
257-
require.Equal(t, val1.GetOperator(), unbondings[0].ValidatorAddress)
258-
require.Equal(t, math.NewInt(100), unbondings[0].Amount)
256+
require.Len(t, unbondings2, 2)
257+
require.Equal(t, val1.GetOperator(), unbondings2[0].ValidatorAddress)
258+
require.Equal(t, math.NewInt(100), unbondings2[0].Amount)
259259
}
260260

261261
// This test replicates this issue where there are large amounts of tokens delegated,

0 commit comments

Comments
 (0)