Releases: thirdweb-dev/js
[email protected]
@thirdweb-dev/[email protected]
@thirdweb-dev/[email protected]
@thirdweb-dev/[email protected]
Patch Changes
- #5746
e42ffc6
Thanks @joaquim-verges! - Downgrade aws libraries
@thirdweb-dev/[email protected]
@thirdweb-dev/[email protected]
[email protected]
Minor Changes
-
#5709
cd55ada
Thanks @gregfromstl! - Adds a defaultSmsCountryCode configuration option to In-App and Ecosystem WalletscreateWallet("inApp", { auth: { options: [ "email", "phone", ], mode: "redirect", defaultSmsCountryCode: "IN", // Default country code for SMS }, }),
-
#5604
03b6d0d
Thanks @ElasticBottle! - Support the ability to unlink accounts for in app wallet with more than 1 linked account.It's supported out of the box in the connect UI.
For typescript users, the following code snippet is a simple example of how it'd work.
import { inAppWallet } from "thirdweb/wallets"; const wallet = inAppWallet(); wallet.connect({ strategy: "google" }); const profiles = await getProfiles({ client, }); const updatedProfiles = await unlinkProfile({ client, profileToUnlink: profiles[1], // assuming there is more than 1 profile linked to the user. });
[email protected]
@thirdweb-dev/[email protected]
Minor Changes
- #5708
3ec808d
Thanks @joaquim-verges! - Update /use endpoint and types to v2
[email protected]
Patch Changes
-
#5688
da5d8ec
Thanks @joaquim-verges! - Autoconnect previously linked wallets -
#5682
5b24faf
Thanks @gregfromstl! - Fix ecosystem wallet AA detection in Pay modal -
#5674
8020bdb
Thanks @devfelipenunes! - This pull request adds the complete Portuguese (Brazil) translation for the wallet connection module. It includes translations for connecting a wallet, sending/receiving funds, network management, and other wallet-related actions. This improves the user experience for Portuguese-speaking users.
[email protected]
Minor Changes
-
#5533
43fbcac
Thanks @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 oldformatFn
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.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)
<AccountBalance showBalanceInFiat="USD" />
The
formatFn
prop now takes in an object of typeAccountBalanceInfo
and outputs a stringimport { 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
<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
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
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
f69d1aa
Thanks @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
d5a68c8
Thanks @gregfromstl! - Fix: Correctly cleans the "Custom Auth" profile type label -
#5672
3b53732
Thanks @gregfromstl! - Fix ox hardset version -
#5653
df734ba
Thanks @joaquim-verges! - More helpful error messages for enclave and userop errors -
#5656
f680496
Thanks @joaquim-verges! - Fix connecting to cb wallet browser extension when already on the same chain -
#5671
dcd5822
Thanks @joaquim-verges! - Allow signature minting for LoyaltyCard contracts by passing the contractType -
#5673
c55f02f
Thanks @ElasticBottle! - always include gas price information even if it's 0 for enclave wallets -
#5617
c48e0c9
Thanks @gregfromstl! - Fix: Disconnect smart account when account signer is disconnected -
#5668
485dcc6
Thanks @joaquim-verges! - Fix add chain not triggering for certain wallets