Skip to content

Commit

Permalink
docs: fix prepareTransactionRequest usage (#2487)
Browse files Browse the repository at this point in the history
* chore: update prepareTransactionRequest usage docs with correct example

* Update prepareTransactionRequest.md

---------

Co-authored-by: jxom <j@wevm.dev>
  • Loading branch information
Aerilym and jxom authored Jul 10, 2024
1 parent c10fa65 commit bc419b7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions site/pages/docs/actions/wallet/prepareTransactionRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ const request = await walletClient.prepareTransactionRequest({ // [!code focus:1
// @log: }


const signature = await walletClient.signTransaction(request)
const hash = await walletClient.sendRawTransaction(signature)
const serializedTransaction = await walletClient.signTransaction(request)
const hash = await walletClient.sendRawTransaction({ serializedTransaction })
```

```ts twoslash [config.ts] filename="config.ts"
Expand Down Expand Up @@ -80,8 +80,8 @@ const request = await walletClient.prepareTransactionRequest({ // [!code focus:1
// @log: }


const signature = await walletClient.signTransaction(request)
const hash = await walletClient.sendRawTransaction(signature)
const serializedTransaction = await walletClient.signTransaction(request)
const hash = await walletClient.sendRawTransaction({ serializedTransaction })
```

```ts [config.ts (JSON-RPC Account)]
Expand Down

0 comments on commit bc419b7

Please sign in to comment.