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

Test: Solana web3 js two dot oh #15536

Open
wants to merge 19 commits into
base: develop
Choose a base branch
from
Open

Conversation

tomasklim
Copy link
Member

@tomasklim tomasklim commented Nov 23, 2024

Description

https://dev.suite.sldev.cz/suite-web/solana-web3-js-two-dot-oh/web

  • fixups added to avoid this
Screenshot 2024-11-23 at 10 45 39

Related Issue

To run pipelines of #15535

Screenshots:

Screenshot 2024-11-23 at 10 43 01

Copy link

github-actions bot commented Nov 23, 2024

🚀 Expo preview is ready!

  • Project → trezor-suite-preview
  • Platforms → android, ios
  • Scheme → trezorsuitelite
  • Runtime Version → 11
  • More info

Learn more about 𝝠 Expo Github Action

@enjojoy
Copy link
Contributor

enjojoy commented Nov 25, 2024

I tested desktop app + tor issue, it's not present 👍🏻

Copy link

socket-security bot commented Nov 25, 2024

👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

Ignoring: npm/@solana/[email protected], npm/@solana-program/[email protected]

View full report↗︎

Next steps

Take a deeper look at the dependency

Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev.

Remove the package

If you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency.

Mark a package as acceptable risk

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of ecosystem/package-name@version specifiers. e.g. @SocketSecurity ignore npm/[email protected] or ignore all packages with @SocketSecurity ignore-all

@martykan martykan added the build-desktop This will trigger the build of desktop apps for your PR label Nov 25, 2024
@vytick vytick requested a review from a team as a code owner November 25, 2024 21:14
@martykan martykan added build-desktop This will trigger the build of desktop apps for your PR and removed build-desktop This will trigger the build of desktop apps for your PR labels Nov 26, 2024
@tomasklim
Copy link
Member Author

@SocketSecurity ignore npm/@solana/[email protected]
@SocketSecurity ignore npm/@solana-program/[email protected]

@enjojoy
Copy link
Contributor

enjojoy commented Nov 26, 2024

I tested desktop app + tor issue, it's not present 👍🏻

Tested again, it closed with no problems @tomasklim

@martykan martykan force-pushed the solana-web3-js-two-dot-oh branch 3 times, most recently from 243d1ac to ff99aee Compare November 26, 2024 13:52
steveluscher and others added 14 commits November 26, 2024 15:49
This change attempts to largely replicate the old account and transaction shapes, but also represents a breaking change as some of the old types (like `PublicKey`) no longer exist in `@solana/web3.js` version 2.

Some type utilties were added so that we could source the _actual_ data shapes from the API calls themselves. For instance, we choose the return type that results from calling `getTransaction` with the config `"encoding": "jsonParsed"` _in particular_.
1. Added an RPC subscriptions instance to the `API` type
2. Added code to throw in the event that the transaction is a durable nonce transaction. A little extra work would have to be done to import and construct the durable nonce transaction confirmer.
3. Added a `FIXME` explaining why it would be better to save the `lastValidBlockhash` at the time the transaction was first given a blockhash lifetime, instead of fetching a too-new one in `pushTransaction`
4. Eliminated all of the custom transaction confirmation code, in favour of the new built-in routines.
5. Added a `FIXME` to note that the `fetch()` API typically doesn't allow you to override the `Origin` header. I didn't test whether your runtime actually allows it or not.

Note that all RPC methods are now cancellable via `AbortController`, if you supply an `AbortSignal` to the send/subscribe methods (ie. `.send({ abortSignal })`)
…ls` to `@solana/web3.js` v2

1. Corrected a decimal amount in one of the fixtures. That `amount` field is denominated in basis points.
2. Deleted most of the custom transaction instruction formatting code, in favour of the new auto-generated program clients for the System, Compute Budget, and Token programs.
3. Added a note that `lastValidBlockHeight` is sometimes `undefined` in tests
@martykan martykan added build-desktop This will trigger the build of desktop apps for your PR and removed build-desktop This will trigger the build of desktop apps for your PR labels Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build-desktop This will trigger the build of desktop apps for your PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants