Skip to content

Commit 08fe542

Browse files
authored
Merge branch 'main' into yash/ref-constructor-params
2 parents 4926c77 + 43fbcac commit 08fe542

File tree

107 files changed

+3961
-1044
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+3961
-1044
lines changed

.changeset/blue-bees-ring.md

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

.changeset/fair-plants-pretend.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
---
2+
"thirdweb": minor
3+
---
4+
The Connected-details button now shows USD value next to the token balance.
5+
6+
### Breaking change to the AccountBalance
7+
The formatFn props now takes in an object of type `AccountBalanceInfo`. The old `formatFn` was inflexible because it only allowed you to format the balance value.
8+
With this new version, you have access to both the balance and symbol.
9+
```tsx
10+
import { AccountBalance, type AccountBalanceInfo } from "thirdweb/react";
11+
12+
<AccountBalance
13+
// Show the symbol in lowercase, before the balance
14+
formatFn={(props: AccountBalanceInfo) => `${props.symbol.toLowerCase()} ${props.balance}`}
15+
/>
16+
```
17+
18+
AccountBalance now supports showing the token balance in fiat value (only USD supported at the moment)
19+
```tsx
20+
<AccountBalance
21+
showBalanceInFiat="USD"
22+
/>
23+
```
24+
25+
The `formatFn` prop now takes in an object of type `AccountBalanceInfo` and outputs a string
26+
```tsx
27+
import { AccountBalance, type AccountBalanceInfo } from "thirdweb/react";
28+
29+
<AccountBalance
30+
formatFn={(props: AccountBalanceInfo) => `${props.balance}---${props.symbol.toLowerCase()}`}
31+
/>
32+
33+
// Result: 11.12---eth
34+
```
35+
36+
### ConnectButton also supports displaying balance in fiat since it uses AccountBalance internally
37+
```tsx
38+
<ConnectButton
39+
// Show USD value on the button
40+
detailsButton={{
41+
showBalanceInFiat: "USD",
42+
}}
43+
44+
// Show USD value on the modal
45+
detailsModal={{
46+
showBalanceInFiat: "USD",
47+
}}
48+
/>
49+
```
50+
51+
### Export utils functions:
52+
formatNumber: Round up a number to a certain decimal place
53+
```tsx
54+
import { formatNumber } from "thirdweb/utils";
55+
const value = formatNumber(12.1214141, 1); // 12.1
56+
```
57+
58+
shortenLargeNumber: Shorten the string for large value. Mainly used for the AccountBalance's `formatFn`
59+
```tsx
60+
import { shortenLargeNumber } from "thirdweb/utils";
61+
const numStr = shortenLargeNumber(1_000_000_000)
62+
```
63+
64+
### Fix to ConnectButton
65+
The social image of the Details button now display correctly for non-square image.
66+
67+
### Massive test coverage improvement for the Connected-button components

.changeset/ninety-foxes-refuse.md

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

.changeset/odd-coats-cheer.md

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

.changeset/silent-hats-melt.md

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

.changeset/strong-beans-pump.md

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

.changeset/strong-meals-remain.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+
Fix: Disconnect smart account when account signer is disconnected

apps/dashboard/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"@radix-ui/react-tooltip": "1.1.4",
4949
"@sentry/nextjs": "8.42.0",
5050
"@shazow/whatsabi": "^0.17.0",
51-
"@tanstack/react-query": "5.62.2",
51+
"@tanstack/react-query": "5.62.3",
5252
"@tanstack/react-table": "^8.17.3",
5353
"@thirdweb-dev/service-utils": "workspace:*",
5454
"@vercel/functions": "^1.5.1",
@@ -119,8 +119,8 @@
119119
"@types/papaparse": "^5.3.15",
120120
"@types/pluralize": "^0.0.33",
121121
"@types/qrcode": "^1.5.5",
122-
"@types/react": "19.0.0",
123-
"@types/react-dom": "19.0.0",
122+
"@types/react": "19.0.1",
123+
"@types/react-dom": "19.0.1",
124124
"@types/react-table": "^7.7.20",
125125
"@types/spdx-correct": "^3.1.3",
126126
"@types/swagger-ui-react": "^4.18.3",

apps/dashboard/src/app/(dashboard)/(chain)/utils.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,11 @@ const chainMetaRecord = {
269269
buttonText: "Learn more",
270270
},
271271
},
272+
//Arena Z Mainnet
273+
7897: {
274+
cta: OP_CTA,
275+
gasSponsored: true,
276+
},
272277
// B3 Mainnet
273278
8333: {
274279
headerImgUrl: thirdwebBanner.src,

apps/dashboard/src/app/team/[team_slug]/(team)/~/ecosystem/[slug]/(active)/analytics/components/EcosystemAnalyticsPage.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@ import { getEcosystemWalletUsage } from "data/analytics/wallets/ecosystem";
77
import { EcosystemWalletUsersChartCard } from "./EcosystemWalletUsersChartCard";
88

99
export async function EcosystemAnalyticsPage({
10-
ecosystemId,
10+
ecosystemSlug,
1111
interval,
1212
range,
13-
}: { ecosystemId: string; interval: "day" | "week"; range?: Range }) {
13+
}: { ecosystemSlug: string; interval: "day" | "week"; range?: Range }) {
1414
if (!range) {
1515
range = getLastNDaysRange("last-120");
1616
}
1717

1818
const stats = await getEcosystemWalletUsage({
19-
ecosystemId,
19+
ecosystemSlug,
2020
from: range.from,
2121
to: range.to,
2222
period: interval,

0 commit comments

Comments
 (0)