You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a user disconnects their wallet directly through the wallet extension (e.g., by manually disconnecting within the wallet’s interface), the useWallet() hook from does not update the connected state to reflect this change. As a result, it is not possible to detect that the wallet has been disconnected from the extension, which prevents the application from responding appropriately.
Steps to Reproduce
Integrate @aptos-labs/wallet-adapter-react in a React project.
Use the useWallet() hook to monitor connected state and handle wallet connection status.
Connect a wallet through the extension.
Manually disconnect the wallet via the wallet extension interface.
Observe that the connected state in useWallet() does not change to false after the wallet is disconnected.
Expected Behavior
The connected state should update to false when the wallet is disconnected manually through the extension interface. This would allow applications to handle disconnection events correctly and provide a consistent user experience.
Actual Behavior
The connected state remains true, even after the wallet has been manually disconnected through the extension. This causes issues in applications that rely on the connected status to manage authenticated sessions or UI updates.
It would be helpful if the useWallet() hook could listen to wallet connection status changes directly from the extension to accurately reflect the connection status in the connected state.
The text was updated successfully, but these errors were encountered:
Summary
When a user disconnects their wallet directly through the wallet extension (e.g., by manually disconnecting within the wallet’s interface), the
useWallet()
hook from does not update theconnected
state to reflect this change. As a result, it is not possible to detect that the wallet has been disconnected from the extension, which prevents the application from responding appropriately.Steps to Reproduce
@aptos-labs/wallet-adapter-react
in a React project.useWallet()
hook to monitorconnected
state and handle wallet connection status.connected
state inuseWallet()
does not change tofalse
after the wallet is disconnected.Expected Behavior
The
connected
state should update tofalse
when the wallet is disconnected manually through the extension interface. This would allow applications to handle disconnection events correctly and provide a consistent user experience.Actual Behavior
The
connected
state remainstrue
, even after the wallet has been manually disconnected through the extension. This causes issues in applications that rely on the connected status to manage authenticated sessions or UI updates.Additional Information
Library Version: 3.7.3
React Version: 18.3.1
Browser: Arc
Wallet Extensions: Razor Wallet, Petra Aptos Wallet
Possible Solution or Suggestion
It would be helpful if the
useWallet()
hook could listen to wallet connection status changes directly from the extension to accurately reflect the connection status in the connected state.The text was updated successfully, but these errors were encountered: