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

fix(connector): solve WalletConnect showQrModal true will show two modals #988

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

ONLY-yours
Copy link
Collaborator

[中文版模板 / Chinese template]

💡 Background and solution

links: #982
[Bug] WalletConnect showQrModal 为 true 时,出现两个弹窗 #982

🔗 Related issue link

Copy link

changeset-bot bot commented Jun 20, 2024

⚠️ No Changeset found

Latest commit: d6e20a5

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Jun 20, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ant-design-web3 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 27, 2024 9:16am

Copy link

github-actions bot commented Jun 20, 2024

Preview is ready

@ONLY-yours
Copy link
Collaborator Author

看 wallet 里面的逻辑,直接判定 getQrCode 是否存在就能判定 useWalletConnectOfficialModal 为 true or false 了

@ONLY-yours ONLY-yours changed the title 🐛 fix: slove WalletConnect showQrModal true will be have two modal fix(connector): slove WalletConnect showQrModal true will be have two modal Jun 20, 2024
Copy link

codecov bot commented Jun 20, 2024

Codecov Report

Attention: Patch coverage is 70.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 99.98%. Comparing base (ed69c53) to head (473cd81).

Current head 473cd81 differs from pull request most recent head d6e20a5

Please upload reports for the commit d6e20a5 to get more accurate results.

Files Patch % Lines
packages/web3/src/connector/connector.tsx 66.66% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##              main     #988      +/-   ##
===========================================
- Coverage   100.00%   99.98%   -0.02%     
===========================================
  Files          720      720              
  Lines        22210    22220      +10     
  Branches      1287     1289       +2     
===========================================
+ Hits         22210    22217       +7     
- Misses           0        3       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@AmAzing129 AmAzing129 changed the title fix(connector): slove WalletConnect showQrModal true will be have two modal fix(connector): solve WalletConnect showQrModal true will show two modals Jun 20, 2024
// for special wallet, such as WalletConnect, useWalletConnectOfficialModal is true, use official modal
if (
wallet &&
wallet?.name === 'WalletConnect' &&
Copy link
Collaborator

Choose a reason for hiding this comment

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

感觉这样太硬了,想到应该不需要这里处理,感觉可以在 WalletConnect 里面判断如果有 useWalletConnectOfficialModal 这个就不要加上 getQrCode 这个方法就好了,类似 CoinBase Wallet 这样:

image

然后这种情况就直接关闭 modal

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.

[Bug] WalletConnect showQrModal 为 true 时,出现两个弹窗
3 participants