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: ethers5 adapter import in exports #2754

Merged
merged 10 commits into from
Sep 3, 2024

Conversation

enesozturk
Copy link
Contributor

@enesozturk enesozturk commented Aug 27, 2024

Description

In the exports of the ethers5, we are importing ethers adapter which is wrong and should be ethers5.

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-xxx
For GH issues: closes #...

Showcase (Optional)

If there is a UI change include the screenshots with before and after state.
If new feature is being introduced, include the link to demo recording.

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

Copy link

vercel bot commented Aug 27, 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 3, 2024 7:30am
web3modal-laboratory ✅ Ready (Inspect) Visit Preview Sep 3, 2024 7:30am

@enesozturk enesozturk changed the title --help fix: ethers5 adapter import in exports Aug 27, 2024
Copy link
Contributor

github-actions bot commented Aug 27, 2024

Coverage Report for Coverage

Status Category Percentage Covered / Total
🔵 Lines 86.9% 3186 / 13387
🔵 Statements 86.9% 3186 / 13387
🔵 Functions 161.44% 236 / 723
🔵 Branches 214.99999999999997% 428 / 845
File Coverage
File Stmts % Branch % Funcs % Lines Uncovered Lines
Changed Files
packages/base/adapters/evm/ethers/index.ts 0% 0% 0% 0% 1, 4
packages/base/adapters/evm/ethers5/client.ts 0% 0% 0% 0% 1, 13-16, 25, 30-31, 35, 40, 86, 88, 92, 94, 100, 102, 106, 116, 118, 120, 122-123, 125-127, 129-136, 138-150, 152-166, 168-171, 173-178, 180-183, 185-190, 192-194, 196, 198-199, 202-206, 208-213, 215-226, 228-231, 233-238, 240, 242, 244-250, 252-253, 256-260, 264, 266-291, 293-302, 304-307, 309-313, 315-316, 318-341, 343-346, 348-359, 361-362, 364-365, 367, 369-371, 373-375, 377-379, 381-388, 390-391, 393-394, 396-399, 401-404, 406-409, 411, 413-415, 417-419, 426-430, 432-437, 439-440, 442-444, 446-448, 450-452, 455-458, 460-461, 466-467, 469-473, 476-483, 485-488, 490-491, 493-494, 496-498, 500-502, 504-506, 508-510, 512-514, 516-518, 520-522, 524-527, 529-535, 538-541, 543-544, 546-552, 554-564, 566, 568-569, 571-579, 581-582, 584-599, 601-603, 605-609, 611-613, 615-617, 619-625, 627-629, 631-642, 644-654, 656-675, 677-678, 680-696, 698-700, 702-718, 720-739, 741-742, 744-752, 754-755, 757-764, 766-779, 781-782, 784-786, 788-791, 793-798, 800-804, 806-811, 813-814, 816-818, 820-823, 825-833, 835-843, 845-850, 852-854, 856-858, 860-863, 865-878, 880-888, 890-893, 895-897, 899-901, 903-906, 908-915, 917-922, 924-929, 931-950, 952-959, 961-962, 964-971, 973-979, 981-984, 986-990, 992-1006, 1008-1016, 1018-1021, 1023, 1025-1026, 1028, 1030-1031, 1033-1037, 1039-1045, 1047-1053, 1055-1056, 1058-1085, 1087-1099, 1101-1102, 1104-1109, 1111-1112, 1114-1121, 1123-1134, 1136-1139, 1141-1153, 1155-1157, 1159-1163, 1165-1170, 1172-1185, 1187-1191, 1193-1194, 1196-1202, 1204-1223, 1225-1239, 1241-1247, 1249-1270, 1272-1290, 1292-1294, 1296-1309, 1311-1312, 1314-1325, 1327-1341, 1343-1353, 1355-1356, 1358-1360, 1362-1372, 1374-1384, 1386-1390, 1392-1404, 1406-1409, 1411-1415, 1417-1424, 1426-1432, 1434-1436, 1438-1445
packages/base/adapters/evm/ethers5/index.ts 0% 0% 0% 0% 1, 4
Generated in workflow #5912

Copy link
Contributor

github-actions bot commented Aug 27, 2024

♻️ Vite-Size ♻️

Size Difference

Size (kb) Gzip (kb)
Total Diff. 0 0

Current Size

Name Size (kb) Gzip (kb)
assets/index-BtFkhyzW.js 1472.873 417.127
assets/noble-curves.js 31.941 12.78
assets/2.19.6_bufferutil.js 2.789 1.325
assets/index.js 161.83 59.282
assets/index2.js 102.249 29.113
assets/index3.js 304.389 87.281
assets/walletconnect-ethereum-provider.js 278.197 80.094
assets/index4.js 11.601 3.211
assets/w3m-modal.js 6.992 2.509
assets/index5.js 12.674 4.695
assets/hooks.module.js 74.776 25.685
assets/walletconnect-modal-ui.js 112.43 34.328
index.html 0.329 0.236
Total Size 2573.07 757.666

Base Size

Name Size (kb) Gzip (kb)
assets/index-BtFkhyzW.js 1472.873 417.127
assets/noble-curves.js 31.941 12.78
assets/2.19.6_bufferutil.js 2.789 1.325
assets/index.js 161.83 59.282
assets/index2.js 102.249 29.113
assets/index3.js 304.389 87.281
assets/walletconnect-ethereum-provider.js 278.197 80.094
assets/index4.js 11.601 3.211
assets/w3m-modal.js 6.992 2.509
assets/index5.js 12.674 4.695
assets/hooks.module.js 74.776 25.685
assets/walletconnect-modal-ui.js 112.43 34.328
index.html 0.329 0.236
Total Size 2573.07 757.666

@@ -1,6 +1,7 @@
import '@web3modal/polyfills'

export { EVMEthersClient } from './client.js'
export * from '@web3modal/scaffold-utils/ethers'
Copy link
Collaborator

Choose a reason for hiding this comment

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

is this needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, we are connecting to the EthersStoreUtil from the backwards compat packages' custom hooks, see. To make the ethers and base package use the same proxy object (state), the @web3modal/scaffold-utils/ethers needed to be exported from the adapter. Otherwise throwing this pmndrs/valtio#706 error.

@tomiir
Copy link
Collaborator

tomiir commented Aug 27, 2024

Email flow seems broken from preview 🤔
I connect OTP and it just closes the modal

@enesozturk
Copy link
Contributor Author

Email flow seems broken from preview 🤔 I connect OTP and it just closes the modal

Seems like it's not awaiting the connection after OTP. It's closing the modal, but after a few seconds it's getting connected. There should be a state management detail off

packages/base/adapters/evm/ethers5/client.ts Outdated Show resolved Hide resolved
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.

2 participants