Skip to content

Releases: thirdweb-dev/js

[email protected]

16 Dec 12:12
6994310
Compare
Choose a tag to compare

Minor Changes

  • #5691 5be197b Thanks @kien-ngo! - Add headless components for Wallets: WalletProvider, WalletIcon and WalletName

Patch Changes

@thirdweb-dev/[email protected]

16 Dec 12:12
6994310
Compare
Choose a tag to compare

@thirdweb-dev/[email protected]

16 Dec 12:12
6994310
Compare
Choose a tag to compare

Patch Changes

@thirdweb-dev/[email protected]

13 Dec 05:15
aa72ba2
Compare
Choose a tag to compare

Patch Changes

@thirdweb-dev/[email protected]

13 Dec 06:46
29d32b8
Compare
Choose a tag to compare

Patch Changes

[email protected]

12 Dec 22:44
203da76
Compare
Choose a tag to compare

Minor Changes

  • #5709 cd55ada Thanks @gregfromstl! - Adds a defaultSmsCountryCode configuration option to In-App and Ecosystem Wallets

    createWallet("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]

12 Dec 00:48
1787539
Compare
Choose a tag to compare

Minor Changes

Patch Changes

@thirdweb-dev/[email protected]

12 Dec 22:44
203da76
Compare
Choose a tag to compare

Minor Changes

[email protected]

11 Dec 07:56
46b2071
Compare
Choose a tag to compare

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]

10 Dec 02:40
5158def
Compare
Choose a tag to compare

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

    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 type AccountBalanceInfo and outputs a string

    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

    <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