Skip to content

thirdweb@5.45.0

Compare
Choose a tag to compare
@jnsdls jnsdls released this 09 Aug 22:04
· 2913 commits to main since this release
0fe38b9

Minor Changes

  • #3870 bbb4f1c Thanks @gregfromstl! - Adds useProfiles hook to fetch linked profiles for the current wallet.

    import { useProfiles } from "thirdweb/react";
    
    const { data: profiles } = useProfiles();
    
    console.log("Type:", profiles[0].type); // "discord"
    console.log("Email:", profiles[0].email); // "john.doe@example.com"
  • #3870 bbb4f1c Thanks @gregfromstl! - Adds SIWE authentication on in-app wallets

    import { inAppWallet } from "thirdweb/wallets";
    
    const wallet = inAppWallet();
    const account = await wallet.connect({
      client,
      walletId: "io.metamask",
      chainId: 1, // can be anything unless using smart accounts
    });

    This will give you a new in-app wallet, not the injected provider wallet.

  • #3797 f74d523 Thanks @gregfromstl! - Wallets can now add additional profiles to an account. Once added, any connected profile can be used to access the same wallet.

    const wallet = inAppWallet();
    
    await wallet.connect({ strategy: "google" });
    const profiles = await linkProfile(wallet, { strategy: "discord" });

    Both the Google and Discord accounts will now be linked to the same wallet.

    If the Discord account is already linked to this or another wallet, this will throw an error.

    You can retrieve all profiles linked to a wallet using the getProfiles method.

    import { inAppWallet, getProfiles } from "thirdweb/wallets";
    
    const wallet = inAppWallet();
    wallet.connect({ strategy: "google" });
    
    const profiles = getProfiles(wallet);

    This would return an array of profiles like this:

    [
      {
        type: "google",
        details: {
          email: "user@gmail.com",
        },
      },
      {
        type: "discord",
        details: {
          email: "user@gmail.com",
        },
      },
    ];
  • #3995 5367eed Thanks @kien-ngo! - Add thirdweb Split contract extensions

  • #3993 c31f25c Thanks @kien-ngo! - Add thirdweb Vote contract extensions

  • #3870 bbb4f1c Thanks @gregfromstl! - Adds account linking to the Connect UI

Patch Changes