diff --git a/centchain/api.go b/centchain/api.go index 2cf6f43fe..ef6627f18 100644 --- a/centchain/api.go +++ b/centchain/api.go @@ -524,9 +524,8 @@ func getErrorIDFromDispatchError(value any) (*registry.ErrorID, error) { } const ( - ProxyExecutedEventName = "Proxy.ProxyExecuted" - ResultFieldName = "Result.result" - ProxyExecutedExpectedLookupIndex = 41 + ProxyExecutedEventName = "Proxy.ProxyExecuted" + ResultFieldName = "Result.result" ) func checkSuccessfulProxyExecution(meta *types.Metadata, events []*parser.Event, extrinsicIdx int) error { @@ -544,7 +543,7 @@ func checkSuccessfulProxyExecution(meta *types.Metadata, events []*parser.Event, return errors.New("result field has unexpected size") } - if res[0].Value == nil && res[0].LookupIndex == ProxyExecutedExpectedLookupIndex { + if res[0].Value == nil { // The DispatchResult is Ok(()). return nil } diff --git a/centchain/api_test.go b/centchain/api_test.go index 9003867da..3b44873d5 100644 --- a/centchain/api_test.go +++ b/centchain/api_test.go @@ -1107,7 +1107,7 @@ func TestApi_checkExtrinsicEventSuccess_ExtrinsicSuccess_WithProxySuccess(t *tes Value: registry.DecodedFields{ { Value: nil, - LookupIndex: ProxyExecutedExpectedLookupIndex, + LookupIndex: 41, }, }, LookupIndex: 0,