Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Logic Error in provider-jsonrpc.ts line 385 #4851

Closed
wants to merge 1 commit into from

Conversation

0xGeN02
Copy link

@0xGeN02 0xGeN02 commented Oct 2, 2024

Logical error in src.ts/providers/provider-jsonrpc.ts line 385:

Logical OR Operator (||) Grouping:

The original code had a misplaced parenthesis:

isError(error, "NETWORK_ERROR" || isError(error, "UNSUPPORTED_OPERATION")).

This caused "NETWORK_ERROR" || isError(error, "UNSUPPORTED_OPERATION") to always evaluate to "NETWORK_ERROR" (a truthy value), making the entire condition always true.

Corrected Grouping:

isError(error, "NETWORK_ERROR") || isError(error, "UNSUPPORTED_OPERATION")

Each isError function call should be individually evaluated and then combined using the || operator.
This ensures that the condition checks if the error matches any of the specified error codes correctly.

@apetersson
Copy link

See also #4837 which is basically the identical fix

@ricmoo
Copy link
Member

ricmoo commented Oct 10, 2024

OMG. That is an insane bug to still be present. I will look into it ASAP.

Thanks!

@ricmoo ricmoo added bug Verified to be an issue. on-deck This Enhancement or Bug is currently being worked on. v6 Issues regarding v6 next-patch Issues scheduled for the next arch release. labels Oct 10, 2024
@0xGeN02
Copy link
Author

0xGeN02 commented Oct 11, 2024

Thx so much for taking into consideration fixing this issue <3

@ricmoo
Copy link
Member

ricmoo commented Oct 12, 2024

This has been fixed in v6.13.4. Please let me know if you still have any issues.

Thanks! :)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Verified to be an issue. duplicate Duplicate of another issue. fixed/complete This Bug is fixed or Enhancement is complete and published. v6 Issues regarding v6
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants