useWalletDetailsModal

Hook to open the Wallet Details Modal that shows various information about the connected wallet and allows users to perform various actions like sending funds, receiving funds, switching networks, Buying tokens, etc.

Example

Basic usage

import { createThirdwebClient } from "thirdweb";
import { useWalletDetailsModal } from "thirdweb/react";
const client = createThirdwebClient({
clientId: "<your_client_id>",
});
function Example() {
const detailsModal = useWalletDetailsModal();
function handleClick() {
detailsModal.open({ client, theme: "light" });
}
return <button onClick={handleClick}> Show Wallet Details </button>;
}

Callback for when the modal is closed

detailsModal.open({
client,
onClose: (screen: string) => console.log({ screen }),
});
function useWalletDetailsModal(): {
open: (props: UseWalletDetailsModalOptions) => void;
};

Returns

let returnType: {
open: (props: UseWalletDetailsModalOptions) => void;
};