Metafi React SDK
Developer PortalMore Docs ⏷About Us ⏷Help & Resources ⏷
v1.2.8 (Latest)
v1.2.8 (Latest)
  • What's new in this version?
  • Get Started
  • SDK Reference
    • Provider Initialisation
    • Login
    • ShowWallet
    • HideWallet
    • TransferTokens
    • CallGenericReadFunction
    • CallGenericWriteFunction
    • CallGaslessFunction
    • Checkout
    • RegisterToken
    • RetrieveUser
    • Disconnect
  • Constants
    • Chain
    • Asset
  • UI Customization
Powered by GitBook
On this page
  • Description
  • Details
  • Signature
  • Arguments
  • Return Value
  • Example
  1. SDK Reference

Disconnect

This function does not trigger any UI elements

Description

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.

Details

Signature

Disconnect()

Arguments

This function has no arguments

Return Value

None

Example

import { useMetafi } from '@metafi/metafi-react-package';

function logoutUser() {
    const { Disconnect } = useMetafi();
    
    return (
        <>
           <button onClick={()=>Disconnect()}>Logout</button>
        </>
    );
};
PreviousRetrieveUserNextConstants

Last updated 2 years ago