watchWalletStatus
Ce contenu n’est pas encore disponible dans votre langue.
watchWalletStatus(
client,callback?):Promise<WalletStatusReturnType>
Defined in: actions/watchWalletStatus.ts:23
Function used to watch the current frak wallet status
Parameters
Section titled “Parameters”client
Section titled “client”The current Frak Client
callback?
Section titled “callback?”(status) => void
The callback that will receive any wallet status change
Returns
Section titled “Returns”Promise<WalletStatusReturnType>
A promise resolving with the initial wallet status
Description
Section titled “Description”This function will return the current wallet status, and will listen to any change in the wallet status.
Example
Section titled “Example”await watchWalletStatus(frakConfig, (status: WalletStatusReturnType) => { if (status.key === "connected") { console.log("Wallet connected:", status.wallet); } else { console.log("Wallet not connected"); }});