-
-
Notifications
You must be signed in to change notification settings - Fork 170
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
Support Phantom wallet #698
base: dev
Are you sure you want to change the base?
Conversation
Hello, @maximgeerinck 👋 If I am getting it correctly this Phantom Wallet support PR is not finished because there is no way to download phantom wallet as it's not open-source. The plan from your side was to wait until it is open-sourced. Just want to let you know that you can use this chrome extension to extract the source code from any chrome extension as ZIP file. Also, you can use this website to download the source code. Also, check this GitHub gist on how to download the source code for any Chrome extension. CRX Viewer will allow you to download the source code for any Chrome extension (repo) Thanks, please let me know if you need any help! |
We've added a way to download a phantom crx and install it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many tests are failing when running PROVIDERS=phantom,[email protected] pnpm run test:e2e
commands/metamask.js
Outdated
@@ -1332,13 +1490,14 @@ | |||
await metamask.goToAdvancedSettings(); | |||
} | |||
} | |||
if ((await playwright.metamaskWindow().locator(toggleOn).count()) === 0) { | |||
await playwright.waitAndClick(toggleOff); | |||
if (!(await playwright.windows(PROVIDER).locator(toggleOn).count()) === 0) { |
Check warning
Code scanning / CodeQL
Comparison between inconvertible types Warning
an expression
commands/phantom.js
Outdated
@@ -0,0 +1,551 @@ | |||
const log = require('debug')('synpress:phantom'); |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const log = require('debug')('synpress:phantom'); |
@maximgeerinck Tests are failing due to the recent changes (mostly adding new networks), can you please take a look? Many thanks for considering my request. |
package.json
Outdated
"name": "@phantom/synpress", | ||
"version": "4.0.0-alpha.22", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"name": "@phantom/synpress", | |
"version": "4.0.0-alpha.22", | |
"name": "@synthetixio/synpress", | |
"version": "3.7.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A little bit late, but here's the initial review 🫡
@@ -114,6 +115,9 @@ | |||
"ansi-regex": "5.0.1", | |||
"@testing-library/dom": "8.20.0" | |||
}, | |||
"overrides": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we override lodash
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there were some instances were an insecure version of lodash is used in dependencies, this overrides it
return browser.isConnected(); | ||
}, | ||
clearExtensionData: async provider => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any particular reason why this function was introduced?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for solana dapps this is needed as this is the only proper way to stop auto connecting
); | ||
arguments_.extensions.push(metamaskPath); | ||
if (process.env.PROVIDERS) { | ||
process.env.CYPRESS_PROVIDERS = process.env.PROVIDERS; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we set this here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cause cypress only recognizes env vars that start with CYPRESS_
activateShowCustomNetworkListInMetamask: async skipSetup => { | ||
const activated = await getProvider( | ||
selectedProvider, | ||
).activateShowCustomNetworkList(skipSetup); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happened here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nothing much, just using providers now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean that activateImprovedTokenAllowanceInMetamask
function was replaced by activateShowCustomNetworkListInMetamask
. Curious what happened here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, will put that back
Two crucial things:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rebase looks good 👍🏻 I think we only need working tests for both of the wallets and we can merge this 🫡
feat: Add switch account
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
fix: Fix preferences for default wallet navigation
@maximgeerinck is attempting to deploy a commit to the Synpress Team on Vercel. A member of the Team first needs to authorize it. |
Motivation and context
Add support for phantom wallet.
List of current features:
EXTRA:
@
TODO:
Quality checklist
Future Ideas