-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
chore: siwe to siwx migration #3194
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
…siwe-to-siwx-migration
…siwe-to-siwx-migration
ccc25f4
to
bcab8ea
Compare
…siwe-to-siwx-migration
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've let some comments why changing the tests as this concerns me and we might check if these changes makes sense
cc @tomiir
@@ -59,7 +59,7 @@ test('it should switch to different namespace', async () => { | |||
const chainName = 'Solana' | |||
|
|||
await page.switchNetwork(chainName) | |||
await page.openNetworks() | |||
await validator.expectUnauthenticated() |
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.
In this case the expected behavior of after network switch is to keep the switch network view opened, right? I've changed to expectUnauthenticated
because when switching to non evm with siwe, the current behavior is no validation of signature so unauthenticated.
await modalPage.promptSiwe() | ||
await walletPage.handleRequest({ accept: true }) | ||
await modalValidator.expectAuthenticated() |
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.
This won't expect to prompt siwe because before we were filtering out the solana chain ids when trying to authenticate, as we are not doing it anymore and the OneClickAuth feature won't accept multiple namespaces, the sign message step is now needed for multichain auth.
https://github.com/reown-com/appkit/blob/main/packages/appkit/src/client.ts#L722-L724
@@ -53,5 +56,5 @@ test('it should switch networks and sign siwe', async () => { | |||
test('it should switch to Solana and validate chain title', async () => { | |||
const chainName = 'Solana' | |||
await modalPage.switchNetwork(chainName) | |||
await modalValidator.expectSwitchChainView(chainName.toLocaleLowerCase()) | |||
await modalValidator.expectSwitchedNetworkOnNetworksView(chainName) |
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.
Again, if the expected behavior is to keep switch chain view open after the chain is switched, this test was wrong.
Description
SIWXUtil
object centralizing the logic spread around the code;LocalStorage
to validate getting sessions.Type of change
Associated Issues
For Linear issues: Closes APKT-1408
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