Skip to content

Commit

Permalink
Comment update
Browse files Browse the repository at this point in the history
  • Loading branch information
Olshansk committed Aug 21, 2024
1 parent e1e6197 commit 5bd445a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -948,12 +948,12 @@ func parseRelaySuccessfulOutput(bodyBytes []byte, requestStatusCode int) (*Relay

isValidJson := json.Valid([]byte(output.Response))

// Check if there's explicitly a "result" text field.
// - result present -> 200 (success)
// - result not present -> check the status (if available)
// Check if there's explicitly a "result" text field (most JSON RPC chains)
// - result present -> 200 (success)
// - result not present -> check the status (if available)
// LEGACY_TECHDEBT: REST chains do not have a result field, so there's no perfect
// solution here.
// - Result not present && json is valid -> 200
// - result not present && json is valid -> 200
// - result not present && json is invalid -> extract from response
if strings.Contains(output.Response, resultText) {
output.StatusCode = http.StatusOK
Expand Down

0 comments on commit 5bd445a

Please sign in to comment.