diff --git a/.changeset/fair-plants-pretend.md b/.changeset/fair-plants-pretend.md deleted file mode 100644 index 21cadbdacf2..00000000000 --- a/.changeset/fair-plants-pretend.md +++ /dev/null @@ -1,67 +0,0 @@ ---- -"thirdweb": minor ---- -The Connected-details button now shows USD value next to the token balance. - -### Breaking change to the AccountBalance -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. -With this new version, you have access to both the balance and symbol. -```tsx -import { AccountBalance, type AccountBalanceInfo } from "thirdweb/react"; - - `${props.symbol.toLowerCase()} ${props.balance}`} -/> -``` - -AccountBalance now supports showing the token balance in fiat value (only USD supported at the moment) -```tsx - -``` - -The `formatFn` prop now takes in an object of type `AccountBalanceInfo` and outputs a string -```tsx -import { AccountBalance, type AccountBalanceInfo } from "thirdweb/react"; - - `${props.balance}---${props.symbol.toLowerCase()}`} -/> - -// Result: 11.12---eth -``` - -### ConnectButton also supports displaying balance in fiat since it uses AccountBalance internally -```tsx - -``` - -### Export utils functions: -formatNumber: Round up a number to a certain decimal place -```tsx -import { formatNumber } from "thirdweb/utils"; -const value = formatNumber(12.1214141, 1); // 12.1 -``` - -shortenLargeNumber: Shorten the string for large value. Mainly used for the AccountBalance's `formatFn` -```tsx -import { shortenLargeNumber } from "thirdweb/utils"; -const numStr = shortenLargeNumber(1_000_000_000) -``` - -### Fix to ConnectButton -The social image of the Details button now display correctly for non-square image. - -### Massive test coverage improvement for the Connected-button components \ No newline at end of file diff --git a/.changeset/strong-meals-remain.md b/.changeset/strong-meals-remain.md deleted file mode 100644 index 1fed99076ca..00000000000 --- a/.changeset/strong-meals-remain.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"thirdweb": patch ---- - -Fix: Disconnect smart account when account signer is disconnected diff --git a/packages/thirdweb/CHANGELOG.md b/packages/thirdweb/CHANGELOG.md index 751db353f33..d7276ea2254 100644 --- a/packages/thirdweb/CHANGELOG.md +++ b/packages/thirdweb/CHANGELOG.md @@ -1,5 +1,88 @@ # thirdweb +## 5.76.0 + +### Minor Changes + +- [#5533](https://github.com/thirdweb-dev/js/pull/5533) [`43fbcac`](https://github.com/thirdweb-dev/js/commit/43fbcac25e9383743f1f42af9da7fe1c1eae12b4) Thanks [@kien-ngo](https://github.com/kien-ngo)! - The Connected-details button now shows USD value next to the token balance. + + ### Breaking change to the AccountBalance + + 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. + With this new version, you have access to both the balance and symbol. + + ```tsx + import { AccountBalance, type AccountBalanceInfo } from "thirdweb/react"; + + + `${props.symbol.toLowerCase()} ${props.balance}` + } + />; + ``` + + AccountBalance now supports showing the token balance in fiat value (only USD supported at the moment) + + ```tsx + + ``` + + The `formatFn` prop now takes in an object of type `AccountBalanceInfo` and outputs a string + + ```tsx + import { AccountBalance, type AccountBalanceInfo } from "thirdweb/react"; + + + `${props.balance}---${props.symbol.toLowerCase()}` + } + />; + + // Result: 11.12---eth + ``` + + ### ConnectButton also supports displaying balance in fiat since it uses AccountBalance internally + + ```tsx + + ``` + + ### Export utils functions: + + formatNumber: Round up a number to a certain decimal place + + ```tsx + import { formatNumber } from "thirdweb/utils"; + const value = formatNumber(12.1214141, 1); // 12.1 + ``` + + shortenLargeNumber: Shorten the string for large value. Mainly used for the AccountBalance's `formatFn` + + ```tsx + import { shortenLargeNumber } from "thirdweb/utils"; + const numStr = shortenLargeNumber(1_000_000_000); + ``` + + ### Fix to ConnectButton + + The social image of the Details button now display correctly for non-square image. + + ### Massive test coverage improvement for the Connected-button components + +### Patch Changes + +- [#5617](https://github.com/thirdweb-dev/js/pull/5617) [`c48e0c9`](https://github.com/thirdweb-dev/js/commit/c48e0c9320830aa69c0e9567d985ed8a94eeaaf1) Thanks [@gregfromstl](https://github.com/gregfromstl)! - Fix: Disconnect smart account when account signer is disconnected + ## 5.75.0 ### Minor Changes diff --git a/packages/thirdweb/package.json b/packages/thirdweb/package.json index 435bb0f2895..1b818530aab 100644 --- a/packages/thirdweb/package.json +++ b/packages/thirdweb/package.json @@ -1,6 +1,6 @@ { "name": "thirdweb", - "version": "5.75.0", + "version": "5.76.0", "repository": { "type": "git", "url": "git+https://github.com/thirdweb-dev/js.git#main"