Skip to content

Commit b6c8dc1

Browse files
committed
centchain: Disable lookup index check for successful proxy execution
1 parent a7665ed commit b6c8dc1

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

centchain/api.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -524,9 +524,8 @@ func getErrorIDFromDispatchError(value any) (*registry.ErrorID, error) {
524524
}
525525

526526
const (
527-
ProxyExecutedEventName = "Proxy.ProxyExecuted"
528-
ResultFieldName = "Result.result"
529-
ProxyExecutedExpectedLookupIndex = 41
527+
ProxyExecutedEventName = "Proxy.ProxyExecuted"
528+
ResultFieldName = "Result.result"
530529
)
531530

532531
func checkSuccessfulProxyExecution(meta *types.Metadata, events []*parser.Event, extrinsicIdx int) error {
@@ -544,7 +543,7 @@ func checkSuccessfulProxyExecution(meta *types.Metadata, events []*parser.Event,
544543
return errors.New("result field has unexpected size")
545544
}
546545

547-
if res[0].Value == nil && res[0].LookupIndex == ProxyExecutedExpectedLookupIndex {
546+
if res[0].Value == nil {
548547
// The DispatchResult is Ok(()).
549548
return nil
550549
}

centchain/api_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1107,7 +1107,7 @@ func TestApi_checkExtrinsicEventSuccess_ExtrinsicSuccess_WithProxySuccess(t *tes
11071107
Value: registry.DecodedFields{
11081108
{
11091109
Value: nil,
1110-
LookupIndex: ProxyExecutedExpectedLookupIndex,
1110+
LookupIndex: 41,
11111111
},
11121112
},
11131113
LookupIndex: 0,

0 commit comments

Comments
 (0)