import React from "react"; import { W3Wrapper } from "../W3Wrapper"; import { ComponentStory, ComponentMeta } from "@storybook/react"; import { useEthers, useSendTransaction } from "@usedapp/core"; import { useFaucet } from "../../sdk/faucet/react"; export interface PageProps { address?: string; firstName?: string; } const Web3Component = () => { const { account } = useEthers(); const send = useSendTransaction({ transactionName: "x" }); const onSend = async () => { const res = await send.sendTransaction({ to: account, value: 0 }); console.log({ res }); }; void useFaucet(); return
Send test tx
; }; const Page = () => ( ); export default { title: "Faucet SDK hooks example", component: Page } as ComponentMeta; const Template: ComponentStory = args => ( ); export const FaucetSDKExample = Template.bind({});