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

feat: optimized connect-button code #481

Merged
merged 10 commits into from
Jan 12, 2024

Conversation

shanchuan1
Copy link
Contributor

No description provided.

Copy link

changeset-bot bot commented Jan 9, 2024

🦋 Changeset detected

Latest commit: 557e735

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@ant-design/web3 Patch

Not sure what this means? Click here to learn what changesets are.

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

Copy link

vercel bot commented Jan 9, 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 Jan 12, 2024 8:12am

Copy link

github-actions bot commented Jan 9, 2024

Copy link

codecov bot commented Jan 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (aa67d6e) 99.54% compared to head (557e735) 99.61%.
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #481      +/-   ##
==========================================
+ Coverage   99.54%   99.61%   +0.06%     
==========================================
  Files          92       92              
  Lines        4214     4197      -17     
  Branches      433      423      -10     
==========================================
- Hits         4195     4181      -14     
+ Misses         18       15       -3     
  Partials        1        1              

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

@yutingzhao1991
Copy link
Collaborator

有两行改动测试没有覆盖到,需要加一下测试样例。

@kiner-tang
Copy link
Member

kiner-tang commented Jan 11, 2024

packages/web3/src/connect-button/connect-button.tsx Outdated Show resolved Hide resolved
@@ -94,7 +94,12 @@ describe('more-wallets-connect', () => {
});
fireEvent.click(walletItems[1]!);
await vi.waitFor(() => {
expect(baseElement.querySelector('.ant-web3-connect-modal-qr-code-box')).toBeTruthy();
const qrCodeBox = baseElement.querySelector('.ant-web3-connect-modal-qr-code-box');
if (qrCodeBox !== null) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

这边原来的写法没问题吧? 为什么要改成这样。 !== null 才except toBeTruthy 不是多余了。 然后现在落后主分支很多代码了,可以同步一下主分支的代码。

@thinkasany thinkasany requested a review from kiner-tang January 11, 2024 07:24
@yutingzhao1991
Copy link
Collaborator

覆盖率要提升下,有两行代码 miss 了。

@thinkasany
Copy link
Collaborator

@yutingzhao1991 yutingzhao1991 merged commit 79a91ff into ant-design:main Jan 12, 2024
9 checks passed
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.

4 participants