Explorar el Código

fix: err != nil

skyfffire hace 2 años
padre
commit
924edb8726
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      internal/ethapi/api.go

+ 1 - 1
internal/ethapi/api.go

@@ -1032,7 +1032,7 @@ func (s *PublicBlockChainAPI) BatchCall(ctx context.Context, config BatchCallCon
 		//	return nil, err
 		//}
 		// If the result contains a revert reason, try to unpack it.
-		if err != nil && len(result.Revert()) > 0 {
+		if err == nil && len(result.Revert()) > 0 {
 			result.Err = newRevertError(result)
 		} else {
 			result.Err = err