Skip to content

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
  • Loading branch information
lumtis committed Jun 9, 2022
1 parent 1e0d72b commit d828285
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 13 deletions.
11 changes: 6 additions & 5 deletions x/claim/keeper/grpc_query_airdrop_supply_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package keeper_test

import (
"github.com/tendermint/spn/testutil/sample"
"testing"

sdk "github.com/cosmos/cosmos-sdk/types"
Expand All @@ -11,14 +10,16 @@ import (

testkeeper "github.com/tendermint/spn/testutil/keeper"
"github.com/tendermint/spn/testutil/nullify"
"github.com/tendermint/spn/testutil/sample"
"github.com/tendermint/spn/x/claim/types"
)

func TestAirdropSupplyQuery(t *testing.T) {
ctx, tk, _ := testkeeper.NewTestSetup(t)

wctx := sdk.WrapSDKContext(ctx)
sampleSupply := sample.Coin(r)
var (
ctx, tk, _ = testkeeper.NewTestSetup(t)
wctx = sdk.WrapSDKContext(ctx)
sampleSupply = sample.Coin(r)
)
tk.ClaimKeeper.SetAirdropSupply(ctx, sampleSupply)

for _, tc := range []struct {
Expand Down
17 changes: 10 additions & 7 deletions x/claim/keeper/grpc_query_claim_record_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@ import (
)

func TestClaimRecordQuerySingle(t *testing.T) {
ctx, tk, _ := testkeeper.NewTestSetup(t)
var (
ctx, tk, _ = testkeeper.NewTestSetup(t)
wctx = sdk.WrapSDKContext(ctx)
msgs = createNClaimRecord(tk.ClaimKeeper, ctx, 2)
)

wctx := sdk.WrapSDKContext(ctx)
msgs := createNClaimRecord(tk.ClaimKeeper, ctx, 2)
for _, tc := range []struct {
desc string
request *types.QueryGetClaimRecordRequest
Expand Down Expand Up @@ -68,10 +70,11 @@ func TestClaimRecordQuerySingle(t *testing.T) {
}

func TestClaimRecordQueryPaginated(t *testing.T) {
ctx, tk, _ := testkeeper.NewTestSetup(t)

wctx := sdk.WrapSDKContext(ctx)
msgs := createNClaimRecord(tk.ClaimKeeper, ctx, 5)
var (
ctx, tk, _ = testkeeper.NewTestSetup(t)
wctx = sdk.WrapSDKContext(ctx)
msgs = createNClaimRecord(tk.ClaimKeeper, ctx, 5)
)

request := func(next []byte, offset, limit uint64, total bool) *types.QueryAllClaimRecordRequest {
return &types.QueryAllClaimRecordRequest{
Expand Down
2 changes: 1 addition & 1 deletion x/claim/keeper/mission.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (

"github.com/cosmos/cosmos-sdk/store/prefix"
sdk "github.com/cosmos/cosmos-sdk/types"

sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"

spnerrors "github.com/tendermint/spn/pkg/errors"
"github.com/tendermint/spn/x/claim/types"
)
Expand Down

0 comments on commit d828285

Please sign in to comment.