Skip to content

Commit

Permalink
another errors fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-tron committed Apr 12, 2024
1 parent 53f462c commit b6138b1
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions abi/contracts_errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,14 @@ var defaultExitCodes = map[int32]string{
}

func GetContractError(interfaces []ContractInterface, code int32) *string {
errors := defaultExitCodes
for _, i := range interfaces {
e, ok := contractErrors[i]
if ok {
errors = e
break
if errors, ok := contractErrors[i]; ok {
if msg, ok := errors[code]; ok {
return &msg
}
}
}
if msg, ok := errors[code]; ok {
if msg, ok := defaultExitCodes[code]; ok {
return &msg
}
return nil
Expand Down

0 comments on commit b6138b1

Please sign in to comment.