Skip to content

Commit 0e19911

Browse files
Docs: Fix typos + add code snippet (#2949)
Co-authored-by: Kien Ngo <kien@cavies.xyz>
1 parent ec149f3 commit 0e19911

File tree

6 files changed

+24
-12
lines changed

6 files changed

+24
-12
lines changed

.changeset/red-moles-begin.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"thirdweb": patch
3+
---
4+
5+
Docs update: fix typos and add code snippet

packages/thirdweb/src/auth/auth.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { verifyLoginPayload } from "./core/verify-login-payload.js";
1414
*
1515
* const auth = createAuth({...});
1616
*
17-
* // 1. genererate a login payload for a client on the server side
17+
* // 1. generate a login payload for a client on the server side
1818
* const loginPayload = await auth.generatePayload({ address: '0x123...' });
1919
*
2020
* // 2. send the login payload to the client

packages/thirdweb/src/extensions/erc721/write/lazyMint.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,15 @@ export type LazyMintParams = {
3737
* ```ts
3838
* import { lazyMint } from "thirdweb/extensions/erc721";
3939
*
40-
* const tx = await lazyMint({
41-
* contract,
42-
* nfts: [
43-
* {
44-
* name: "My NFT",
45-
* description: "This is my NFT",
46-
* image: "https://example.com/image.png",
47-
* },
48-
* ],
40+
* const tx = lazyMint({
41+
* contract,
42+
* nfts: [
43+
* {
44+
* name: "My NFT",
45+
* description: "This is my NFT",
46+
* image: "https://example.com/image.png",
47+
* },
48+
* ],
4949
* });
5050
* ```
5151
*/

packages/thirdweb/src/utils/json.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
/**
2-
* @internal
2+
* Stringify a JSON object and convert all bigint values to string
3+
* @example
4+
* ```ts
5+
* import { stringify } from "thirdweb/utils";
6+
* const obj = { tokenId: 0n };
7+
* const str = stringify(obj); // "{"tokenId":"0"}"
8+
* ```
39
*/
410
export const stringify: typeof JSON.stringify = (value, replacer, space) => {
511
const res = JSON.stringify(

packages/thirdweb/src/utils/signatures/sign.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ export type SignOptions = {
2525
* hash: "0x",
2626
* privateKey: "0x",
2727
* });
28+
* ```
2829
*/
2930
export function sign({ hash, privateKey }: SignOptions): Signature {
3031
const { r, s, recovery } = secp256k1.sign(hash.slice(2), privateKey.slice(2));

packages/thirdweb/src/wallets/wallet-connect/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ export type WCConnectOptions = {
117117
*/
118118
qrModalOptions?: WalletConnectQRCodeModalOptions;
119119
/**
120-
* If you do not want to open the officia WalletConnect Modal and want to render the QR Code Modal yourself, you can set `showQrModal` to `false`
120+
* If you do not want to open the official WalletConnect Modal and want to render the QR Code Modal yourself, you can set `showQrModal` to `false`
121121
* and pass the `onDisplayUri` prop to get the URI to render a custom QR Code Modal.
122122
*
123123
* ```tsx

0 commit comments

Comments
 (0)