Skip to content

Commit

Permalink
refactor: cleanup of redundant TODO comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Lockwarr committed Feb 16, 2023
1 parent 06113ac commit 9b9c4c4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 14 deletions.
12 changes: 6 additions & 6 deletions wasmbinding/test/custom_message_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (

type CustomMessengerTestSuite struct {
testutil.IBCConnectionTestSuite
neutron *app.App // TODO: nolus?
neutron *app.App
ctx sdk.Context
messenger *wasmbinding.CustomMessenger
contractOwner sdk.AccAddress
Expand All @@ -34,12 +34,12 @@ type CustomMessengerTestSuite struct {

func (suite *CustomMessengerTestSuite) SetupTest() {
suite.IBCConnectionTestSuite.SetupTest()
suite.neutron = suite.GetNeutronZoneApp(suite.ChainA) // TODO: nolus?
suite.neutron = suite.GetNeutronZoneApp(suite.ChainA)
suite.ctx = suite.ChainA.GetContext()
suite.messenger = &wasmbinding.CustomMessenger{}
suite.messenger.Ictxmsgserver = ictxkeeper.NewMsgServerImpl(suite.neutron.InterchainTxsKeeper) // TODO: nolus?
suite.messenger.Keeper = suite.neutron.InterchainTxsKeeper // TODO: nolus?
suite.messenger.Icqmsgserver = icqkeeper.NewMsgServerImpl(suite.neutron.InterchainQueriesKeeper) // TODO: nolus?
suite.messenger.Ictxmsgserver = ictxkeeper.NewMsgServerImpl(suite.neutron.InterchainTxsKeeper)
suite.messenger.Keeper = suite.neutron.InterchainTxsKeeper
suite.messenger.Icqmsgserver = icqkeeper.NewMsgServerImpl(suite.neutron.InterchainQueriesKeeper)
suite.contractOwner = keeper.RandomAccountAddress(suite.T())
}

Expand Down Expand Up @@ -237,7 +237,7 @@ func (suite *CustomMessengerTestSuite) TestSubmitTx() {

senderAddress := suite.ChainA.SenderAccounts[0].SenderAccount.GetAddress()
coinsAmnt := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(int64(10_000_000))))
bankKeeper := suite.neutron.BankKeeper // TODO: nolus?
bankKeeper := suite.neutron.BankKeeper
err := bankKeeper.SendCoins(suite.ctx, senderAddress, suite.contractAddress, coinsAmnt)
suite.Require().NoError(err)

Expand Down
15 changes: 7 additions & 8 deletions wasmbinding/test/custom_query_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ type CustomQuerierTestSuite struct {

func (suite *CustomQuerierTestSuite) TestInterchainQueryResult() {
var (
neutron = suite.GetNeutronZoneApp(suite.ChainA) // TODO: nolus?
neutron = suite.GetNeutronZoneApp(suite.ChainA)
ctx = suite.ChainA.GetContext()
owner = keeper.RandomAccountAddress(suite.T()) // We don't care what this address is
)
Expand All @@ -38,8 +38,8 @@ func (suite *CustomQuerierTestSuite) TestInterchainQueryResult() {

// Register and submit query result
clientKey := host.FullClientStateKey(suite.Path.EndpointB.ClientID)
lastID := neutron.InterchainQueriesKeeper.GetLastRegisteredQueryKey(ctx) + 1 // TODO: nolus?
neutron.InterchainQueriesKeeper.SetLastRegisteredQueryKey(ctx, lastID) // TODO: nolus?
lastID := neutron.InterchainQueriesKeeper.GetLastRegisteredQueryKey(ctx) + 1
neutron.InterchainQueriesKeeper.SetLastRegisteredQueryKey(ctx, lastID)
registeredQuery := icqtypes.RegisteredQuery{
Id: lastID,
Keys: []*icqtypes.KVKey{
Expand All @@ -49,8 +49,8 @@ func (suite *CustomQuerierTestSuite) TestInterchainQueryResult() {
UpdatePeriod: 1,
ConnectionId: suite.Path.EndpointA.ConnectionID,
}
neutron.InterchainQueriesKeeper.SetLastRegisteredQueryKey(ctx, lastID) // TODO: nolus?
err := neutron.InterchainQueriesKeeper.SaveQuery(ctx, registeredQuery) // TODO: nolus?
neutron.InterchainQueriesKeeper.SetLastRegisteredQueryKey(ctx, lastID)
err := neutron.InterchainQueriesKeeper.SaveQuery(ctx, registeredQuery)
suite.Require().NoError(err)

chainBResp := suite.ChainB.App.Query(abci.RequestQuery{
Expand All @@ -72,7 +72,7 @@ func (suite *CustomQuerierTestSuite) TestInterchainQueryResult() {
Height: uint64(chainBResp.Height),
Revision: suite.ChainA.LastHeader.GetHeight().GetRevisionNumber(),
}
err = neutron.InterchainQueriesKeeper.SaveKVQueryResult(ctx, lastID, expectedQueryResult) // TODO: nolus?
err = neutron.InterchainQueriesKeeper.SaveKVQueryResult(ctx, lastID, expectedQueryResult)
suite.Require().NoError(err)

// Query interchain query result
Expand Down Expand Up @@ -145,7 +145,6 @@ func (suite *CustomQuerierTestSuite) TestInterchainAccountAddress() {
err = suite.queryCustom(ctx, contractAddress, query, &resp)
suite.Require().NoError(err)

// TODO: do we even want this? Nolus won't be able to host ICA's as of now
hostNeutronApp, ok := suite.ChainB.App.(*app.App)
suite.Require().True(ok)

Expand Down Expand Up @@ -202,7 +201,7 @@ func (suite *CustomQuerierTestSuite) queryCustom(ctx sdk.Context, contract sdk.A
return err
}

resBz, err := suite.GetNeutronZoneApp(suite.ChainA).WasmKeeper.QuerySmart(ctx, contract, queryBz) // TODO: nolus?
resBz, err := suite.GetNeutronZoneApp(suite.ChainA).WasmKeeper.QuerySmart(ctx, contract, queryBz)
if err != nil {
return err
}
Expand Down

0 comments on commit 9b9c4c4

Please sign in to comment.