Skip to content

Commit af32a94

Browse files
committed
more fixing
1 parent a7ee203 commit af32a94

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

x/accounts/defaults/lockup/lockup_test.go

+8-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ import (
77

88
"github.com/stretchr/testify/require"
99

10+
"cosmossdk.io/core/header"
1011
"cosmossdk.io/core/store"
12+
"cosmossdk.io/log"
1113
"cosmossdk.io/math"
1214
lockuptypes "cosmossdk.io/x/accounts/defaults/lockup/v1"
1315

@@ -229,6 +231,9 @@ func TestTrackingUnDelegation(t *testing.T) {
229231

230232
func TestGetNotBondedLockedCoin(t *testing.T) {
231233
ctx, ss := newMockContext(t)
234+
sdkCtx := sdk.NewContext(nil, true, log.NewNopLogger()).WithContext(ctx).WithHeaderInfo(header.Info{
235+
Time: time.Now(),
236+
})
232237

233238
testcases := []struct {
234239
name string
@@ -257,10 +262,10 @@ func TestGetNotBondedLockedCoin(t *testing.T) {
257262
}
258263

259264
for _, test := range testcases {
260-
baseLockup := setup(t, ctx, ss)
261-
test.malaete(ctx, baseLockup)
265+
baseLockup := setup(t, sdkCtx, ss)
266+
test.malaete(sdkCtx, baseLockup)
262267

263-
lockedCoin, err := baseLockup.GetNotBondedLockedCoin(ctx, test.lockedCoin, "test")
268+
lockedCoin, err := baseLockup.GetNotBondedLockedCoin(sdkCtx, test.lockedCoin, "test")
264269
require.NoError(t, err)
265270

266271
require.True(t, test.expLockCoin.Equal(lockedCoin), test.name+" locked amount must be equal")

0 commit comments

Comments
 (0)