From 9a13153b9d129a00599e0948a2bfda26ca0868cd Mon Sep 17 00:00:00 2001 From: Gregory Hill Date: Thu, 5 Sep 2024 17:19:24 +0100 Subject: [PATCH] refactor: remove unused playground code Signed-off-by: Gregory Hill --- playgrounds/vite-react/src/App.tsx | 143 ----------------------------- 1 file changed, 143 deletions(-) diff --git a/playgrounds/vite-react/src/App.tsx b/playgrounds/vite-react/src/App.tsx index e5ca712..3a33662 100644 --- a/playgrounds/vite-react/src/App.tsx +++ b/playgrounds/vite-react/src/App.tsx @@ -2,20 +2,11 @@ import type { FormEvent } from 'react'; import { type Hex, formatUnits, parseUnits } from 'viem'; import { - // type BaseError, useAccount, - // useAccountEffect, useBalance, - // useBlockNumber, - // useChainId, useConnect, - // useConnections, - // useConnectorClient, useDisconnect, useSendTransaction - // useSignMessage, - // useSwitchAccount, - // useSwitchChain, // useWaitForTransactionReceipt, } from '@gobob/sats-wagmi'; @@ -28,26 +19,11 @@ function parseBtc(ether: string) { } function App() { - // useAccountEffect({ - // onConnect(_data) { - // // console.log('onConnect', data) - // }, - // onDisconnect() { - // // console.log('onDisconnect') - // }, - // }) - return ( <> - {/* - - - - */} - {/* */} ); @@ -95,93 +71,6 @@ function Connect() { ); } -// function SwitchAccount() { -// const account = useAccount() -// const { connectors, switchAccount } = useSwitchAccount() - -// return ( -//
-//

Switch Account

- -// {connectors.map((connector) => ( -// -// ))} -//
-// ) -// } - -// function SwitchChain() { -// const chainId = useChainId() -// const { chains, switchChain, error } = useSwitchChain() - -// return ( -//
-//

Switch Chain

- -// {chains.map((chain) => ( -// -// ))} - -// {error?.message} -//
-// ) -// } - -// function SignMessage() { -// const { data, signMessage } = useSignMessage() - -// return ( -//
-//

Sign Message

- -//
{ -// event.preventDefault() -// const formData = new FormData(event.target as HTMLFormElement) -// signMessage({ message: formData.get('message') as string }) -// }} -// > -// -// -//
- -// {data} -//
-// ) -// } - -// function Connections() { -// const connections = useConnections() - -// return ( -//
-//

Connections

- -// {connections.map((connection) => ( -//
-//
connector {connection.connector.name}
-//
accounts: {JSON.stringify(connection.accounts)}
-//
chainId: {connection.chainId}
-//
-// ))} -//
-// ) -// } - function Balance() { const { data: account_ } = useBalance(); @@ -194,38 +83,6 @@ function Balance() { ); } -// function BlockNumber() { -// const { data: default_ } = useBlockNumber({ watch: true }) -// const { data: account_ } = useBlockNumber({ -// watch: true, -// }) -// const { data: optimism_ } = useBlockNumber({ -// chainId: optimism.id, -// watch: true, -// }) - -// return ( -//
-//

Block Number

- -//
Block Number (Default Chain): {default_?.toString()}
-//
Block Number (Account Chain): {account_?.toString()}
-//
Block Number (Optimism): {optimism_?.toString()}
-//
-// ) -// } - -// function ConnectorClient() { -// const { data, error } = useConnectorClient() -// return ( -//
-//

Connector Client

-// client {data?.account?.address} {data?.chain?.id} -// {error?.message} -//
-// ) -// } - function SendTransaction() { const { data: hash, isPending, sendTransaction } = useSendTransaction();