Hey is a decentralized and permissionless social media app built with Lens Protocol 馃尶
at main 28 lines 699 B view raw
1import { useWithdrawMutation } from "@hey/indexer"; 2import type { Address } from "viem"; 3import TokenOperation from "./TokenOperation"; 4 5interface WithdrawProps { 6 currency?: Address; 7 value: string; 8 refetch: () => void; 9} 10 11const Withdraw = ({ currency, value, refetch }: WithdrawProps) => { 12 return ( 13 <TokenOperation 14 buildRequest={(amount) => 15 currency ? { erc20: { currency, value: amount } } : { native: amount } 16 } 17 buttonLabel="Withdraw" 18 refetch={refetch} 19 resultKey="withdraw" 20 successMessage="Withdrawal Successful" 21 title="Withdraw" 22 useMutationHook={useWithdrawMutation} 23 value={value} 24 /> 25 ); 26}; 27 28export default Withdraw;