import { useMemo } from "react";
import { DialectSolanaSdk } from "@dialectlabs/react-sdk-blockchain-solana";
import { NotificationsButton } from "@dialectlabs/react-ui";
import { useMyCustomWallet } from "./my-wallet";
export function CustomWalletNotifications() {
const wallet = useMyCustomWallet(); // Your wallet implementation
const walletAdapter = useMemo(
() => ({
publicKey: wallet.publicKey, // PublicKey | null
signMessage: wallet.signMessage, // (msg: Uint8Array) => Promise<Uint8Array>
signTransaction: wallet.signTransaction, // <T extends Transaction | VersionedTransaction>(tx: T) => Promise<T>
}),
[wallet]
);
return (
<DialectSolanaSdk
dappAddress="your-dapp-address"
customWalletAdapter={walletAdapter}
>
<NotificationsButton />
</DialectSolanaSdk>
);
}