Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 0 additions & 98 deletions .changeset/forty-seals-raise.md

This file was deleted.

100 changes: 100 additions & 0 deletions packages/thirdweb/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,105 @@
# thirdweb

## 5.99.0

### Minor Changes

- [#7003](https://github.com/thirdweb-dev/js/pull/7003) [`58e343c`](https://github.com/thirdweb-dev/js/commit/58e343c10ccbab638f612591fb62761abc988b3e) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Breaking change: EIP-5792 support

We've significantly improved our EIP-5792 apis, which come with some breaking changes:

### New Functions Added

1. **`useSendAndConfirmCalls`**

- Description: Hook to send and wait for confirmation of EIP-5792 calls
- Returns: React Query mutation object with transaction receipts
- Example:

```tsx
const { mutate: sendAndConfirmCalls, data: result } =
useSendAndConfirmCalls();
await sendAndConfirmCalls({
client,
calls: [tx1, tx2],
});
console.log("Transaction hash:", result.receipts?.[0]?.transactionHash);
```

2. **`useWaitForCallsReceipt`**
- Description: Hook to wait for the receipt of EIP-5792 calls, perfect for splitting submitting the call and waiting for receipt
- Returns: React Query object with call receipts
- Example:
```tsx
const { mutate: sendCalls, data: result } = useSendCalls();
const { data: receipt, isLoading } = useWaitForCallsReceipt(result);
```

### Breaking Changes

#### `useSendCalls` Changes

**Before**

```tsx
// mutation returns id a string
const sendCalls = useSendCalls({ client });
```

**After**

```tsx
// no longer needs client
// mutation returns an object with id
const sendCalls = useSendCalls();
```

Waiting for call receipts is now done separately, via the `useWaitForCallsReceipt`.

**Before**

```tsx
const { mutate: sendCalls, data: receipt } = useSendCalls({
client,
waitForBundle: true,
});
```

**After**

```tsx
const { mutate: sendCalls, data: result } = useSendCalls();
const { data: receipt, isLoading } = useWaitForCallsReceipt(result);
```

You can also use the helper `useSendAndConfirmCalls` to combine both submitting and waiting for confirmation.

```tsx
const { mutate: sendAndConfirmCalls, data: receipt } =
useSendAndConfirmCalls();
```

#### `sendCalls` Changes

**Before**:

```tsx
// Old output type
type SendCallsResult = string;
```

**After**:

```tsx
// New output type
type SendCallsResult = {
id: string;
client: ThirdwebClient;
chain: Chain;
wallet: Wallet;
};
```

## 5.98.2

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/thirdweb/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "thirdweb",
"version": "5.98.2",
"version": "5.99.0",
"repository": {
"type": "git",
"url": "git+https://github.com/thirdweb-dev/js.git#main"
Expand Down
2 changes: 2 additions & 0 deletions packages/wagmi-adapter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# @thirdweb-dev/wagmi-adapter

## 0.2.76

## 0.2.75

## 0.2.74
Expand Down
2 changes: 1 addition & 1 deletion packages/wagmi-adapter/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/wagmi-adapter",
"version": "0.2.75",
"version": "0.2.76",
"repository": {
"type": "git",
"url": "git+https://github.com/thirdweb-dev/js.git#main"
Expand Down
Loading