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: add wallet connect support #1543

Merged
merged 14 commits into from
Dec 9, 2024
Merged

feat: add wallet connect support #1543

merged 14 commits into from
Dec 9, 2024

Conversation

ericleponner
Copy link
Collaborator

Description:

Changes below

  1. add wallet connect support
  2. use EIP-6963 to access metamask and coinbase (and potentially any wallet conformed to EIP6963)
  3. disable connection to HashPack and Blade through their proprietary libraries (hashconnect and blade-web3.js)

Related issue(s):

Fixes #1498

Notes for reviewer:

New wallet chooser:
image

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

Copy link

github-actions bot commented Dec 4, 2024

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 74.07% 24833 / 33522
🔵 Statements 74.07% 24833 / 33522
🔵 Functions 57.93% 956 / 1650
🔵 Branches 83.03% 4543 / 5471
File Coverage
File Stmts % Branch % Funcs % Lines Uncovered Lines
Changed Files
src/App.vue 74.52% 57.14% 0% 74.52% 102, 112-113, 122-125, 138-139, 157-159, 162-164, 166-171, 174, 177-181
src/AppStorage.ts 64.66% 83.33% 53.84% 64.66% 49-50, 53-54, 68-69, 120-121, 133-135, 138-140, 153-154, 167-168, 182-183, 196-197, 210-211, 247-248, 257-269, 272-274, 277-278, 305-306, 333-334, 347-348, 351-352, 355-356, 367-368, 382, 391-400, 403-417, 430-434, 442-445, 448-450
src/router.ts 100% 100% 100% 100%
src/components/TopNavBar.vue 95.07% 71.42% 0% 95.07% 1, 162, 164, 177, 180-182
src/components/account/ClaimTokenDialog.vue 42.33% 50% 50% 42.33% 32, 38-44, 51-54, 76-84, 142, 156, 162-174, 188-190, 192-199, 201-203, 206-221, 223, 225-235, 237, 239-251, 253-254
src/components/account/RejectTokenDialog.vue 37.27% 66.66% 25% 37.27% 31, 60-63, 85-93, 150, 154-156, 162-174, 198-199, 212-214, 216-240, 244-289, 296-298, 300-307, 309-313, 315-322, 324-339, 341, 343-353, 355, 357-369, 371-372
src/components/account/UpdateAccountDialog.vue 35.7% 94.11% 14.28% 35.7% 32, 40, 42-48, 50, 52, 54-71, 74-84, 86, 88, 90-98, 101, 103-104, 106-107, 109-122, 124-128, 130, 132-133, 135-137, 139-140, 142, 144-147, 149-151, 153-155, 157-158, 160, 162-163, 165-168, 171-174, 176-182, 184-187, 189, 191-192, 194-208, 210-211, 213-214, 216-217, 219, 221-223, 225-228, 230, 238-239, 241, 262-270, 277, 356, 359-360, 394-404, 433-443, 446-449, 482-498, 500-507, 531-539, 545-551, 554-557, 567-572, 574-588, 590, 593, 597, 608-619, 635, 639-650, 657, 662-663, 665, 667-699, 701-722, 724, 726-738, 740-741
src/components/allowances/AllowancesSection.vue 64.37% 93.75% 0% 64.37% 53, 156-158, 165-181, 183-184, 189-190, 254-261, 264-268, 272-279, 283-292, 296-303, 307-314, 317-319, 322-324, 326-331, 334-337
src/components/allowances/ApproveAllowanceDialog.vue 47.29% 44.44% 6.66% 47.29% 64-67, 111-115, 117-119, 121-124, 146-150, 152-154, 156-159, 178-180, 201, 305-309, 314-315, 328-339, 350-351, 359, 373-387, 391-402, 407-410, 414-449, 453-467, 471-473, 475-487, 490-500, 504, 506-507, 509-523, 526-536, 540, 542-543, 545-559, 562-572, 576-583, 594-595, 597-618, 631-636, 638-643, 645-650, 652-657, 659-664, 666-671, 674-675, 678-680, 684-691, 693-694, 696-711, 713-718, 720-724, 726-729, 731-746
src/components/allowances/DeleteNftAllowanceDialog.vue 70.18% 66.66% 50% 70.18% 78-79, 81, 102-110, 164, 179, 186-187, 189, 191-199, 201, 203-207, 209, 211-223, 225-226
src/components/allowances/HbarAllowanceTable.vue 95.6% 71.42% 25% 95.6% 1, 78-80
src/components/allowances/NftAllSerialsAllowanceTable.vue 68.8% 100% 0% 68.8% 131-133, 135-138, 140-144, 146-150, 152-165, 167-169
src/components/allowances/NftAllowanceTable.vue 76% 100% 0% 76% 129-131, 133-136, 138-151, 153-155
src/components/allowances/TokenAllowanceTable.vue 69.64% 100% 0% 69.64% 135-137, 139-142, 145-149, 151-155, 157-170, 172-174
src/components/staking/WalletChooser.vue 80.72% 57.14% 14.28% 80.72% 113-114, 123-129, 132-133, 141-142, 145-147
src/components/token/TokenActions.vue 25.23% 100% 0% 25.23% 164-170, 175-180, 182-184, 186-195, 198-221, 226-231, 236-237, 242-247, 252-253, 259-265, 270-271, 273-281, 286-287, 289-301, 306-307, 309-317, 322-345, 350-357, 362-366, 371-376, 378-385, 387-398, 403-425, 430-475, 480-489, 491-503, 508-523, 526-564
src/components/token/TokensSection.vue 79.83% 74.19% 27.27% 79.83% 1, 251-252, 255-261, 264-265, 269-278, 286-287, 291, 305-314, 317-318, 321-331, 339-340
src/components/values/abi/ContractAbiEntry.vue 57.75% 100% 0% 57.75% 107, 109-127, 129-130, 132-136, 138, 140, 142, 144, 146, 148-150, 152-165
src/components/wallet/ConnectWalletButton.vue 67.88% 100% 0% 67.88% 124-125, 128-140, 142-143, 146-149, 157-159, 162-163, 166-169, 186-187, 190-192
src/components/wallet/ConnectWalletDialog.vue 92% 100% 100% 92% 81-82, 86-87
src/components/wallet/WalletInfo.vue 86.78% 83.33% 16.66% 86.78% 183-185, 198, 202-206, 213-216, 222-225, 231-234, 237-238
src/config/CoreConfig.ts 83.33% 100% 66.66% 83.33% 36-44, 51-52
src/pages/AccountDetails.vue 39% 80% 0% 39% 1, 27, 29-31, 33-38, 40-49, 51-52, 55-60, 62-85, 87-92, 94-106, 108-112, 115-118, 120-125, 128-129, 131-134, 136-137, 139-140, 143-148, 150, 152-154, 156-168, 170, 172-178, 180-184, 186-190, 192-195, 197, 199-202, 204, 206-209, 211-212, 214-215, 217-223, 225-226, 228-229, 231-236, 238-240, 242-246, 248-250, 252, 255-259, 261-265, 267, 269-272, 274, 276-279, 281, 283, 285, 287-289, 291-311, 313-319, 321-323, 325-333, 335, 434-440, 443-444, 446, 489-490, 495-496, 513-515
src/pages/Staking.vue 50.77% 100% 0% 50.77% 272-276, 278, 280-290, 292, 297-299, 301-303, 305-315, 317-321, 323-326, 328, 330-339, 341-343, 349-351, 357, 359-365, 367-369, 371-377, 379-381, 383, 385, 387-398, 400-404, 406, 408-421, 423-426, 428, 430-431, 433-444, 446-447, 452-455, 460-464, 466-509
src/pages/TokenDetails.vue 97.72% 97.22% 66.66% 97.72% 443, 476-481, 516-517
src/utils/EntityID.ts 85.33% 98.5% 81.25% 85.33% 127-128, 134-135, 138-145, 171-180
src/utils/RouteManager.ts 76.17% 80% 67.69% 76.17% 130, 166-174, 255-264, 267-276, 294-295, 313-322, 329-332, 335-336, 357-366, 369-373, 376-380, 383-392, 395-399, 402-406, 424-433, 444-453, 464-473, 484-493, 500-503, 514-515, 554-555, 572-573, 584, 600-601, 603-604, 606-607, 609-610, 612-613, 615-616, 618-619, 621-622, 624-625, 627-628, 630-631, 633, 644, 666-667, 670-671
src/utils/wallet/EIP6963Agent.ts 18.25% 100% 21.42% 18.25% 55, 57-81, 83-84, 87, 89-109, 111-112, 115-117, 120-137, 151-158, 161-166, 173-178, 185-188, 191-192, 195-196, 199-200
src/utils/wallet/WalletConnectAgent.ts 19.04% 66.66% 8.69% 19.04% 64-68, 74-79, 81-83, 85-91, 93, 95-96, 99, 101-106, 108-109, 117-118, 121-122, 124-145, 147-148, 150-156, 158-159, 162, 164-170, 172-173, 176, 178-191, 193-194, 210-222, 227, 229-246, 249-250, 253-261, 264-266, 268-270, 272-284, 291-297, 304-320, 323-327, 330-331, 334-335, 342-360, 363-372, 375-378, 381-384, 391-392, 399-404, 411
src/utils/wallet/WalletManagerV4.ts 40.49% 67.74% 36% 40.49% 73, 115, 117-127, 129-138, 141-146, 149, 152-159, 161-162, 166-173, 176, 179-182, 185-186, 189-192, 199-204, 207-212, 215-220, 223-228, 231-236, 239-244, 247-252, 255-260, 263-268, 271-276, 279-284, 287-292, 295-300, 328-329, 338, 340-351, 353-362, 369-374, 384
src/utils/wallet/WalletSession.ts 61.53% 100% 0% 61.53% 37-38, 49-51
src/utils/wallet/caip.ts 33.33% 100% 11.11% 33.33% 61-62, 65-66, 69-70, 73-74, 77-85, 98-99, 102-103, 106-114
src/utils/wallet/eip1193.ts 8.33% 100% 0% 8.33% 58-63, 65-70, 72, 74-78, 80, 82-88, 90-97, 104-111, 115-116, 120-122, 126-127, 144-149
src/utils/wallet/client/WalletClient.ts 42.42% 0% 0% 42.42% 31-33, 37-38, 42-43, 47-48, 55, 57-61, 66-67, 73-74
src/utils/wallet/client/WalletClient_Ethereum.ts 24.17% 100% 0% 24.17% 53-57, 59-79, 81-93, 95-102, 111-116, 119-124, 127-128, 135, 137-139, 141-143, 145-150, 152-160, 162-164, 166-168, 170-171, 174-186, 189-199, 203-220, 223-228, 231-233, 236-243, 246-252, 255, 257-272, 276, 278-289, 291-292, 296-297, 299-314
Generated in workflow #1507

@svienot svienot marked this pull request as ready for review December 9, 2024 12:50
@svienot svienot self-requested a review as a code owner December 9, 2024 12:50
Copy link

sonarqubecloud bot commented Dec 9, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)
D Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Copy link
Collaborator

@svienot svienot left a comment

Choose a reason for hiding this comment

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

Looks good. Impressive work.

@svienot
Copy link
Collaborator

svienot commented Dec 9, 2024

The e2e test failing is unrelated (due to KNS returning 400).

@svienot svienot merged commit f100a32 into main Dec 9, 2024
7 of 9 checks passed
@svienot svienot deleted the wallet-connect-v4 branch December 9, 2024 15:04
@swirlds-automation
Copy link
Contributor

🎉 This PR is included in version 24.12.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Wallet Connect support
3 participants