Skip to content

Commit

Permalink
use interface instead of any
Browse files Browse the repository at this point in the history
  • Loading branch information
masihyeganeh committed Jan 28, 2025
1 parent dc1f51b commit 16eece5
Show file tree
Hide file tree
Showing 9 changed files with 68 additions and 68 deletions.
2 changes: 1 addition & 1 deletion relayer/client/bridge.go
Original file line number Diff line number Diff line change
Expand Up @@ -1363,7 +1363,7 @@ func ReadKeysRotationConfig(filePath string) (KeysRotationConfig, error) {
return config, nil
}

func saveConfigToFile(filePath string, srt any) error {
func saveConfigToFile(filePath string, srt interface{}) error {
dirPath := filepath.Dir(filePath)
if err := os.MkdirAll(dirPath, 0o700); err != nil {
return errors.Errorf("failed to create dirs by path:%s", dirPath)
Expand Down
64 changes: 32 additions & 32 deletions relayer/cmd/cli/cli_mocks_test.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion relayer/coreum/contract.go
Original file line number Diff line number Diff line change
Expand Up @@ -1764,7 +1764,7 @@ func (c *ContractClient) execute(
return res, nil
}

func (c *ContractClient) query(ctx context.Context, request, response any) error {
func (c *ContractClient) query(ctx context.Context, request, response interface{}) error {
if c.cfg.ContractAddress == nil {
return errors.New("failed to execute with empty contract address")
}
Expand Down
24 changes: 12 additions & 12 deletions relayer/logger/mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 14 additions & 14 deletions relayer/processes/model_mocks_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion relayer/tracing/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func GetTracingXRPLTxHash(ctx context.Context) string {
return getTracingCtxValue(ctx, tracingXRPLTxHashKey{})
}

func getTracingCtxValue(ctx context.Context, key any) string {
func getTracingCtxValue(ctx context.Context, key interface{}) string {
v, ok := ctx.Value(key).(string)
if !ok {
return ""
Expand Down
2 changes: 1 addition & 1 deletion relayer/xrpl/rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ func (c *RPCClient) RipplePathFind(
return result, nil
}

func (c *RPCClient) callRPC(ctx context.Context, method string, params, result any) error {
func (c *RPCClient) callRPC(ctx context.Context, method string, params, result interface{}) error {
request := RPCRequest{
Method: method,
Params: []any{
Expand Down
2 changes: 1 addition & 1 deletion relayer/xrpl/rpc_mocks_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions relayer/xrpl/scanner_mocks_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 16eece5

Please sign in to comment.