Skip to content

Commit

Permalink
lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
lumtis committed Apr 7, 2024
1 parent e5f9db9 commit ee38e86
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion testutil/keeper/crosschain.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func CrosschainKeeperWithMocks(

// Create zeta keepers
authorityKeeperTmp := initAuthorityKeeper(cdc, db, stateStore)
lightclientKeeperTmp := initLightclientKeeper(cdc, db, stateStore)
lightclientKeeperTmp := initLightclientKeeper(cdc, db, stateStore, authorityKeeperTmp)
observerKeeperTmp := initObserverKeeper(
cdc,
db,
Expand Down
6 changes: 4 additions & 2 deletions testutil/keeper/emissions.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ func EmissionKeeperWithMockOptions(
// Create regular keepers
sdkKeepers := NewSDKKeepers(cdc, db, stateStore)

authorityKeeper := initAuthorityKeeper(cdc, db, stateStore)

// Create zeta keepers
observerKeeperTmp := initObserverKeeper(
cdc,
Expand All @@ -49,8 +51,8 @@ func EmissionKeeperWithMockOptions(
sdkKeepers.StakingKeeper,
sdkKeepers.SlashingKeeper,
sdkKeepers.ParamsKeeper,
initAuthorityKeeper(cdc, db, stateStore),
initLightclientKeeper(cdc, db, stateStore),
authorityKeeper,
initLightclientKeeper(cdc, db, stateStore, authorityKeeper),
)

zetaKeepers := ZetaKeepers{
Expand Down
1 change: 1 addition & 0 deletions testutil/keeper/fungible.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ func FungibleKeeperWithMocks(t testing.TB, mockOptions FungibleMockOptions) (*ke
cdc,
db,
stateStore,
authorityKeeperTmp,
)

// Create observer keeper
Expand Down
6 changes: 2 additions & 4 deletions x/crosschain/types/tx_body_verification.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@ func VerifyInTxBody(
// verify message against transaction body
if chains.IsEVMChain(msg.ChainId) {
return VerifyInTxBodyEVM(msg, txBytes, chainParams, tss)
} else {
return fmt.Errorf("cannot verify inTx body for chain %d", msg.ChainId)
}
return fmt.Errorf("cannot verify inTx body for chain %d", msg.ChainId)
}

// VerifyInTxBodyEVM validates the chain id and connector contract address for Zeta, ERC20 custody contract address for ERC20 and TSS address for Gas.
Expand Down Expand Up @@ -81,9 +80,8 @@ func VerifyOutTxBody(msg MsgAddToOutTxTracker, txBytes []byte, tss observertypes
return VerifyOutTxBodyEVM(msg, txBytes, tss.Eth)
} else if chains.IsBitcoinChain(msg.ChainId) {
return VerifyOutTxBodyBTC(msg, txBytes, tss.Btc)
} else {
return fmt.Errorf("cannot verify outTx body for chain %d", msg.ChainId)
}
return fmt.Errorf("cannot verify outTx body for chain %d", msg.ChainId)
}

// VerifyOutTxBodyEVM validates the sender address, nonce, chain id and tx hash.
Expand Down
9 changes: 5 additions & 4 deletions x/lightclient/module.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package lightclient

import (
"context"
"encoding/json"
"fmt"

Expand Down Expand Up @@ -74,10 +75,10 @@ func (AppModuleBasic) RegisterRESTRoutes(_ client.Context, _ *mux.Router) {

// RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the module.
func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) {
//err := types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx))
//if err != nil {
// fmt.Println("RegisterQueryHandlerClient err: %w", err)
//}
err := types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx))
if err != nil {
fmt.Println("RegisterQueryHandlerClient err: %w", err)
}
}

// GetTxCmd returns the lightclient module's root tx command.
Expand Down

0 comments on commit ee38e86

Please sign in to comment.