useWalletContext
@coinbase/waas-sdk-web-react • API
Function: useWalletContext()
useWalletContext():
TWaasContext
A hook for using an MPC wallet, in a component that is already wrapped in the WalletProvider.
Returns
The @coinbase/waas-sdk-web#Waas instance, and a wallet.
This must be used within a WalletProvider.
e.g
<WalletProvider>
<MyComponent />
</WalletProvider>
//...
const MyComponent = () => {
const {wallet, isCreatingWallet} = useWalletContext();
//...
}