Skip to content

Commit

Permalink
Remove duplicate message
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Broadhurst <[email protected]>
  • Loading branch information
peterbroadhurst committed Dec 3, 2023
1 parent f470ea1 commit 04de049
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 21 deletions.
11 changes: 0 additions & 11 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,13 @@ github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeME
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs=
github.com/go-openapi/jsonpointer v0.20.0 h1:ESKJdU9ASRfaPNOPRx12IUyA1vn3R9GiE3KYD14BXdQ=
github.com/go-openapi/jsonpointer v0.20.0/go.mod h1:6PGzBjjIIumbLYysB73Klnms1mwnU4G3YHOECG3CedA=
github.com/go-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogBU=
github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14=
github.com/go-resty/resty/v2 v2.7.0 h1:me+K9p3uhSmXtrBZ4k9jcEAfJmuC8IivWHwaLZwPrFY=
github.com/go-resty/resty/v2 v2.7.0/go.mod h1:9PWDzw47qPphMRFfhsyk0NnSgvluHcljSMVIq3w7q0I=
github.com/go-test/deep v1.0.8 h1:TDsG77qcSprGbC6vTN8OuXp5g+J+b5Pcguhf7Zt61VM=
github.com/go-test/deep v1.0.8/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
Expand Down Expand Up @@ -158,8 +156,6 @@ github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
github.com/hyperledger/firefly-common v1.4.0 h1:V5ikWLKkpT7XOmrpD/8MEpeQMamgFYI8JuffwXdLb3A=
github.com/hyperledger/firefly-common v1.4.0/go.mod h1:79ZrPclGZwBOqyapN0qNR+EWZm5BSvXfmCfbBEABYbM=
github.com/hyperledger/firefly-common v1.4.1-0.20231129162504-c603e8182052 h1:HCOU/wsY3SvD6M5qHt4j4RgV8s/eFtvPiqo6VHDZNis=
github.com/hyperledger/firefly-common v1.4.1-0.20231129162504-c603e8182052/go.mod h1:79ZrPclGZwBOqyapN0qNR+EWZm5BSvXfmCfbBEABYbM=
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
Expand All @@ -171,11 +167,8 @@ github.com/invopop/yaml v0.2.0/go.mod h1:2XuRLgs/ouIrW3XNzuNj7J3Nvu/Dig5MXvbCEdi
github.com/jarcoal/httpmock v1.2.0 h1:gSvTxxFR/MEMfsGrvRbdfpRUMBStovlSRLw0Ep1bwwc=
github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY=
github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=
github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4=
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM=
github.com/karlseguin/ccache v2.0.3+incompatible h1:j68C9tWOROiOLWTS/kCGg9IcJG+ACqn5+0+t8Oh83UU=
github.com/karlseguin/ccache v2.0.3+incompatible/go.mod h1:CM9tNPzT6EdRh14+jiW8mEF9mkNZuuE51qmgGYUB93w=
github.com/karlseguin/expect v1.0.8 h1:Bb0H6IgBWQpadY25UDNkYPDB9ITqK1xnSoZfAq362fw=
Expand All @@ -201,11 +194,8 @@ github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d h1:5PJl274Y63IEHC+7izoQ
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE=
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9M+97sNutRR1RKhG96O6jWumTTnw=
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8=
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
Expand Down Expand Up @@ -272,7 +262,6 @@ github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXl
github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8=
github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU=
github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0=
github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY=
github.com/wsxiaoys/terminal v0.0.0-20160513160801-0940f3fc43a0 h1:3UeQBvD0TFrlVjOeLOBz+CPAI8dnbqNSVwUwRrkp7vQ=
github.com/wsxiaoys/terminal v0.0.0-20160513160801-0940f3fc43a0/go.mod h1:IXCdmsXIht47RaVFLEdVnh1t+pgYtTAhQGj73kz+2DM=
github.com/x-cray/logrus-prefixed-formatter v0.5.2 h1:00txxvfBM9muc0jiLIEAkAcIMJzfthRT6usrui8uGmg=
Expand Down
7 changes: 3 additions & 4 deletions internal/signermsgs/en_error_messges.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,17 +85,16 @@ var (
MsgSubscribeResponseInvalid = ffe("FF22066", "Subscription response invalid")
MsgWebSocketReconnected = ffe("FF22067", "WebSocket reconnected during JSON/RPC call")
MsgContextCancelledWSConnect = ffe("FF22068", "Context canceled while connecting WebSocket")
MsgEIP712UnknownABICompType = ffe("FF22069", "Unknown ABI component type: %s")
MsgNotElementary = ffe("FF22070", "Not elementary type: %s")
MsgNotElementary = ffe("FF22069", "Not elementary type: %s")
MsgEIP712UnknownABICompType = ffe("FF22070", "Unknown ABI component type: %s")
MsgEIP712UnsupportedStrType = ffe("FF22071", "Unsupported type: %s")
MsgEIP712UnsupportedABIType = ffe("FF22072", "ABI type not supported by EIP-712 encoding: %s")
MsgNotABIElementaryType = ffe("FF22073", "Not elementary type: %s")
MsgEIP712TypeNotFound = ffe("FF22073", "Type '%s' not found in type map")
MsgEIP712PrimaryNotTuple = ffe("FF22074", "Type primary type must be a struct/tuple: %s")
MsgEIP712BadInternalType = ffe("FF22075", "Failed to extract struct name from ABI internalType '%s'")
MsgEIP712ValueNotMap = ffe("FF22076", "Value for struct '%s' not a map (%T)")
MsgEIP712InvalidArraySuffix = ffe("FF22077", "Type '%s' has invalid array suffix")
MsgEIP712ValueNotArray = ffe("FF22078", "Value for '%s' not an array (%T)")
MsgEIP712InvalidArrayLen = ffe("FF22079", "Value for '%s' must have %d entries (found %d)")
MsgEIP712PrimaryTypeRequired = ffe("FF22080", "Primary type must be specified")
MsgEIP712TypeNotFound = ffe("FF22081", "Type '%s' not found in type map")
)
2 changes: 1 addition & 1 deletion pkg/abi/inputparsing.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func (cv *ComponentValue) ElementaryABIDataCtx(ctx context.Context) (data []byte
c := cv.Component
et := cv.Component.ElementaryType().(*elementaryTypeInfo)
if et == nil {
return nil, false, i18n.NewError(ctx, signermsgs.MsgNotABIElementaryType, c.String())
return nil, false, i18n.NewError(ctx, signermsgs.MsgNotElementary, c.String())
}
return et.encodeABIData(ctx, c.String(), c.(*typeComponent), cv.Value)
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/abi/inputparsing_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,7 @@ func TestTupleEncodeIndividualFixedParam(t *testing.T) {
assert.Equal(t, TupleComponent, cv.Component.ComponentType())
assert.Len(t, cv.Children, 1)
_, _, err = cv.ElementaryABIData()
assert.Regexp(t, "FF22073", err)
assert.Regexp(t, "FF22069", err)

intComp := cv.Children[0]
assert.Equal(t, ElementaryComponent, intComp.Component.ComponentType())
Expand Down
2 changes: 1 addition & 1 deletion pkg/eip712/abi_to_typed_data_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ func TestMapElementaryABITypeNonElementary(t *testing.T) {
assert.NoError(t, err)

_, err = mapElementaryABIType(context.Background(), tc)
assert.Regexp(t, "FF22070", err)
assert.Regexp(t, "FF22069", err)

}

Expand Down
4 changes: 2 additions & 2 deletions pkg/eip712/typed_data_v4_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ func TestMissingPrimaryType(t *testing.T) {

ctx := context.Background()
_, err = EncodeTypedDataV4(ctx, &p)
assert.Regexp(t, "FF22081", err)
assert.Regexp(t, "FF22073", err)
}

func TestSecondaryTypeNotMap(t *testing.T) {
Expand Down Expand Up @@ -515,7 +515,7 @@ func TestTupleNotSupported(t *testing.T) {

ctx := context.Background()
_, err = EncodeTypedDataV4(ctx, &p)
assert.Regexp(t, "FF22070", err)
assert.Regexp(t, "FF22069", err)
}

func TestAddressInvalid(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/ethsigner/typed_data_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func TestSignTypedDataV4BadPayload(t *testing.T) {

ctx := context.Background()
_, err = SignTypedDataV4(ctx, keypair, payload)
assert.Regexp(t, "FF22081", err)
assert.Regexp(t, "FF22073", err)
}

func TestSignTypedDataV4SignFail(t *testing.T) {
Expand Down

0 comments on commit 04de049

Please sign in to comment.