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

Issue when no wallet is attached to the browser #110

Merged
merged 4 commits into from
Apr 19, 2024

Conversation

carlosgj94
Copy link
Collaborator

No description provided.

@carlosgj94
Copy link
Collaborator Author

This is not the ideal scenario, but for now this seems to fix the problems related to builds.
I think medium/short term we might need to get rid of the SSR in wagmi for privacy reasons. Need to research more into that.

Ready for review @xavikh

@carlosgj94 carlosgj94 requested a review from xavikh April 19, 2024 08:20
Copy link
Contributor

@xavikh xavikh left a comment

Choose a reason for hiding this comment

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

Just a few minor comments

},
connectors: [
walletConnect({
projectId: PUB_WALLET_CONNECT_PROJECT_ID,
metadata,
showQrModal: false,
}),
injected({ shimDisconnect: true }),
// coinbaseWallet({ appName: metadata.name, appLogoUrl: metadata.icons[0] }),
Copy link
Contributor

Choose a reason for hiding this comment

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

Not enabled?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Right now coinbaseWallet only works without SSR. If we enable it, it fulls the console with errors.
We can enable it if we go to prod, but at least when developing it's quite annoying

Copy link
Contributor

Choose a reason for hiding this comment

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

If we don't find a fix then we should consider rolling back enabling SSR

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The warning/error appears in general in Next, doesn't matter if SSR in wagmi or not.

To be clear, it does work. It just shows an error in the console because the backend fails to run that piece of the code.

},
connectors: [
walletConnect({
projectId: PUB_WALLET_CONNECT_PROJECT_ID,
metadata,
showQrModal: false,
}),
injected({ shimDisconnect: true }),
Copy link
Contributor

Choose a reason for hiding this comment

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

Why don't we want to use the injected one?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Nope, it comes by default with the Metamask id. If you add it, it shows metamask twice

Copy link
Contributor

Choose a reason for hiding this comment

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

I see, nice catch then!

hooks/useSkipFirstRender.tsx Outdated Show resolved Hide resolved
Copy link
Contributor

@xavikh xavikh left a comment

Choose a reason for hiding this comment

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

LGTM

@carlosgj94 carlosgj94 merged commit d94c840 into main Apr 19, 2024
2 checks passed
@xavikh xavikh deleted the fix/254-issue-when-no-wallet branch April 23, 2024 12:08
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.

2 participants