Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
iramiller committed Jun 8, 2021
1 parent 3b89f21 commit 7d79e5f
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
3 changes: 2 additions & 1 deletion x/attribute/keeper/keeper_legacy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ import (
"github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1"
cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/stretchr/testify/suite"

"github.com/provenance-io/provenance/x/attribute/types"
nametypes "github.com/provenance-io/provenance/x/name/types"
"github.com/stretchr/testify/suite"
)

type KeeperLegacyTestSuite struct {
Expand Down
3 changes: 2 additions & 1 deletion x/attribute/keeper/keeper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ import (
"github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1"
cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/stretchr/testify/suite"

"github.com/provenance-io/provenance/x/attribute/types"
nametypes "github.com/provenance-io/provenance/x/name/types"
"github.com/stretchr/testify/suite"
)

type KeeperTestSuite struct {
Expand Down
1 change: 1 addition & 0 deletions x/attribute/simulation/decoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (

"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/types/kv"

"github.com/provenance-io/provenance/x/attribute/types"
)

Expand Down
7 changes: 3 additions & 4 deletions x/attribute/simulation/operations.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper"
"github.com/cosmos/cosmos-sdk/x/simulation"
"github.com/google/uuid"

simappparams "github.com/provenance-io/provenance/app/params"

keeper "github.com/provenance-io/provenance/x/attribute/keeper"
Expand Down Expand Up @@ -60,7 +61,7 @@ func WeightedOperations(
}
}

// SimulateMsgAddAttribute will add an attribute under and account with a random type.
// SimulateMsgAddAttribute will add an attribute under an account with a random type.
func SimulateMsgAddAttribute(k keeper.Keeper, ak authkeeper.AccountKeeperI, bk bankkeeper.ViewKeeper, nk namekeeper.Keeper) simtypes.Operation {
return func(
r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string,
Expand Down Expand Up @@ -100,8 +101,6 @@ func SimulateMsgDeleteAttribute(k keeper.Keeper, ak authkeeper.AccountKeeperI, b
return func(
r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string,
) (simtypes.OperationMsg, []simtypes.FutureOperation, error) {
//simAccount, _ := simtypes.RandomAcc(r, accs)

var attributes []types.Attribute
if err := k.IterateRecords(ctx, types.AttributeKeyPrefix, func(attribute types.Attribute) error {
attributes = append(attributes, attribute)
Expand All @@ -120,8 +119,8 @@ func SimulateMsgDeleteAttribute(k keeper.Keeper, ak authkeeper.AccountKeeperI, b
if err != nil {
return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgDeleteAttribute, "name record for existing attributes not found"), nil, err
}
simAccount, _ := simtypes.FindAccount(accs, mustGetAddress(nr.Address))

simAccount, _ := simtypes.FindAccount(accs, mustGetAddress(nr.Address))
msg := types.NewMsgDeleteAttributeRequest(mustGetAddress(randomAttribute.Address), mustGetAddress(nr.Address), randomAttribute.Name)

return Dispatch(r, app, ctx, ak, bk, simAccount, chainID, msg)
Expand Down
1 change: 1 addition & 0 deletions x/attribute/simulation/operations_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (

sdk "github.com/cosmos/cosmos-sdk/types"
simtypes "github.com/cosmos/cosmos-sdk/types/simulation"

"github.com/provenance-io/provenance/app"
simappparams "github.com/provenance-io/provenance/app/params"

Expand Down

0 comments on commit 7d79e5f

Please sign in to comment.