Skip to content

Commit 77c2a8a

Browse files
kien-ngokien-caviesjnsdls
authored
Update code snippet for ERC20 getBalance; fix typos (#2857)
Signed-off-by: Jonas Daniels <jonas.daniels@outlook.com> Co-authored-by: Kien Ngo <kien@cavies.xyz> Co-authored-by: Jonas Daniels <jonas.daniels@outlook.com>
1 parent 5c1f4db commit 77c2a8a

File tree

4 files changed

+10
-5
lines changed

4 files changed

+10
-5
lines changed

.changeset/poor-humans-eat.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 incorrect code snippets, fix typos

packages/thirdweb/src/adapters/viem.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export const viemAdapter = {
3131
* ```ts
3232
* import { viemAdapter } from "thirdweb/adapters";
3333
*
34-
* const contract = viemmAdapter.contract.fromViem({
34+
* const contract = viemAdapter.contract.fromViem({
3535
* viemContract: viemContract,
3636
* chain: ethereum,
3737
* client,
@@ -246,7 +246,7 @@ function fromViemWalletClient(options: {
246246
const viemAccount = options.walletClient.account;
247247
if (!viemAccount) {
248248
throw new Error(
249-
"Account not found in walletClient, please pass it explicitely.",
249+
"Account not found in walletClient, please pass it explicitly.",
250250
);
251251
}
252252
return {

packages/thirdweb/src/extensions/ens/resolve-name.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export type ResolveNameOptions = {
1717
};
1818

1919
/**
20-
* Resolves the primary name for a specificed address.
20+
* Resolves the primary name for a specified address.
2121
* @param options - The options for resolving an ENS address.
2222
* @example
2323
* ```ts

packages/thirdweb/src/extensions/erc20/read/getBalance.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ export type GetBalanceResult = {
3030
* @extension ERC20
3131
* @example
3232
* ```ts
33-
* import { balanceOf } from "thirdweb/extensions/erc20";
33+
* import { getBalance } from "thirdweb/extensions/erc20";
3434
*
35-
* const balance = await balanceOf({ contract, address: "0x..." });
35+
* const balance = await getBalance({ contract, address: "0x..." });
3636
* ```
3737
*/
3838
export async function getBalance(

0 commit comments

Comments
 (0)