Skip to content

Commit e8ec54e

Browse files
Version Packages (#7014)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 58e343c commit e8ec54e

File tree

5 files changed

+104
-100
lines changed

5 files changed

+104
-100
lines changed

.changeset/forty-seals-raise.md

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

packages/thirdweb/CHANGELOG.md

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,105 @@
11
# thirdweb
22

3+
## 5.99.0
4+
5+
### Minor Changes
6+
7+
- [#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
8+
9+
We've significantly improved our EIP-5792 apis, which come with some breaking changes:
10+
11+
### New Functions Added
12+
13+
1. **`useSendAndConfirmCalls`**
14+
15+
- Description: Hook to send and wait for confirmation of EIP-5792 calls
16+
- Returns: React Query mutation object with transaction receipts
17+
- Example:
18+
19+
```tsx
20+
const { mutate: sendAndConfirmCalls, data: result } =
21+
useSendAndConfirmCalls();
22+
await sendAndConfirmCalls({
23+
client,
24+
calls: [tx1, tx2],
25+
});
26+
console.log("Transaction hash:", result.receipts?.[0]?.transactionHash);
27+
```
28+
29+
2. **`useWaitForCallsReceipt`**
30+
- Description: Hook to wait for the receipt of EIP-5792 calls, perfect for splitting submitting the call and waiting for receipt
31+
- Returns: React Query object with call receipts
32+
- Example:
33+
```tsx
34+
const { mutate: sendCalls, data: result } = useSendCalls();
35+
const { data: receipt, isLoading } = useWaitForCallsReceipt(result);
36+
```
37+
38+
### Breaking Changes
39+
40+
#### `useSendCalls` Changes
41+
42+
**Before**
43+
44+
```tsx
45+
// mutation returns id a string
46+
const sendCalls = useSendCalls({ client });
47+
```
48+
49+
**After**
50+
51+
```tsx
52+
// no longer needs client
53+
// mutation returns an object with id
54+
const sendCalls = useSendCalls();
55+
```
56+
57+
Waiting for call receipts is now done separately, via the `useWaitForCallsReceipt`.
58+
59+
**Before**
60+
61+
```tsx
62+
const { mutate: sendCalls, data: receipt } = useSendCalls({
63+
client,
64+
waitForBundle: true,
65+
});
66+
```
67+
68+
**After**
69+
70+
```tsx
71+
const { mutate: sendCalls, data: result } = useSendCalls();
72+
const { data: receipt, isLoading } = useWaitForCallsReceipt(result);
73+
```
74+
75+
You can also use the helper `useSendAndConfirmCalls` to combine both submitting and waiting for confirmation.
76+
77+
```tsx
78+
const { mutate: sendAndConfirmCalls, data: receipt } =
79+
useSendAndConfirmCalls();
80+
```
81+
82+
#### `sendCalls` Changes
83+
84+
**Before**:
85+
86+
```tsx
87+
// Old output type
88+
type SendCallsResult = string;
89+
```
90+
91+
**After**:
92+
93+
```tsx
94+
// New output type
95+
type SendCallsResult = {
96+
id: string;
97+
client: ThirdwebClient;
98+
chain: Chain;
99+
wallet: Wallet;
100+
};
101+
```
102+
3103
## 5.98.2
4104

5105
### Patch Changes

packages/thirdweb/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "thirdweb",
3-
"version": "5.98.2",
3+
"version": "5.99.0",
44
"repository": {
55
"type": "git",
66
"url": "git+https://github.com/thirdweb-dev/js.git#main"

packages/wagmi-adapter/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# @thirdweb-dev/wagmi-adapter
22

3+
## 0.2.76
4+
35
## 0.2.75
46

57
## 0.2.74

packages/wagmi-adapter/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@thirdweb-dev/wagmi-adapter",
3-
"version": "0.2.75",
3+
"version": "0.2.76",
44
"repository": {
55
"type": "git",
66
"url": "git+https://github.com/thirdweb-dev/js.git#main"

0 commit comments

Comments
 (0)