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

[ENG-113 | Public Client] Swap wagmi's usePublicClient with custom client #2677

Merged
merged 17 commits into from
Jan 22, 2025

Conversation

Da-Colon
Copy link
Contributor

@Da-Colon Da-Colon commented Jan 17, 2025

Part 1 of 3.
- Swap Public Client <------
- Swap Wallet Client
- Find and Update any other hooks

Swap out of usePublicClient with useNetworkPublicClient which keeps control of what network is interacted with based on the currently set network config.

Other Updates

  • removed !publicClient conditionals as no longer the case
  • memoized the createPublicClient return (was causing problems otherwise)
  • found a few places where public client was being used as a dependency but not being used.

Copy link

linear bot commented Jan 17, 2025

@Da-Colon Da-Colon changed the title [ENG-113] Swap wagmi's usePublicClient with custom client [ENG-113 | Public Client] Swap wagmi's usePublicClient with custom client Jan 17, 2025
Copy link
Member

@adamgall adamgall left a comment

Choose a reason for hiding this comment

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

looks good ship it

@@ -45,7 +38,7 @@ const useAddress = (addressInput: string) => {
setIsLoading(false);
return;
}

// @todo this should be mainnet?
Copy link
Member

Choose a reason for hiding this comment

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

at first glance, yes

Copy link

cloudflare-workers-and-pages bot commented Jan 17, 2025

Deploying decent-interface with  Cloudflare Pages  Cloudflare Pages

Latest commit: 198330b
Status: ✅  Deploy successful!
Preview URL: https://6f7e09f2.decent-interface.pages.dev
Branch Preview URL: https://eng-113-swap-usepublicclient.decent-interface.pages.dev

View logs

Copy link
Contributor

@DarksightKellar DarksightKellar left a comment

Choose a reason for hiding this comment

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

🤌🏾

@Da-Colon Da-Colon merged commit 395661a into develop Jan 22, 2025
4 checks passed
@Da-Colon Da-Colon deleted the eng-113-swap-usePublicClient branch January 22, 2025 06:46
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.

5 participants