|
7 | 7 |
|
8 | 8 | "github.com/stretchr/testify/require"
|
9 | 9 |
|
| 10 | + "cosmossdk.io/core/header" |
10 | 11 | "cosmossdk.io/core/store"
|
| 12 | + "cosmossdk.io/log" |
11 | 13 | "cosmossdk.io/math"
|
12 | 14 | lockuptypes "cosmossdk.io/x/accounts/defaults/lockup/v1"
|
13 | 15 |
|
@@ -229,6 +231,9 @@ func TestTrackingUnDelegation(t *testing.T) {
|
229 | 231 |
|
230 | 232 | func TestGetNotBondedLockedCoin(t *testing.T) {
|
231 | 233 | ctx, ss := newMockContext(t)
|
| 234 | + sdkCtx := sdk.NewContext(nil, true, log.NewNopLogger()).WithContext(ctx).WithHeaderInfo(header.Info{ |
| 235 | + Time: time.Now(), |
| 236 | + }) |
232 | 237 |
|
233 | 238 | testcases := []struct {
|
234 | 239 | name string
|
@@ -257,10 +262,10 @@ func TestGetNotBondedLockedCoin(t *testing.T) {
|
257 | 262 | }
|
258 | 263 |
|
259 | 264 | 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) |
262 | 267 |
|
263 |
| - lockedCoin, err := baseLockup.GetNotBondedLockedCoin(ctx, test.lockedCoin, "test") |
| 268 | + lockedCoin, err := baseLockup.GetNotBondedLockedCoin(sdkCtx, test.lockedCoin, "test") |
264 | 269 | require.NoError(t, err)
|
265 | 270 |
|
266 | 271 | require.True(t, test.expLockCoin.Equal(lockedCoin), test.name+" locked amount must be equal")
|
|
0 commit comments