Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
RogerKSI committed Feb 13, 2024
1 parent e7c5718 commit c3ac245
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
3 changes: 2 additions & 1 deletion x/oracle/simulation/decoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ import (
"bytes"
"fmt"

"github.com/bandprotocol/chain/v2/x/oracle/types"
"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/types/kv"

"github.com/bandprotocol/chain/v2/x/oracle/types"
)

// NewDecodeStore returns a decoder function closure that unmarshals the KVPair's
Expand Down
6 changes: 3 additions & 3 deletions x/oracle/simulation/genesis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@ import (
"math/rand"
"testing"

"github.com/stretchr/testify/require"

sdkmath "cosmossdk.io/math"
"github.com/cosmos/cosmos-sdk/codec"
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
"github.com/cosmos/cosmos-sdk/types/module"
moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil"
simtypes "github.com/cosmos/cosmos-sdk/types/simulation"
"github.com/stretchr/testify/require"

"github.com/bandprotocol/chain/v2/x/oracle"
"github.com/bandprotocol/chain/v2/x/oracle/simulation"
Expand Down Expand Up @@ -77,6 +76,7 @@ func TestRandomizedGenState1(t *testing.T) {
}

for _, tt := range tests {
require.Panicsf(t, func() { simulation.RandomizedGenState(&tt.simState) }, tt.panicMsg)
temp := tt
require.Panicsf(t, func() { simulation.RandomizedGenState(&temp.simState) }, tt.panicMsg)
}
}
8 changes: 4 additions & 4 deletions x/oracle/simulation/operations.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ func SimulateMsgRequestData(
// Generate request message from above information
msg := types.MsgRequestData{
Sender: simAccount.Address.String(),
OracleScriptID: types.OracleScriptID(oid),
OracleScriptID: oid,
Calldata: []byte(simtypes.RandStringOfLength(r, 100)),
AskCount: uint64(askCount),
MinCount: uint64(simtypes.RandIntBetween(r, 1, askCount+1)),
Expand Down Expand Up @@ -268,7 +268,7 @@ func SimulateMsgReportData(

// Generate report message
msg := types.MsgReportData{
RequestID: types.RequestID(rid),
RequestID: rid,
RawReports: rawReports,
Validator: sdk.ValAddress(simAccount.Address).String(),
}
Expand Down Expand Up @@ -344,7 +344,7 @@ func SimulateMsgEditDataSource(
// Generate edit data source message
msg := types.MsgEditDataSource{
Sender: simAccount.Address.String(),
DataSourceID: types.DataSourceID(did),
DataSourceID: did,
Name: simtypes.RandStringOfLength(r, 10),
Description: simtypes.RandStringOfLength(r, 100),
Executable: []byte(simtypes.RandStringOfLength(r, 100)),
Expand Down Expand Up @@ -421,7 +421,7 @@ func SimulateMsgEditOracleScript(
// Generate edit oracle script message
msg := types.MsgEditOracleScript{
Sender: simAccount.Address.String(),
OracleScriptID: types.OracleScriptID(oid),
OracleScriptID: oid,
Name: simtypes.RandStringOfLength(r, 10),
Description: simtypes.RandStringOfLength(r, 100),
Schema: simtypes.RandStringOfLength(r, 100),
Expand Down

0 comments on commit c3ac245

Please sign in to comment.