Skip to content

Commit

Permalink
chore: version packages v0.10.0 🌊 (#226)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] and github-actions[bot] authored Mar 6, 2024
1 parent 765610b commit 4907806
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 60 deletions.
59 changes: 0 additions & 59 deletions .changeset/gold-impalas-retire.md

This file was deleted.

66 changes: 66 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,71 @@
# Changelog

## 0.10.0

### Minor Changes

- 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.

BREAKING CHANGES

The input parameters as well as return types of `useName` and `useAvatar` hooks have changed. The return type of `useName` and `useAvatar` hooks changed.

### `useName`

Before

```tsx
import { useName } from "@coinbase/onchainkit/identity";

const { ensName, isLoading } = useName("0x1234");
```

After

```tsx
import { useName } from "@coinbase/onchainkit/identity";

// Return type signature is following @tanstack/react-query useQuery hook signature
const {
data: name,
isLoading,
isError,
error,
status,
} = useName(
{ address: "0x1234" },
{ enabled: true, cacheTime: 1000 * 60 * 60 * 24 },
);
```

### `useAvatar`

Before

```tsx
import { useAvatar } from "@coinbase/onchainkit/identity";

const { ensAvatar, isLoading } = useAvatar("vitalik.eth");
```

After

```tsx
import { useAvatar } from "@coinbase/onchainkit/identity";

// Return type signature is following @tanstack/react-query useQuery hook signature
const {
data: avatar,
isLoading,
isError,
error,
status,
} = useAvatar(
{ ensName: "vitalik.eth" },
{ enabled: true, cacheTime: 1000 * 60 * 60 * 24 },
);
```

## 0.9.12

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@coinbase/onchainkit",
"version": "0.9.12",
"version": "0.10.0",
"repository": "https://github.com/coinbase/onchainkit.git",
"license": "MIT",
"scripts": {
Expand Down

0 comments on commit 4907806

Please sign in to comment.