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: appkit basic multichain #3658

Closed
wants to merge 40 commits into from
Closed

Conversation

tomiir
Copy link
Collaborator

@tomiir tomiir commented Jan 15, 2025

Description

When initializing AppKit without adapters there were 2 issues:

  • Screen opened pointed to regular connect WC screen.
  • On mobile, auth options were displayed and there was no adapter to handle them

There's an additional issue on reloading and switching networks, where currently connected providers would not be recognized as connected.

Changes:

  • Point to correct screen when opening without adapters
  • Fix connect option management on w3m-connect-view to not display auth options when no adapters are present
  • Simplifies switchNetwork logic and delegates to adapter base class to handle special cases
  • Sets auth connector provider and connection state on all namespaces when reconnecting.

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

Closes APKT-2030

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

zoruka and others added 30 commits January 10, 2025 20:30
…Fix tests. Fix issue where no adapters would open regular WCconnect screen
Copy link
Contributor

github-actions bot commented Jan 15, 2025

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 68.31% 19608 / 28703
🔵 Statements 68.31% 19608 / 28703
🔵 Functions 59.47% 1717 / 2887
🔵 Branches 79.9% 3491 / 4369
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/adapters/wagmi/src/client.ts 74.89% 61.7% 73.52% 74.89% 124-150, 175, 237-241, 247-250, 281, 283, 312-313, 364-367, 372-373, 383-384, 423-424, 452, 465-480, 484-504, 514-515, 519-520, 537-548, 587, 591-592, 614-615, 623-624, 629-630, 634-639, 646-647, 655-656, 661-662, 671-672, 680-681, 686-687, 693-700
packages/appkit/src/client.ts 63.37% 84.27% 77.12% 63.37% 178-179, 208-209, 224-225, 228-229, 244-247, 250-253, 273-274, 277-278, 294-315, 318-327, 596-597, 600-603, 606-607, 610-611, 614-615, 618-619, 626-630, 693-696, 723-724, 738-739, 748-749, 752-753, 758-759, 783-784, 805-807, 834-845, 848-885, 888-893, 909-913, 926-937, 940-959, 962-968, 971-981, 984-996, 999-1001, 1004-1006, 1009-1011, 1014-1016, 1019-1026, 1031-1061, 1065-1084, 1092-1106, 1109-1116, 1119-1133, 1139, 1143, 1157, 1170-1171, 1179, 1182-1185, 1188-1194, 1204-1205, 1234-1261, 1274-1277, 1281, 1297-1307, 1316-1317, 1322, 1328-1346, 1352-1359, 1370-1378, 1396-1406, 1409-1489, 1492-1512, 1531, 1543, 1552-1553, 1559, 1561, 1574, 1615, 1648-1659, 1662-1670, 1688-1689, 1706-1722, 1737-1741, 1773-1777, 1798-1799, 1804-1805, 1807-1808, 1813-1816, 1867-1871, 1896-1897, 1921-1922, 1951-1952, 1956-1957, 2027-2043, 2049-2056, 2069, 2071-2073, 308-319, 2040-2041
packages/wallet/index.ts 100% 100% 100% 100%
packages/wallet/src/W3mFrameConstants.ts 100% 100% 100% 100%
Generated in workflow #9180 for commit e36bf2c by the Vitest Coverage Report Action

address,
chainId: caipNetwork.id,
chainNamespace: caipNetwork.chainNamespace
})
}
}
} else {
this.setCaipNetwork(caipNetwork)
} catch (error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

should we remove (error) part ?

@tomiir
Copy link
Collaborator Author

tomiir commented Jan 30, 2025

Incorporated in #3757

@tomiir tomiir closed this Jan 30, 2025
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.

3 participants