Skip to content

Commit

Permalink
docs: sendTransaction
Browse files Browse the repository at this point in the history
  • Loading branch information
tmm committed Aug 4, 2023
1 parent a34916a commit b2ff103
Show file tree
Hide file tree
Showing 6 changed files with 386 additions and 57 deletions.
16 changes: 14 additions & 2 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,10 @@ function getSidebar() {
text: 'Testing 🚧',
link: '/react/testing',
},
{
text: 'Chain-Specific Properties 🚧',
link: '/react/testing',
},
{
text: 'FAQ / Troubleshooting',
link: '/react/faq',
Expand Down Expand Up @@ -255,6 +259,10 @@ function getSidebar() {
text: 'useConnections',
link: '/react/hooks/useConnections',
},
{
text: 'useConnectorClient 🚧',
link: '/react/hooks/useConnectorClient',
},
{
text: 'useContractEvent 🚧',
link: '/react/hooks/useContractEvent',
Expand Down Expand Up @@ -383,6 +391,10 @@ function getSidebar() {
text: 'Testing 🚧',
link: '/core/testing',
},
{
text: 'Chain-Specific Properties 🚧',
link: '/core/testing',
},
{
text: 'FAQ / Troubleshooting',
link: '/core/faq',
Expand Down Expand Up @@ -442,7 +454,7 @@ function getSidebar() {
{ text: 'readContract 🚧', link: '/core/actions/readContract' },
{ text: 'readContracts 🚧', link: '/core/actions/readContracts' },
{
text: 'sendTransaction 🚧',
text: 'sendTransaction',
link: '/core/actions/sendTransaction',
},
{
Expand All @@ -458,7 +470,7 @@ function getSidebar() {
link: '/core/actions/simulateContract',
},
{
text: 'switchAccount 🚧',
text: 'switchAccount',
link: '/core/actions/switchAccount',
},
{
Expand Down
25 changes: 8 additions & 17 deletions docs/core/actions/connect.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@ import { connect } from '@wagmi/core'
import { injected } from '@wagmi/connectors'
import { config } from './config'

const result = await connect(
config,
{ connector: injected() },
)
const result = await connect(config, { connector: injected() })
```
<<< @/snippets/core/config.ts[config.ts]
:::
Expand All @@ -51,13 +48,10 @@ import { mainnet } from '@wagmi/core/chains'
import { injected } from '@wagmi/connectors'
import { config } from './config'

const result = await connect(
config,
{
chainId: mainnet.id, // [!code focus]
connector: injected(),
},
)
const result = await connect(config, {
chainId: mainnet.id, // [!code focus]
connector: injected(),
})
```
<<< @/snippets/core/config.ts[config.ts]
:::
Expand All @@ -74,12 +68,9 @@ import { connect } from '@wagmi/core'
import { injected } from '@wagmi/connectors' // [!code focus]
import { config } from './config'

const result = await connect(
config,
{
connector: injected(), // [!code focus]
},
)
const result = await connect(config, {
connector: injected(), // [!code focus]
})
```
<<< @/snippets/core/config.ts[config.ts]
:::
Expand Down
7 changes: 3 additions & 4 deletions docs/core/actions/disconnect.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,9 @@ import { disconnect, getAccount } from '@wagmi/core'
import { config } from './config'

const { connector } = getAccount(config)
const result = await disconnect(
config,
{ connector }, // [!code focus]
)
const result = await disconnect(config, {
connector, // [!code focus]
})
```
<<< @/snippets/core/config.ts[config.ts]
:::
Expand Down
12 changes: 3 additions & 9 deletions docs/core/actions/reconnect.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@ import { reconnect } from '@wagmi/core'
import { injected } from '@wagmi/connectors'
import { config } from './config'

const result = await reconnect(
config,
{ connectors: [injected()] },
)
const result = await reconnect(config, { connectors: [injected()] })
```
<<< @/snippets/core/config.ts[config.ts]
:::
Expand All @@ -49,12 +46,9 @@ import { connect } from '@wagmi/core'
import { injected } from '@wagmi/connectors'
import { config } from './config'

const result = await reconnect(
config,
{
const result = await reconnect(config, {
connectors: [injected()], // [!code focus]
},
)
})
```
<<< @/snippets/core/config.ts[config.ts]
:::
Expand Down
Loading

1 comment on commit b2ff103

@vercel
Copy link

@vercel vercel bot commented on b2ff103 Aug 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

wagmi-v2 – ./docs

wagmi-v2-git-alpha-wagmi-dev.vercel.app
wagmi-v2.vercel.app
alpha.wagmi.sh
wagmi-v2-wagmi-dev.vercel.app

Please sign in to comment.