Closed rossbulat closed 3 weeks ago
[!CAUTION]
Review failed
The pull request is closed.
The pull request introduces a new method fetchAccounts
to the WalletConnect
context and related components, enhancing account retrieval functionality based on a specified chain ID. This method is added to the defaultWalletConnect
object and the WalletConnectContextInterface
. The ManageWalletConnect
component is updated to utilize this new method, simplifying account management by removing session initialization logic. Additionally, several z-index
values in the modal components are adjusted for better layering. Overall, the changes focus on improving the WalletConnect integration and account handling.
File Path | Change Summary |
---|---|
packages/app/src/contexts/WalletConnect/defaults.ts |
Added method fetchAccounts(directoryId) to defaultWalletConnect , returning a resolved promise with an empty array. |
packages/app/src/contexts/WalletConnect/index.tsx |
Introduced fetchAccounts(chainid: ChainId): Promise<string[]> , updated context provider to include this method. |
packages/app/src/contexts/WalletConnect/types.ts |
Added method signature fetchAccounts(directoryId: ChainId) => Promise<string[]> to WalletConnectContextInterface . |
packages/app/src/library/ConnectOverlay/ManageWalletConnect.tsx |
Added fetchAccounts to the useWalletConnect hook, simplified handleImportAddresses to directly call fetchAccounts . |
packages/app/src/library/Overlay/index.scss |
Adjusted z-index values for modal components, reducing values for several classes. |
packages/app/src/library/SubmitTx/ManualSign/WalletConnect/index.tsx |
Updated useWalletConnect to destructure fetchAccounts , enhanced transaction signing logic with account validation. |
fetchAccounts
method in the defaultWalletConnect
object, related to the changes in the WalletConnect
context implementation.WalletConnect
context to enhance session management, aligning with the changes regarding the fetchAccounts
method.🐇 In the meadow, hopping around,
A new method's here, accounts to be found!
WithfetchAccounts
, we simplify the way,
No more sessions to manage, hip-hip-hooray!
So let’s connect and sign with glee,
A smoother journey, just wait and see! 🌼
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Reconnects to a WC session when signing a transaction if needed, and checks if the signer address is a part of the WC session.
Summary by CodeRabbit
Release Notes
New Features
fetchAccounts
method for retrieving account addresses based on the active chain.Bug Fixes
Style
z-index
values for modal components to improve visibility and layering.These updates enhance user experience by streamlining account retrieval and improving session management.