-
Notifications
You must be signed in to change notification settings - Fork 348
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
fix: session approval accounts order #562
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
9 Ignored Deployments
|
1. expected order of accounts is smart accounts followed by EOA's 2. supportedAddressPriority will now only return the address of smart account.
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.
Added suggestion to avoid duplicate accounts
// reorderedEip155Accounts includes Smart Accounts(if enabled) and EOA's | ||
namespaces.eip155.accounts = reorderedEip155Accounts | ||
// we should append the smart accounts to the available eip155 accounts | ||
namespaces.eip155.accounts = reorderedEip155Accounts.concat(namespaces.eip155.accounts) |
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.
namespaces.eip155.accounts = reorderedEip155Accounts.concat(namespaces.eip155.accounts) | |
namespaces.eip155.accounts = [...new Set(reorderedEip155Accounts.concat(namespaces.eip155.accounts))] |
this will remove any duplicates from the array
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.
Fixed this by modifying the supportedAddressPriority method to return only the smart account address on supported chain for enabled SA. Will not need this as now no duplication will occur.
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.
Please add a unit test or functional test - optionally if you like but not necessary an e2e playwright test - to prevent future regressions
issue #557 fix included |
reverting to previous solution as suggested.