Skip to content

Commit d12bb4d

Browse files
committed
Tidy
1 parent fe7fd23 commit d12bb4d

2 files changed

Lines changed: 2 additions & 21 deletions

File tree

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ require (
1313
github.com/kylelemons/godebug v1.1.0
1414
github.com/leanovate/gopter v0.2.11
1515
github.com/lib/pq v1.10.9
16+
github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4
1617
github.com/onsi/gomega v1.36.2
1718
github.com/pelletier/go-toml/v2 v2.2.4
1819
github.com/pkg/errors v0.9.1
@@ -125,7 +126,6 @@ require (
125126
github.com/mattn/go-colorable v0.1.14 // indirect
126127
github.com/mattn/go-isatty v0.0.20 // indirect
127128
github.com/mattn/go-runewidth v0.0.16 // indirect
128-
github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect
129129
github.com/mitchellh/pointerstructure v1.2.0 // indirect
130130
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
131131
github.com/modern-go/reflect2 v1.0.2 // indirect

pkg/txm/clientwrappers/dualbroadcast/meta_client.go

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ import (
1010
"math/big"
1111
"net/http"
1212
"net/url"
13-
"reflect"
1413
"strings"
1514
"time"
1615

1716
"github.com/ethereum/go-ethereum/accounts/abi"
1817
"github.com/ethereum/go-ethereum/common"
1918
"github.com/ethereum/go-ethereum/common/hexutil"
2019
evmtypes "github.com/ethereum/go-ethereum/core/types"
20+
2121
"github.com/mitchellh/mapstructure"
2222

2323
"github.com/smartcontractkit/chainlink-common/pkg/logger"
@@ -461,22 +461,3 @@ func (a *MetaClient) SendOperation(ctx context.Context, tx *types.Transaction, a
461461
"TipCap", tip, "FeeCap", meta.MaxFeePerGas)
462462
return a.c.SendTransaction(ctx, signedTx)
463463
}
464-
465-
func verifyRaw(raw any) (reflect.Value, error) {
466-
rv := reflect.ValueOf(raw)
467-
if !rv.IsValid() {
468-
return rv, errors.New("raw is invalid")
469-
}
470-
471-
if rv.Kind() == reflect.Pointer || rv.Kind() == reflect.Interface {
472-
if rv.IsNil() {
473-
return rv, errors.New("raw is nil")
474-
}
475-
rv = rv.Elem()
476-
}
477-
478-
if rv.Kind() != reflect.Struct {
479-
return rv, fmt.Errorf("raw is not a struct, got %s", rv.Kind())
480-
}
481-
return rv, nil
482-
}

0 commit comments

Comments
 (0)