Disconnect
This function does not trigger any UI elements
Function that clears the user password saved in local storage. The user will be prompted to enter their password again the next time they try to interact with their wallet.
This function should be called when the user logs out of their account.
Disconnect()
This function has no arguments
None
1
import { useMetafi } from '@metafi/metafi-react-package';
2
3
function logoutUser() {
4
const { Disconnect } = useMetafi();
5
6
return (
7
<>
8
<button onClick={()=>Disconnect()}>Logout</button>
9
</>
10
);
11
};
Last modified 3mo ago