Skip to content

Commit

Permalink
fix(evm): wrong type of thing being pushed back to the contract call …
Browse files Browse the repository at this point in the history
…queue (#1391)
  • Loading branch information
fish-sammy committed Mar 22, 2022
1 parent fad49c8 commit c6e0529
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions x/evm/keeper/msg_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -341,14 +341,7 @@ func (s msgServer) CreateApproveContractCalls(c context.Context, req *types.Crea

// TODO: decide what to do with invalid events other than simply pushing them back to the queue
for _, event := range invalidEvents {
key := utils.LowerCaseKey(event.GetID())

switch event := event.GetEvent().(type) {
case *types.Event_ContractCallWithToken:
queue.Enqueue(key, event.ContractCallWithToken)
default:
return nil, fmt.Errorf("unsupported event type %T", event)
}
queue.Enqueue(utils.LowerCaseKey(event.GetID()), &event)
}

return &types.CreateApproveContractCallsResponse{}, nil
Expand Down

0 comments on commit c6e0529

Please sign in to comment.