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: multichain send action adds solana #28738

Merged
merged 11 commits into from
Nov 28, 2024

Conversation

aganglada
Copy link
Contributor

@aganglada aganglada commented Nov 26, 2024

Description

Added support for Solana on the Send button action.
When the user click on Send from the BTC snap, it will open the BTC send flow.
When the user click on Send from the Solana snap, it will open the Solana send flow.

Screenshot 2024-11-26 at 18 05 24

Open in GitHub Codespaces

Related issues

Fixes:

Manual testing steps

As of right now, manually testing is a bit complex, it needs to run the snap manually and the extension, since we 1st need to publish a new release to npm with more up to date work. The snap version we have in npm is outdated and won't support this flow. That said, if you want to go ahead and run locally the steps are the following:

  1. Clone the Solana Snap monorepo and run it locally with yarn and then yarn start
  2. In the extension, at this branch, apply the following changes and run the extension as flask:
At builds.yml add the solana feature to the flask build:
 
     features:
       - build-flask
       - keyring-snaps
+      - solana

At shared/lib/accounts/solana-wallet-snap.ts point the snap ID to the snap localhost:

-export const SOLANA_WALLET_SNAP_ID: SnapId = SolanaWalletSnap.snapId as SnapId;
+//export const SOLANA_WALLET_SNAP_ID: SnapId = SolanaWalletSnap.snapId as SnapId;
+export const SOLANA_WALLET_SNAP_ID: SnapId = "local:http://localhost:8080/";
  1. Manually install the snap via the snap dapp at http://localhost:3000
  2. Enable the Solana account via Settings > Experimental > Enable Solana account
  3. Create a Solana account from the account-list menu and see the account overview of it

Screenshots/Recordings

Before

After

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

@aganglada aganglada self-assigned this Nov 26, 2024
@aganglada aganglada requested a review from a team as a code owner November 26, 2024 17:07
Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@metamaskbot metamaskbot added the team-sol PRs from the Solana snap team label Nov 26, 2024
@metamaskbot
Copy link
Collaborator

Builds ready [d16127a]
Page Load Metrics (1787 ± 68 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint15812093179813766
domContentLoaded15642079175813766
load15842096178714168
domInteractive277842157
backgroundConnect77129168
firstReactRender1675402311
getState463282211
initialActions00000
loadScripts11501576131411857
setupStore65513147
uiStartup17732390199016579
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 16 Bytes (0.00%)

@aganglada aganglada force-pushed the SOL-39-extension-send-button-action branch from 37f909c to 7f13bbe Compare November 27, 2024 12:35
ui/components/app/wallet-overview/coin-buttons.tsx Outdated Show resolved Hide resolved
shared/lib/accounts/snaps.ts Outdated Show resolved Hide resolved
@aganglada aganglada force-pushed the SOL-39-extension-send-button-action branch from 7f13bbe to b63c306 Compare November 27, 2024 14:14
@aganglada aganglada force-pushed the SOL-39-extension-send-button-action branch from d9d8744 to 78ead8f Compare November 27, 2024 17:37
@metamaskbot
Copy link
Collaborator

Builds ready [55adb73]
Page Load Metrics (2033 ± 123 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint36427771814629302
domContentLoaded169726302005241116
load171127232033256123
domInteractive278741178
backgroundConnect986302110
firstReactRender168626178
getState24117682311
initialActions01000
loadScripts12932096153720297
setupStore65611105
uiStartup208130222328236113
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: -7 Bytes (-0.00%)
  • common: 16 Bytes (0.00%)

zone-live
zone-live previously approved these changes Nov 28, 2024
@metamaskbot
Copy link
Collaborator

Builds ready [3d6eb8f]
Page Load Metrics (2077 ± 151 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint38326681796649312
domContentLoaded170226252054309149
load171126532077314151
domInteractive24106512412
backgroundConnect979282612
firstReactRender15133322914
getState612191163818
initialActions01000
loadScripts121720921574260125
setupStore77713157
uiStartup189734712442429206
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: -7 Bytes (-0.00%)
  • common: 16 Bytes (0.00%)

@metamaskbot
Copy link
Collaborator

Builds ready [d34c35f]
Page Load Metrics (1659 ± 46 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint30120591601319153
domContentLoaded1479195516419746
load1515197816599746
domInteractive226737157
backgroundConnect65920168
firstReactRender148421178
getState40120762311
initialActions01000
loadScripts1109152712718541
setupStore647994
uiStartup16602302187214670
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: -7 Bytes (-0.00%)
  • common: 16 Bytes (0.00%)

@aganglada aganglada added this pull request to the merge queue Nov 28, 2024
Merged via the queue into develop with commit 827ae99 Nov 28, 2024
75 checks passed
@aganglada aganglada deleted the SOL-39-extension-send-button-action branch November 28, 2024 13:29
@github-actions github-actions bot locked and limited conversation to collaborators Nov 28, 2024
@metamaskbot metamaskbot added the release-12.9.0 Issue or pull request that will be included in release 12.9.0 label Nov 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-12.9.0 Issue or pull request that will be included in release 12.9.0 team-sol PRs from the Solana snap team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants