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: RPC requests causing modal to close #2799

Merged
merged 22 commits into from
Sep 6, 2024

Conversation

tomiir
Copy link
Collaborator

@tomiir tomiir commented Sep 4, 2024

Description

  • RPC requests that were not opening the modal, were closing it after resolving.
  • This causes issues when, for example, estimating gas or fetching wallet capabilities.
  • Added a request parameter to RPC resolver methods, to allow clients to check if the request that initiated them opened the modal before trying to close it

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-1002

Checklist

  • Code in this PR is covered by automated tests (Unit tests, E2E tests) => WIP
  • My changes generate no new warnings
  • I have reviewed my own code
  • I have filled out all required sections

Copy link

vercel bot commented Sep 4, 2024

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

Name Status Preview Updated (UTC)
web3modal-gallery ✅ Ready (Inspect) Visit Preview Sep 5, 2024 11:21pm
web3modal-laboratory ✅ Ready (Inspect) Visit Preview Sep 5, 2024 11:21pm

Copy link
Contributor

github-actions bot commented Sep 4, 2024

Coverage Report for Coverage

Status Category Percentage Covered / Total
🔵 Lines 86.81% 3189 / 13437
🔵 Statements 86.81% 3189 / 13437
🔵 Functions 161.44% 236 / 723
🔵 Branches 215.12999999999997% 430 / 847
File Coverage
File Stmts % Branch % Funcs % Lines Uncovered Lines
Changed Files
packages/base/adapters/evm/ethers/client.ts 0% 0% 0% 0% 1, 15-19, 42, 47, 50, 52, 57, 104, 106, 108, 110, 116, 127, 129, 135, 137, 139, 142-143, 145-147, 149-153, 155-167, 169-183, 185-188, 190-195, 197-200, 202-207, 209-211, 214-217, 219, 221-222, 225-229, 231-236, 238-249, 251-254, 256-261, 263, 265, 267-273, 275-276, 279-283, 287, 289-314, 316-327, 329-332, 334-338, 340-341, 343-368, 370-373, 375-384, 386-387, 389, 391, 393-394, 396-398, 400-402, 404-409, 411-413, 415-416, 418-419, 421-423, 425-427, 429-436, 438-441, 443-444, 446-447, 449-451, 453-455, 457-459, 461-463, 465-467, 469-470, 472-478, 480-482, 484-485, 487-488, 490-494, 496-499, 501, 503-505, 507-508, 510-513, 515-518, 520-523, 525-527, 529, 531-533, 535-537, 544-548, 550-555, 557-558, 561-564, 566, 568-570, 572-574, 576-579, 582-583, 585-589, 592-599, 601-604, 606-607, 609-610, 612-614, 616-620, 622-623, 625-627, 629-631, 633-635, 637-639, 641-643, 645-646, 648-650, 652-668, 671-674, 676-677, 679-682, 684-686, 688-699, 701, 703-704, 706-713, 715-721, 723-725, 727-735, 737-738, 740-755, 757-759, 761-765, 767-769, 771-773, 775-781, 783-785, 787-798, 800-810, 812-823, 825-839, 841-843, 845-861, 863-864, 866-882, 884-903, 905-906, 908-916, 918-919, 921-928, 930-943, 945-946, 948-954, 956-961, 963-967, 969-974, 976-977, 979-981, 983-986, 988-996, 998-1006, 1008-1013, 1015-1022, 1024-1037, 1039-1047, 1049-1054, 1056-1061, 1063-1066, 1068-1076, 1078-1083, 1085-1090, 1092-1100, 1102-1109, 1111-1112, 1114-1121, 1123-1127, 1129-1134, 1136-1139, 1141-1145, 1147-1161, 1163-1171, 1173-1178, 1180-1181, 1183-1186, 1188-1191, 1193-1197, 1199-1205, 1207-1213, 1215-1216, 1218-1246, 1248-1260, 1262-1263, 1265-1270, 1272-1273, 1275-1282, 1284-1297, 1299-1302, 1304-1311, 1313-1317, 1319-1321, 1323-1327, 1329-1348, 1350-1360, 1362-1366, 1368-1369, 1371-1377, 1379-1398, 1400-1414, 1416-1422, 1424-1445, 1447-1465, 1467-1469, 1471-1484, 1486-1487, 1489-1500, 1502-1516, 1518-1528, 1530-1531, 1533-1535, 1537-1547, 1549-1559, 1561-1565, 1567-1579, 1581-1584, 1586-1590, 1592-1599
packages/base/adapters/evm/ethers5/client.ts 0% 0% 0% 0% 1, 14-17, 26, 31-32, 36, 41, 88, 90, 94, 96, 102, 104, 108, 118, 120, 122, 124-125, 127-129, 131-135, 137-149, 151-165, 167-170, 172-177, 179-182, 184-189, 191-193, 195, 197-198, 201-205, 207-212, 214-225, 227-230, 232-237, 239, 241, 243-249, 251-252, 255-259, 263, 265-290, 292-301, 303-306, 308-312, 314-315, 317-340, 342-345, 347-358, 360-361, 363-364, 366, 368-370, 372-374, 376-378, 380-387, 389-390, 392-393, 395-398, 400-403, 405-408, 410-412, 414, 416-418, 420-422, 429-433, 435-440, 442-443, 445-447, 449-451, 453-455, 458-461, 463-464, 469-470, 472-476, 479-486, 488-491, 493-494, 496-497, 499-501, 503-505, 507-509, 511-513, 515-517, 519-521, 523-525, 527-530, 532-538, 541-544, 546-547, 549-555, 557-567, 569, 571-572, 574-582, 584-585, 587-602, 604-606, 608-612, 614-616, 618-620, 622-628, 630-632, 634-645, 647-657, 659-678, 680-681, 683-699, 701-703, 705-721, 723-742, 744-745, 747-755, 757-758, 760-767, 769-782, 784-785, 787-789, 791-794, 796-801, 803-807, 809-814, 816-817, 819-821, 823-826, 828-836, 838-846, 848-853, 855-857, 859-861, 863-866, 868-881, 883-891, 893-896, 898-900, 902-904, 906-909, 911-918, 920-925, 927-932, 934-937, 939-943, 945-952, 954-955, 957-964, 966-967, 969-971, 973-978, 980-983, 985-989, 991-1005, 1007-1015, 1017-1020, 1022, 1024-1025, 1027, 1029-1030, 1032-1036, 1038-1044, 1046-1052, 1054-1055, 1057-1084, 1086-1098, 1100-1101, 1103-1108, 1110-1111, 1113-1120, 1122-1133, 1135-1138, 1140-1152, 1154-1156, 1158-1162, 1164-1169, 1171-1184, 1186-1190, 1192-1193, 1195-1201, 1203-1222, 1224-1238, 1240-1246, 1248-1269, 1271-1289, 1291-1293, 1295-1308, 1310-1311, 1313-1324, 1326-1340, 1342-1352, 1354-1355, 1357-1359, 1361-1371, 1373-1383, 1385-1389, 1391-1403, 1405-1408, 1410-1414, 1416-1423, 1425-1431, 1433-1435, 1437-1444
packages/base/adapters/evm/wagmi/client.ts 0% 0% 0% 0% 1-2, 21, 23-24, 38, 40-41, 47-48, 50-51, 54, 70, 72, 77, 79, 85, 87, 89, 91, 93-94, 96-98, 100-102, 104-106, 108-111, 113-116, 118-123, 125-126, 128-130, 132-134, 136-138, 140-142, 144, 148-150, 152-155, 157-158, 160-166, 169, 172-175, 177-182, 184-195, 197-206, 208, 210, 212-215, 221-224, 226-227, 229-231, 233, 235, 237-238, 240, 242-243, 245-248, 250-252, 254-257, 259-260, 262-263, 265-272, 274-276, 278-279, 281-292, 294-295, 297-306, 308-309, 311, 313-314, 316-319, 321-328, 330-331, 333-337, 339-341, 343-348, 350-354, 356-357, 359-361, 363-366, 368-369, 371, 373-375, 377-380, 382-384, 386-388, 390-395, 397-417, 420-427, 430-442, 444-450, 461-465, 467-479, 482-496, 498-499, 501-520, 522-525, 527-530, 532-543, 545-548, 550-555, 557-581, 583-591, 593-596, 598-601, 603-604, 607-627, 629-633, 635, 637, 639-657, 659-662, 669-683, 685-693, 695-701, 703, 705-707, 709-715, 717-725, 727-728, 730-737, 739-743, 745-750, 752-758, 760-777, 779-781, 783-791, 793-803
packages/base/adapters/evm/wagmi/connectors/AuthConnector.ts 0% 0% 0% 0% 1-4, 6, 8, 25, 30-32, 34-42, 44-49, 51, 53-62, 64-67, 69-72, 74-75, 77-80, 82-83, 85-87, 89-90, 92-94, 96-97, 99-105, 107, 109-112, 114-121, 123-129, 131-134, 136-140, 142-147
packages/base/adapters/solana/web3js/client.ts 0% 0% 0% 0% 1, 9-11, 13, 16-17, 36-38, 44-45, 49, 66-67, 69, 71, 73, 77, 85, 89, 91, 93-94, 96-98, 100, 102, 104, 106-112, 114-123, 125-129, 131-135, 137-142, 144-148, 150-152, 154, 156-157, 159-162, 164-166, 168-169, 171-173, 175-179, 181, 183-184, 186, 193, 195, 197, 199, 201, 203-205, 207-208, 210, 212-214, 216, 218, 220, 222-224, 226-231, 233-236, 238-240, 242-243, 245-247, 249-251, 253-255, 257-259, 261-262, 264-266, 268-274, 276-289, 291-293, 295-297, 299-301, 303-305, 307-309, 312-314, 316-331, 333-335, 337-341, 343-349, 351-354, 356-358, 360-362, 364-369, 371-386, 388-389, 391-393, 395-398, 400-402, 404-407, 409-412, 414-419, 421-427, 429-442, 444-446, 448-451, 454-456, 458-461, 463-468, 470, 472, 474-479, 481, 489-492, 494-510, 512-519, 522-525, 527-532, 535-538, 540-547, 549-551, 553-559, 561-569, 571-577, 579-582, 584-585, 587-595, 597-600, 602-618, 620-622, 624-625, 627-629, 631-634, 636-637, 639-648, 650-652
packages/base/src/client.ts 0% 0% 0% 0% 1, 28-30, 39, 42, 49, 51-52, 55, 57-60, 62-64, 67-70, 72-75, 77-79, 82-84, 86-88, 90-92, 94-96, 98-100, 102-104, 106-108, 110-112, 114-116, 118-120, 122-125, 127-130, 132-134, 136-138, 140-142, 144-146, 148-150, 152-154, 156-158, 160-162, 164-166, 168-170, 172-174, 176-178, 180-182, 184-186, 188-190, 192-194, 196-200, 202-204, 206, 208-211, 213-219, 221-226, 228, 230-232, 234-236, 238-240, 242-244, 246-248, 250-252, 254, 256-261, 263-264, 266-267, 269-271, 273-275, 277-279, 281-282, 284-286, 288-289, 291-296, 298-303, 305-310, 312-315, 317-322, 324-325, 327-330, 332-333, 335-337, 339-341, 343-344, 346-347, 349-351, 354-359, 361-363, 366-367, 370-373, 375, 377, 380-382, 384-394, 396-398, 400-402, 404-406, 408-410, 412, 415-421, 423-434, 436-438
Generated in workflow #5997

Copy link
Contributor

github-actions bot commented Sep 4, 2024

♻️ Vite-Size ♻️

Size Difference

Size (kb) Gzip (kb)
Total Diff. 🔺+0.19 🔺+0.064

Current Size

Name Size (kb) Gzip (kb)
assets/index-wVPOIUAH.js 1602.026 464.628
assets/noble-curves.js 31.941 12.782
assets/2.19.6_bufferutil.js 2.789 1.328
assets/index.js 9.076 3.087
assets/index2.js 102.248 29.113
assets/index3.js 304.387 87.281
assets/walletconnect-ethereum-provider.js 438.506 138.106
assets/index4.js 11.601 3.209
assets/w3m-modal.js 6.989 2.506
assets/index5.js 12.673 4.695
assets/hooks.module.js 74.437 25.586
assets/walletconnect-modal-ui.js 112.43 34.329
index.html 0.329 0.237
Total Size 2709.432 806.887

Base Size

Name Size (kb) Gzip (kb)
assets/index-wVPOIUAH.js 1602.026 464.628
assets/noble-curves.js 31.941 12.782
assets/2.19.6_bufferutil.js 2.789 1.328
assets/index.js 9.076 3.087
assets/index2.js 102.248 29.113
assets/index3.js 304.387 87.281
assets/walletconnect-ethereum-provider.js 438.316 138.042
assets/index4.js 11.601 3.209
assets/w3m-modal.js 6.989 2.506
assets/index5.js 12.673 4.695
assets/hooks.module.js 74.437 25.586
assets/walletconnect-modal-ui.js 112.43 34.329
index.html 0.329 0.237
Total Size 2709.242 806.823

Copy link
Contributor

github-actions bot commented Sep 4, 2024

Warnings
⚠️ Testing spec changed

Generated by 🚫 dangerJS against b69eb4d

Comment on lines +39 to +40
const networkToSwitchButton = this.page.getByTestId(`w3m-network-switch-${network}`)
await networkToSwitchButton.click()
Copy link
Contributor

Choose a reason for hiding this comment

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

the change is needed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

maybe not, it's a leftover from a debug session

@tomiir tomiir merged commit 854a8a4 into main Sep 6, 2024
15 checks passed
@tomiir tomiir deleted the fix/rpc-response-handling-close-modal branch September 6, 2024 00:08
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