Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Handle invalid responses on batch rpc providers #3615

Merged
merged 2 commits into from
Sep 5, 2023

Conversation

hyphenized
Copy link
Contributor

@hyphenized hyphenized commented Sep 1, 2023

Fixes an issue with some RPCs returning invalid responses for batch requests, such as receiving a single error object for a batch of RPC requests when a single eth_call request fails.

Closes #3605

To Test

  • Attempt to connect to https://portal.hiddenkittencity.com/unstaked, dApp should hang in a loading state
  • Switch to this branch:
    • git fetch git@github.com:hyphenized/tally-cash.git +bad-response && git checkout bad-response
    • ...or add .diff/.patch to the end of this PR's URL and apply the diff manually 😉
  • Check that dApp doesn't hang and there are no errors logged in the background script

Latest build: extension-builds-3615 (as of Tue, 05 Sep 2023 21:18:44 GMT).

hyphenized and others added 2 commits September 1, 2023 18:16
Fixes an issue with some RPCs returning invalid responses for batch requests,
such as receiving a single error object for a batch of rpc requests when
`eth_call` fails.
Copy link
Contributor

@Shadowfiend Shadowfiend left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked this and also ran the failing e2e tests locally and things look good.

Will wait to see how the e2e tests do after the main merge, but likely landing this either way.

@Shadowfiend
Copy link
Contributor

Shadowfiend commented Sep 5, 2023

Derp I didn't look closely enough. This is just happening because it's a fork run and doesn't have the full env. Going to land as is!

@Shadowfiend Shadowfiend merged commit c190881 into tahowallet:main Sep 5, 2023
5 of 6 checks passed
@Shadowfiend Shadowfiend mentioned this pull request Sep 7, 2023
Shadowfiend added a commit that referenced this pull request Sep 8, 2023
## Highlights
- Fixed an issue where valid private keys would not be accepted. These
always had one or more `0`s at the beginning.
- Fixed an issue where certain types of errors were causing sites not to
load correctly.

## What's Changed
* v0.48.0 by @Shadowfiend in
#3610
* Attempt to import private key to validate it by @jagodarybacka in
#3614
* Group private keys when categorizing by @Shadowfiend in
#3618
* Assert URL of the scan website opened for unverified assets by
@michalinacienciala in #3602
* Handle invalid responses on batch rpc providers by @hyphenized in
#3615
* Joint Privacy: Rework analytics service event management and add
signing tracking by @Shadowfiend in
#3623


**Full Changelog**:
v0.48.0...v0.49.0

Latest build:
[extension-builds-3625](https://github.com/tahowallet/extension/suites/15924368205/artifacts/909765830)
(as of Thu, 07 Sep 2023 20:56:50 GMT).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

issue with ethers patch: TypeError: rawResult.sort is not a function
2 participants