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: added create solana account test #28866

Merged
merged 77 commits into from
Dec 19, 2024
Merged

Conversation

javiergarciavera
Copy link
Contributor

@javiergarciavera javiergarciavera commented Dec 3, 2024

Description

  • E2E tests covering different scenarios for creating/removing Solana accounts.
  • Refactor around some snap logic for BTC/Solana

Open in GitHub Codespaces

Related issues

Fixes:

Manual testing steps

Running flask tests should pass

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.

@javiergarciavera javiergarciavera requested a review from a team as a code owner December 3, 2024 11:11
Copy link
Contributor

github-actions bot commented Dec 3, 2024

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.

Copy link

socket-security bot commented Dec 5, 2024

No dependency changes detected. Learn more about Socket for GitHub ↗︎

👍 No dependency changes detected in pull request

@javiergarciavera javiergarciavera changed the base branch from solana to main December 5, 2024 10:05
@javiergarciavera javiergarciavera requested a review from a team as a code owner December 5, 2024 10:05
@javiergarciavera javiergarciavera requested a review from a team as a code owner December 10, 2024 15:47
return isValid;
},
20000,
true,
Copy link
Contributor

Choose a reason for hiding this comment

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

could you check the change here? i don't think the change is necessary and correct here for function check_numberOfAvailableAccounts.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this was a change proposed by Charlie but it was missing the return statement and that's why some unrelated tests were failing. I added this part and now they perfectly work

@metamaskbot
Copy link
Collaborator

Builds ready [b82bfe3]
Page Load Metrics (1474 ± 42 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint1349167314768842
domContentLoaded1341165314558239
load1349167314748742
domInteractive226839189
backgroundConnect85422157
firstReactRender15103363115
getState483192512
initialActions01000
loadScripts966123010766833
setupStore65112136
uiStartup151524051727228109
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 64 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@C-Ivan C-Ivan self-requested a review December 19, 2024 09:30
C-Ivan
C-Ivan previously approved these changes Dec 19, 2024
@javiergarciavera javiergarciavera added this pull request to the merge queue Dec 19, 2024
Copy link
Contributor

@chloeYue chloeYue left a comment

Choose a reason for hiding this comment

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

please recheck the change for check_numberOfAvailableAccounts, it's not correct.

@chloeYue chloeYue removed this pull request from the merge queue due to a manual request Dec 19, 2024
racitores
racitores previously approved these changes Dec 19, 2024
@javiergarciavera
Copy link
Contributor Author

javiergarciavera commented Dec 19, 2024

please recheck the change for check_numberOfAvailableAccounts, it's not correct.
Hey @chloeYue could you explain what part is not correct? The code was basically a suggestion from @ccharly, but it was missing the return statement, that's why some general e2e tests failed (unrelated to the ones added in this PR), so I added the missing return statement and now everything passes. If you look at the change, it's doing exactly the same but a bit more verbose

@chloeYue
Copy link
Contributor

chloeYue commented Dec 19, 2024

Hi guys, i blocked this PR to be merged because the change for functionality check_numberOfAvailableAccounts is wrong, it's very dangerous to merge this PR, because with the wrong change, the functionality is broken and will be success in anycase. See this example that i try to call this function with a wrong parameter: the test still success after the timeout

Screen.Recording.2024-12-19.at.10.39.32.mov

@chloeYue
Copy link
Contributor

Suggested change is to revert the change, we don't need the console log for each polling, it will make the log message too long, and we don't need the change for the added parameter true, it will block the code to throw error, which causes the problem.

@chloeYue
Copy link
Contributor

please recheck the change for check_numberOfAvailableAccounts, it's not correct.
Hey @chloeYue could you explain what part is not correct? The code was basically a suggestion from @ccharly, but it was missing the return statement, that's why some general e2e tests failed (unrelated to the ones added in this PR), so I added the missing return statement and now everything passes. If you look at the change, it's doing exactly the same but a bit more verbose

it's not doing exactly the same as before, see explanation above.

@chloeYue
Copy link
Contributor

please recheck the change for check_numberOfAvailableAccounts, it's not correct.
Hey @chloeYue could you explain what part is not correct? The code was basically a suggestion from @ccharly, but it was missing the return statement, that's why some general e2e tests failed (unrelated to the ones added in this PR), so I added the missing return statement and now everything passes. If you look at the change, it's doing exactly the same but a bit more verbose

Could you explain what do you mean by the origin function was missing the return statement ? it has the return statement return internalAccounts.length === expectedNumberOfAccounts;

@javiergarciavera
Copy link
Contributor Author

please recheck the change for check_numberOfAvailableAccounts, it's not correct.

hey @chloeYue I made a change aligned to what you mentioned. Could you please review and confirm it's alright and approve?
Thanks

@metamaskbot
Copy link
Collaborator

Builds ready [72029fc]
Page Load Metrics (1805 ± 139 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint24525511630525252
domContentLoaded144724571771288138
load148025281805290139
domInteractive25108512311
backgroundConnect978302110
firstReactRender1698443014
getState685232110
initialActions01000
loadScripts107718821340235113
setupStore65818178
uiStartup170828812156367176
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 64 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

Copy link
Contributor

@chloeYue chloeYue left a comment

Choose a reason for hiding this comment

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

LGTM

@chloeYue
Copy link
Contributor

please recheck the change for check_numberOfAvailableAccounts, it's not correct.

hey @chloeYue I made a change aligned to what you mentioned. Could you please review and confirm it's alright and approve? Thanks

Thanks for the change, looks good now.

@javiergarciavera javiergarciavera added this pull request to the merge queue Dec 19, 2024
Merged via the queue into main with commit dd65944 Dec 19, 2024
77 checks passed
@javiergarciavera javiergarciavera deleted the create-solana-account-e2e branch December 19, 2024 11:20
@github-actions github-actions bot locked and limited conversation to collaborators Dec 19, 2024
@metamaskbot metamaskbot added the release-12.11.0 Issue or pull request that will be included in release 12.11.0 label Dec 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-12.11.0 Issue or pull request that will be included in release 12.11.0 team-sol PRs from the Solana snap team
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

10 participants