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: solana qa round #2704

Merged
merged 6 commits into from
Aug 16, 2024
Merged

fix: solana qa round #2704

merged 6 commits into from
Aug 16, 2024

Conversation

zoruka
Copy link
Contributor

@zoruka zoruka commented Aug 15, 2024

Description

This PR brings somes fixes after a QA round of tests:

  • Correct handling of available chains by wallet;
  • Improved parsing of deprecated chains;
  • Fix for SolanaWriteContractTest;
  • Bring back previous base64 encoding of the transaction as described in our RPC specs.

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 15, 2024

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

Name Status Preview Updated (UTC)
web3modal-gallery ✅ Ready (Inspect) Visit Preview Aug 16, 2024 1:25pm
web3modal-laboratory ✅ Ready (Inspect) Visit Preview Aug 16, 2024 1:25pm

Copy link
Contributor

github-actions bot commented Aug 15, 2024

Coverage Report for Coverage

Status Category Percentage Covered / Total
🔵 Lines 109.27999999999999% 2768 / 9046
🔵 Statements 109.27999999999999% 2768 / 9046
🔵 Functions 154.01999999999998% 208 / 677
🔵 Branches 214.52999999999997% 355 / 752
File Coverage
File Stmts % Branch % Funcs % Lines Uncovered Lines
Changed Files
packages/solana/src/client.ts 0% 0% 0% 0% 1-2, 10-12, 14, 17-18, 33-34, 53-54, 58, 62, 65-75, 77, 79-81, 83-85, 87-96, 98-102, 104-108, 110-115, 117-121, 123-125, 127, 129-130, 132-135, 137-139, 141-142, 144-146, 148-152, 154, 156-157, 159, 166, 168, 170, 172, 174, 176-177, 179-183, 185-192, 194-198, 200-202, 204-212, 214-216, 218-220, 222-224, 226-227, 229-231, 233-239, 241-254, 256-258, 260-262, 264-266, 268-270, 272-274, 276-278, 281-285, 287-291, 293-298, 300-303, 305-307, 309-311, 313-314, 316-331, 333-338, 340-342, 344-347, 349-352, 354-359, 361-381, 383-385, 387-390, 393-395, 397-404, 406-409, 411, 413, 415-419, 421-424, 426-429, 431-439, 441-444, 446-449, 451-452, 454-462, 464-466, 468-469, 471-473, 475-478, 480-481, 483-491, 493-495
packages/solana/src/providers/WalletConnectProvider.ts 86.99% 80% 82.35% 86.99% 64, 66-68, 70-71, 81, 166-171, 173-174, 177-178, 202, 234-236, 238, 241, 245-247, 249, 252, 267
packages/solana/src/providers/WalletStandardProvider.ts 70.86% 82.75% 61.11% 70.86% 68-69, 72, 74-76, 78-79, 82, 84-86, 88-89, 92-93, 96-97, 122-123, 141-142, 169-170, 176-181, 183-184, 187-188, 200-201, 222-223, 232-233, 235-238
packages/solana/src/utils/scaffold/SolanaHelpersUtils.ts 20% 100% 0% 20% 11-13, 15-16, 19, 21-23, 25-26, 29, 31, 33-40, 42-48, 51-53, 55-60, 63-64, 66-67, 70, 72-73
packages/solana/src/utils/scaffold/SolanaTypesUtil.ts 100% 100% 100% 100%
Generated in workflow #5617

Copy link
Contributor

github-actions bot commented Aug 15, 2024

♻️ Vite-Size ♻️

Size Difference

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

Current Size

Name Size (kb) Gzip (kb)
assets/index-Db8-uiX4.js 1648.959 459.81
assets/w3m-modal-D4AdJTdz.js 6.856 2.476
assets/ccip-r9Z6qsTl.js 3.029 1.379
assets/index-D34n98X0.js 11.55 3.195
assets/index-CywL2Zf_.js 9.39 3.339
assets/index-Bo60jI0N.js 102.257 29.12
assets/hooks.module-CktZipCk.js 77.565 26.51
assets/index-CsNp9EU3.js 112.437 34.331
assets/index-ClN6YrIE.js 161.649 59.485
assets/index-ChT9XpaH.js 304.097 87.218
index.html 0.329 0.237
Total Size 2438.118 707.1

Base Size

Name Size (kb) Gzip (kb)
assets/index-Db8-uiX4.js 1648.959 459.81
assets/index-CywL2Zf_.js 9.39 3.339
assets/index-D34n98X0.js 11.55 3.195
assets/w3m-modal-D4AdJTdz.js 6.856 2.476
assets/ccip-r9Z6qsTl.js 3.029 1.379
assets/index-Bo60jI0N.js 102.257 29.12
assets/hooks.module-CktZipCk.js 77.565 26.51
assets/index-CsNp9EU3.js 112.437 34.331
assets/index-ClN6YrIE.js 161.649 59.485
assets/index-ChT9XpaH.js 304.097 87.218
index.html 0.329 0.237
Total Size 2438.118 707.1

preflightCommitment: 'confirmed'
})

// We should consider using `connection.confirmTransaction` instead of polling when websocket support is added
Copy link
Contributor

Choose a reason for hiding this comment

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

@zoruka Can we track this improvement with a Linear ticket?

Comment on lines +220 to +223
* We should consider serializing the transaction to base58 as it is the solana standard.
* But our specs requires base64 right now:
* https://docs.walletconnect.com/advanced/multichain/rpc-reference/solana-rpc#solana_signtransaction
*/
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here for improvement ticket 🙏🏽


window?.localStorage.setItem(SolConstantsUtil.WALLET_ID, provider.name)
if (connectionChain) {
await this.switchNetwork(
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we do this? Would this be unexpected UX for the users? Is this have some bad cases (ie. like not having a chain provided)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because the wallet may connect and nothing works because the wallet doesn't support the chain, it is the case of connecting with Trust Wallet and a couple other wallets that only supports mainnet. Then we are just switch to any of the supported chains or stop the connection.

Copy link
Contributor

@enesozturk enesozturk left a comment

Choose a reason for hiding this comment

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

@zoruka Left some comments

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.

None yet

2 participants