Links

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

Parameter
Type
Definition
apiKey
String
The API Key generated from the Developer Portal

Return Value

None.

Example

custom-tokens.js
1
import { Disconnect } from '@metafi/metafi-js-package';
2
3
function App() {
4
5
const handleDisconnect = () => {
6
Disconnect("YOUR-API-KEY");
7
}
8
9
return (
10
<div>
11
<button onClick={handleDisconnect}>Logout</button>
12
</div>
13
);
14
}
15
16
export default App;
17