diff --git a/x/auth/tx/service.go b/x/auth/tx/service.go index 6bc4c95120c0..52c788fd6c75 100644 --- a/x/auth/tx/service.go +++ b/x/auth/tx/service.go @@ -45,7 +45,8 @@ var ( _ txtypes.ServiceServer = txServer{} // EventRegex checks that an event string is formatted with {alphabetic}.{alphabetic}={value} - EventRegex = regexp.MustCompile(`^[a-zA-Z_]+\.[a-zA-Z_]+=\S+$`) + // Note: in addition to equality, the `>=` and `<=` operators are also valid. + EventRegex = regexp.MustCompile(`^[a-zA-Z_]+\.[a-zA-Z_]+[<>]?=\S+$`) ) const ( diff --git a/x/auth/tx/service_test.go b/x/auth/tx/service_test.go index e61abadd7a48..e80a3891ba74 100644 --- a/x/auth/tx/service_test.go +++ b/x/auth/tx/service_test.go @@ -184,6 +184,16 @@ func TestEventRegex(t *testing.T) { event: "tx.signature='foobar/baz123=='", match: true, }, + { + name: "valid: with >= operator", + event: "tx.height>=10'", + match: true, + }, + { + name: "valid: with <= operator", + event: "tx.height<=10'", + match: true, + }, } for _, tc := range testCases {