-
Notifications
You must be signed in to change notification settings - Fork 72
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
Replace litConnectModal with Wagmi #751
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Removing part of the existing code makes it a breaking change. Could you please revert the changes, set them as default, add a deprecation message, and allow users to opt for WAGMI if they choose to? This way, we can release this as a minor update.
- Could we also figure out why it’s failing on the CI?
CI is failing because the PR is from a fork. CI runs in @anshss environment instead of Lit and it cannot setup shiva (gh security) |
) => { | ||
const chain = Object.values(LIT_CHAINS).find((c) => c.chainId === chainId); | ||
if (!chain) { | ||
throw new Error(`Chain ID ${chainId} not supported`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we throw a ParamsMissingError
or another LitError
? 🙏🏻
Same on all other throw Error
lines
* | ||
* @return { Promise<ConnectWeb3Result> } web3, account | ||
*/ | ||
export const connectWeb3 = async ({ | ||
export const connectWeb3WithLitConnectModal = async ({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's re-export this function as connectWeb3
too and mark both (this and the one with the original name) as deprecated to retain backwards compatibility
Description
As per this ticket, litConnectModal is now replaced with a more maintained wallet provider wagmi
Wagmi is chosen amongst other providers as most providers are built over wagmi and wagmi provides much more low-level control. It doesn't enforce any UI opinion and it have more granular error-handling capability
Please include a summary of the changes and the related issue. Please also include relevant motivation and context. List any dependencies that are required for this change.
Type of change
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration