Skip to content

Commit

Permalink
Version Packages (#5650)
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
jnsdls and github-actions[bot] authored Dec 10, 2024
1 parent d5a68c8 commit 5158def
Show file tree
Hide file tree
Showing 15 changed files with 111 additions and 123 deletions.
5 changes: 0 additions & 5 deletions .changeset/breezy-birds-glow.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/cool-pugs-smoke.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/curly-cycles-hammer.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/dirty-goats-invent.md

This file was deleted.

67 changes: 0 additions & 67 deletions .changeset/fair-plants-pretend.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/gold-gorillas-clap.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/lovely-spoons-attack.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/nervous-pots-smell.md

This file was deleted.

9 changes: 0 additions & 9 deletions .changeset/serious-bananas-boil.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/strong-meals-remain.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/tasty-emus-promise.md

This file was deleted.

6 changes: 6 additions & 0 deletions packages/service-utils/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @thirdweb-dev/service-utils

## 0.4.52

### Patch Changes

- [#5670](https://github.com/thirdweb-dev/js/pull/5670) [`e702490`](https://github.com/thirdweb-dev/js/commit/e702490f2ff5e2b7d6b28c06731af880583cf8bc) Thanks [@arcoraven](https://github.com/arcoraven)! - Add modelName, sessionId, requestId to usage

## 0.4.51

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/service-utils/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/service-utils",
"version": "0.4.51",
"version": "0.4.52",
"type": "module",
"main": "dist/cjs/index.js",
"module": "dist/esm/index.js",
Expand Down
103 changes: 103 additions & 0 deletions packages/thirdweb/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,108 @@
# 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";

<AccountBalance
// Show the symbol in lowercase, before the balance
formatFn={(props: AccountBalanceInfo) =>
`${props.symbol.toLowerCase()} ${props.balance}`
}
/>;
```

AccountBalance now supports showing the token balance in fiat value (only USD supported at the moment)

```tsx
<AccountBalance showBalanceInFiat="USD" />
```

The `formatFn` prop now takes in an object of type `AccountBalanceInfo` and outputs a string

```tsx
import { AccountBalance, type AccountBalanceInfo } from "thirdweb/react";

<AccountBalance
formatFn={(props: AccountBalanceInfo) =>
`${props.balance}---${props.symbol.toLowerCase()}`
}
/>;

// Result: 11.12---eth
```

### ConnectButton also supports displaying balance in fiat since it uses AccountBalance internally

```tsx
<ConnectButton
// Show USD value on the button
detailsButton={{
showBalanceInFiat: "USD",
}}
// Show USD value on the modal
detailsModal={{
showBalanceInFiat: "USD",
}}
/>
```

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

- [#5655](https://github.com/thirdweb-dev/js/pull/5655) [`f69d1aa`](https://github.com/thirdweb-dev/js/commit/f69d1aad2d154a05ebc61a1d7545bd9e5aab17be) Thanks [@kien-ngo](https://github.com/kien-ngo)! - Improve NFT Components
- Add custom resolver methods to NFTMedia, NFTName and NFTDescription
- Add caching for the NFT-info-getter method to improve performance
- Small fix to handle falsy values for NFT media src, name and description
- Improve test coverage by extracting internal logics and testing them

### Patch Changes

- [#5660](https://github.com/thirdweb-dev/js/pull/5660) [`d5a68c8`](https://github.com/thirdweb-dev/js/commit/d5a68c85111809bf39e57f5fb39b5458c1f3fe9a) Thanks [@gregfromstl](https://github.com/gregfromstl)! - Fix: Correctly cleans the "Custom Auth" profile type label

- [#5672](https://github.com/thirdweb-dev/js/pull/5672) [`3b53732`](https://github.com/thirdweb-dev/js/commit/3b5373293202b8ff13cc1502bef3cc9dffaa5afa) Thanks [@gregfromstl](https://github.com/gregfromstl)! - Fix ox hardset version

- [#5653](https://github.com/thirdweb-dev/js/pull/5653) [`df734ba`](https://github.com/thirdweb-dev/js/commit/df734baf97ec2e976fedb124ecfbac7119c0bc5f) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - More helpful error messages for enclave and userop errors

- [#5656](https://github.com/thirdweb-dev/js/pull/5656) [`f680496`](https://github.com/thirdweb-dev/js/commit/f680496ccb1c639fab644fb54e9a962627cf3228) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Fix connecting to cb wallet browser extension when already on the same chain

- [#5671](https://github.com/thirdweb-dev/js/pull/5671) [`dcd5822`](https://github.com/thirdweb-dev/js/commit/dcd5822ee707fa52f1c3e02c75992485f83922f0) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Allow signature minting for LoyaltyCard contracts by passing the contractType

- [#5673](https://github.com/thirdweb-dev/js/pull/5673) [`c55f02f`](https://github.com/thirdweb-dev/js/commit/c55f02fa75a7f8959bbe69eac6cebfc7927ed865) Thanks [@ElasticBottle](https://github.com/ElasticBottle)! - always include gas price information even if it's 0 for enclave wallets

- [#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

- [#5668](https://github.com/thirdweb-dev/js/pull/5668) [`485dcc6`](https://github.com/thirdweb-dev/js/commit/485dcc6020089a80d994c24882f389c24a0af039) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Fix add chain not triggering for certain wallets

## 5.75.0

### Minor 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.75.0",
"version": "5.76.0",
"repository": {
"type": "git",
"url": "git+https://github.com/thirdweb-dev/js.git#main"
Expand Down

0 comments on commit 5158def

Please sign in to comment.