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

chore: adapter client improvements #3484

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

Conversation

magiziz
Copy link
Contributor

@magiziz magiziz commented Dec 17, 2024

Description

We’re currently facing hydration and connector issues because of how our adapters are initialized. This PR cleanup will make sure that both adapters and connectors are prepared right at the start of the appkit client initialization rather than waiting for some async operations to complete.

Also we no longer need to dynamically import the siwe package in the appkit client as this is now handled at the SIWE client level 🙏

Type of change

  • Chore (non-breaking change that addresses non-functional tasks, maintenance, or code quality improvements)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Associated Issues

For Linear issues: Closes APKT-1376

Checklist

  • Code in this PR is covered by automated tests (Unit tests, E2E tests)
  • My changes generate no new warnings
  • I have reviewed my own code
  • I have filled out all required sections
  • I have tested my changes on the preview link
  • Approver of this PR confirms that the changes are tested on the preview link

Copy link

linear bot commented Dec 17, 2024

Copy link

changeset-bot bot commented Dec 17, 2024

⚠️ No Changeset found

Latest commit: 86ae60e

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 Dec 17, 2024

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

Name Status Preview Comments Updated (UTC)
appkit-builder ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 17, 2024 7:28pm
appkit-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 17, 2024 7:28pm
appkit-laboratory ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 17, 2024 7:28pm
appkit-vue-solana ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 17, 2024 7:28pm
appkit-wagmi-cdn-example ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 17, 2024 7:28pm
vue-wagmi-example ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 17, 2024 7:28pm

Copy link
Contributor

github-actions bot commented Dec 17, 2024

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 54.02% 14894 / 27570
🔵 Statements 54.02% 14894 / 27570
🔵 Functions 40.93% 1077 / 2631
🔵 Branches 75.18% 1906 / 2535
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/adapters/wagmi/src/client.ts 71.74% 55.4% 70.96% 71.74% 101-126, 147, 176-188, 192-195, 226, 228, 257-258, 309-312, 317-318, 328-329, 365-366, 395, 400-415, 418-435, 444-445, 449-450, 467-477, 516, 520-523, 543-544, 550-551, 556-557, 561-566, 573-574, 580-581, 586-587, 596-597, 603-604, 609-610
packages/adapters/wagmi/src/connectors/AuthConnector.ts 6.3% 100% 50% 6.3% 30-31, 34-159
packages/appkit/src/client.ts 19.41% 100% 0% 19.41% 196-203, 206-207, 210-242, 246-251, 254-256, 259-260, 264-265, 268-269, 272-281, 284-287, 290-293, 296-297, 300-301, 304-305, 308-310, 313-314, 317-318, 321-323, 326-327, 330-331, 334-345, 348-357, 360-361, 364-365, 368-369, 372-373, 376-377, 380-381, 384-385, 388-389, 392-393, 396-397, 400-401, 404-405, 408-409, 412-413, 416-419, 624-625, 628-631, 634-635, 638-639, 642-643, 646-647, 650-651, 654-658, 662-742, 745-756, 759-779, 782-788, 791-800, 803-1112, 1115-1116, 1119-1251, 1254-1294, 1297-1365, 1368-1377, 1380-1390, 1393-1471, 1474-1494, 1497-1508, 1511-1536, 1542-1563, 1566-1605, 1608-1651, 1654-1665, 1668-1680, 1683-1723, 1726-1727, 1730-1739, 1742-1759, 1762-1785, 1788-1797, 1800-1816, 1819-1824, 1827-1832, 1835-1867, 1870-1872, 1875-1878, 1881-1889, 1892-1902, 1905-1921
packages/appkit/src/adapters/ChainAdapterBlueprint.ts 46.15% 70% 45.45% 46.15% 92-93, 100-109, 116-125, 133-152, 157-158, 169-170, 179-184, 193-197, 208-209
packages/appkit/src/adapters/index.ts 100% 100% 100% 100%
packages/core/src/controllers/ConnectorController.ts 78.8% 92.68% 82.6% 78.8% 95-96, 111-112, 122-130, 187-208, 46-75
packages/siwe/src/client.ts 55.71% 60% 33.33% 55.71% 45-46, 51-52, 58-59, 65-66, 72-75, 78-84, 87-95, 98-107
Generated in workflow #8200 for commit 86ae60e by the Vitest Coverage Report Action

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