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

Remove usage of external RPC #420

Merged

Conversation

Jeday
Copy link
Contributor

@Jeday Jeday commented Aug 1, 2024

Problem

We use walletRPC for extra things apart from just sending TX for signing. This is not a problem when wallet is MetaMask, it handles extra RPC requests fine. For WalletConntect it's a problem because it does not have internal RPC, it uses default one from wagmi config. When users get rate limited by eth-cloudfare, it prevents tx signing and brings a whole lotta problems.

Solution

  • remove usage of wallet rpc before/after sending TXs, do estimate gas and wait for TX with our static RPC
  • upgrade wagmi to update wagmi walletConnect connector, new version now correctly sets RPC urls to ours instead of defaults

Extra

added mock-qa-helpers-force-approval-withdrawal-wallet-connect local storage mock

//  to enable permit on wc
localStorage.setItem('mock-qa-helpers-force-approval-withdrawal-wallet-connect',"false")
// to force approval flow on any wallet
localStorage.setItem('mock-qa-helpers-force-approval-withdrawal-wallet-connect',"true")
// to revert to default behavior
localStorage.removeItem('mock-qa-helpers-force-approval-withdrawal-wallet-connect')

@Jeday Jeday requested review from a team as code owners August 1, 2024 09:44
@Jeday Jeday changed the title Revert Revert [fix] remove usage of wallet rpc during tx Revert of Revert [fix] remove usage of wallet rpc during tx Aug 1, 2024
@preview-stands
Copy link

preview-stands bot commented Aug 1, 2024

Preview stand status

Stand was demolished

DiRaiks
DiRaiks previously approved these changes Aug 1, 2024
@Jeday Jeday changed the title Revert of Revert [fix] remove usage of wallet rpc during tx Remove usage of external RPC Aug 2, 2024
DiRaiks
DiRaiks previously approved these changes Aug 5, 2024
…get into revert-412-revert-404-feature/si-1493-wallet-rpc-sync-error
@itaven itaven merged commit adc1088 into develop Aug 6, 2024
10 checks passed
@itaven itaven deleted the revert-412-revert-404-feature/si-1493-wallet-rpc-sync-error branch August 6, 2024 12:03
@itaven itaven mentioned this pull request Aug 8, 2024
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.

3 participants