Skip to content

Commit 4907806

Browse files
chore: version packages v0.10.0 🌊 (#226)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 765610b commit 4907806

File tree

3 files changed

+67
-60
lines changed

3 files changed

+67
-60
lines changed

.changeset/gold-impalas-retire.md

Lines changed: 0 additions & 59 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,71 @@
11
# Changelog
22

3+
## 0.10.0
4+
5+
### Minor Changes
6+
7+
- 4090f4f: - **feat**: Replace internal `useOnchainActionWithCache` with `tanstack/react-query`. This affects `useName` and `useAvatar` hooks. The return type and the input parameters also changed for these 2 hooks.
8+
9+
BREAKING CHANGES
10+
11+
The input parameters as well as return types of `useName` and `useAvatar` hooks have changed. The return type of `useName` and `useAvatar` hooks changed.
12+
13+
### `useName`
14+
15+
Before
16+
17+
```tsx
18+
import { useName } from "@coinbase/onchainkit/identity";
19+
20+
const { ensName, isLoading } = useName("0x1234");
21+
```
22+
23+
After
24+
25+
```tsx
26+
import { useName } from "@coinbase/onchainkit/identity";
27+
28+
// Return type signature is following @tanstack/react-query useQuery hook signature
29+
const {
30+
data: name,
31+
isLoading,
32+
isError,
33+
error,
34+
status,
35+
} = useName(
36+
{ address: "0x1234" },
37+
{ enabled: true, cacheTime: 1000 * 60 * 60 * 24 },
38+
);
39+
```
40+
41+
### `useAvatar`
42+
43+
Before
44+
45+
```tsx
46+
import { useAvatar } from "@coinbase/onchainkit/identity";
47+
48+
const { ensAvatar, isLoading } = useAvatar("vitalik.eth");
49+
```
50+
51+
After
52+
53+
```tsx
54+
import { useAvatar } from "@coinbase/onchainkit/identity";
55+
56+
// Return type signature is following @tanstack/react-query useQuery hook signature
57+
const {
58+
data: avatar,
59+
isLoading,
60+
isError,
61+
error,
62+
status,
63+
} = useAvatar(
64+
{ ensName: "vitalik.eth" },
65+
{ enabled: true, cacheTime: 1000 * 60 * 60 * 24 },
66+
);
67+
```
68+
369
## 0.9.12
470

571
### Patch Changes

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@coinbase/onchainkit",
3-
"version": "0.9.12",
3+
"version": "0.10.0",
44
"repository": "https://github.com/coinbase/onchainkit.git",
55
"license": "MIT",
66
"scripts": {

0 commit comments

Comments
 (0)