Disconnect

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(apiKey)

Arguments

ParameterTypeDefinition

apiKey

String

The API Key generated from the Developer Portal

Return Value

None.

Example

custom-tokens.js
import { Disconnect } from '@metafi/metafi-js-package';

function App() {

    const handleDisconnect = () => {
        Disconnect("YOUR-API-KEY");
    }
    
    return (
        <div>
	    <button onClick={handleDisconnect}>Logout</button>
        </div>
    );
}

export default App;

Last updated