Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): update dependency @rainbow-me/rainbowkit to v2.2.2 #33

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented May 13, 2024

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@rainbow-me/rainbowkit (source) 2.0.2 -> 2.2.2 age adoption passing confidence

Release Notes

rainbow-me/rainbowkit (@​rainbow-me/rainbowkit)

v2.2.2

Compare Source

Patch Changes

v2.2.1

Compare Source

Patch Changes
  • 3469982: Added Wigwam support with wigwamWallet wallet connector
  • 0c6af55: Added icon for Flow chain
  • 5b8e146: Added de-DE and de locale support for the German language.
  • 9dd23d9: Added BeraSig support with berasigWallet wallet connector
  • 7fceab8: Added ms-MY and ms locale support for the Malay language.

v2.2.0

Compare Source

Minor Changes
  • f02bced: The Authentication API now supports ERC-1271 and ERC-6492 for smart contract signature verification to enable Sign-in with Ethereum for Smart Contract Wallets, including Coinbase Smart Wallet and Argent.

    We have also deprecated the siwe and ethers peer dependencies in favor of viem/siwe to make RainbowKit even more seamless.

    No changes are necessary for dApps that don't rely on the Authentication API.

    Follow the appropriate steps below to migrate.

    NextAuth Authentication

    1. Remove siwe and ethers
    npm uninstall siwe ethers
    1. Upgrade RainbowKit, rainbowkit-siwe-next-auth, and viem
    npm i @​rainbow-me/rainbowkit@^2.2.0 rainbow-me/rainbowkit-siwe-next-auth@^0.5.0 viem@^2.12.0
    1. Create a Public Client

    This allows viem to verify smart contract signatures.

    const config = getDefaultConfig({
      /* your config */
    });
    + const publicClient = config.getClient().extend(publicActions);
    1. Adjust your authorize implementation in /api/auth/[...nextauth].ts
    - import { SiweMessage } from 'siwe';
    + import {
    +   type SiweMessage,
    +   parseSiweMessage,
    +   validateSiweMessage,
    + } from 'viem/siwe';
    
    export function getAuthOptions(req: IncomingMessage): NextAuthOptions {
      const providers = [
        CredentialsProvider({
          async authorize(credentials: any) {
    
    -       const siwe = new SiweMessage(
    -         JSON.parse(credentials?.message || '{}'),
    -       );
    +       const siweMessage = parseSiweMessage(
    +         credentials?.message,
    +       ) as SiweMessage;
    
    +       if (!validateSiweMessage({
    +         address: siweMessage?.address,
    +         message: siweMessage,
    +       })) {
    +         return null;
    +       }
    
            /* ... */
    
    -       await siwe.verify({ signature: credentials?.signature || '' });
    +       const valid = await publicClient.verifyMessage({
    +         address: siweMessage?.address,
    +         message: credentials?.message,
    +         signature: credentials?.signature,
    +       });
    
    +       if (!valid) {
    +         return null;
    +       }
          },
          /* ... */
        })
      ]
    }

    Reference the with-next-siwe-next-auth example for more guidance.

    Custom Authentication

    1. Remove siwe and ethers
    npm uninstall siwe ethers
    1. Upgrade RainbowKit and viem
    npm i @​rainbow-me/rainbowkit@^2.2.0 viem@^2.12.0
    1. Create a Public Client

    This allows viem to verify smart contract signatures.

    const config = getDefaultConfig({
      /* your config */
    });
    
    + const publicClient = config.getClient().extend(publicActions);
    1. Adjust your createAuthenticationAdapter implementation
    - import { SiweMessage } from 'siwe';
    + import { createSiweMessage } from 'viem/siwe';
    
    createAuthenticationAdapter({
      getNonce: async () => {
        const response = await fetch('/api/nonce');
        return await response.text();
      },
    
      createMessage: ({ nonce, address, chainId }) => {
    -   return new SiweMessage({
    +   return createSiweMessage({
          domain: window.location.host,
          address,
          statement: 'Sign in with Ethereum to the app.',
          uri: window.location.origin,
          version: '1',
          chainId,
          nonce,
        });
      },
    
    - getMessageBody: ({ message }) => {
    -   return message.prepareMessage();
    - },
    
      /* ... */
    })
    1. Adopt generateSiweNonce
    - import { generateNonce } from 'siwe';
    + import { generateSiweNonce } from 'viem/siwe';
    
    - req.session.nonce = generateNonce();
    + req.session.nonce = generateSiweNonce();
    1. Adopt parseSiweMessage and verifyMessage if your Verify handler
    - import { SiweMessage } from 'siwe';
    + import { parseSiweMessage, type SiweMessage } from 'viem/siwe';
    
    const { message, signature } = req.body;
    - const siweMessage = new SiweMessage(message);
    - const { success, error, data } = await siweMessage.verify({
    -  signature,
    - });
    + const siweMessage = parseSiweMessage(message) as SiweMessage;
    + const success = await publicClient.verifyMessage({
    +   address: siweMessage.address,
    +   message,
    +   signature,
    + });
    
    - if (!success) throw error;
    + if (!success) throw new Error('Invalid signature.');
    
    - if (data.nonce !== req.session.nonce)
    + if (siweMessage.nonce !== req.session.nonce)
    +   return res.status(422).json({ message: 'Invalid nonce.' });

    Reference the with-next-siwe-iron-session example for more guidance.

v2.1.7

Compare Source

Patch Changes
  • 4014d80: Added vi-VN and vi locale support for the Vietnamese language.
  • f93cd0e: Added ParaSwap Wallet support with paraSwapWallet wallet connector
  • 6393498: Added Best Wallet support with bestWallet wallet connector

v2.1.6

Compare Source

Patch Changes
  • 63d8386: Added Valora support with valoraWallet wallet connector
  • 8d9a4e6: Fixed an issue where some options in the "Get Wallet" flow would appear as a blank page, or lack a back button to return to the Connect flow.
  • d46637a: Added safeWallet wallet connector to getDefaultConfig by default to improve the Safe Wallet app browser connection flow with a Safe button included by default in the wallet list

v2.1.5

Compare Source

Patch Changes
  • c08f620: Added zh-HK and zh-TW locales for Traditional Chinese language support. You can also specify zh-Hans and zh-Hant locales to refer to the writing systems directly.

    Reference our guide to learn more about Localization.

  • 675f9dd: Add icon for Gnosis Chain

  • f65b5c4: Add icon for Celo chain

  • 9c36bfd: Added Kaia Wallet support with kaiaWallet wallet connector

v2.1.4

Compare Source

Patch Changes
  • b530c80: Added mobile support for zealWallet wallet connector
  • 7f6e36e: Added missing rdns property to some wallets. This helps them work with EIP-6963 connectors.
  • 2eeb7b9: Improved the Safe Wallet app browser connection flow with a Safe button included by default in the wallet list
  • 72fe07d: Added Binance Web3 Wallet support with binanceWallet wallet connector
  • d02d73f: Resolved an issue where the Phantom wallet did not appear as an EIP-6963 connector.

v2.1.3

Compare Source

Patch Changes
  • 23e33b9: Added mantle and mantleTestnet network support
  • 7b00be5: Added Seif Wallet support with seifWallet wallet connector
  • 001a0a9: Resolved an issue in development where browser detection would throw an error if navigator.userAgent was unavailable in the browser.

v2.1.2

Compare Source

Patch Changes
  • 2180ddd: Added Nest Wallet support with nestWallet wallet connector

  • fea278a: The coinbaseWallet wallet connector now has a preference argument to control whether Smart Wallet is enabled and available for users. Preference based behavior is documented here.

    Smart Wallet will be enabled by default with all in early June, without a further upgrade.

    Developers can test Smart Wallet with sepolia and baseSepolia chains today by setting smartWalletOnly like so:

    import { coinbaseWallet } from "@​rainbow-me/rainbowkit/wallets";
    
    // Enable Coinbase Smart Wallet for testing
    coinbaseWallet.preference = "smartWalletOnly";
    
    // You must manually specify your wallet list with `wallets` in
    // `getDefaultConfig` or `connectorsForWallets` to assign the preference
    const config = getDefaultConfig({
      /* ... */
      wallets: [
        {
          groupName: "Popular",
          wallets: [coinbaseWallet],
        },
      ],
      /* ... */
    });

v2.1.1

Compare Source

Patch Changes
  • 725a376: Added Magic Eden Wallet support with magicEdenWallet wallet connector
  • 9be5452: Resolved an issue with the Enhanced Provider when using RainbowKit in Vite without a process.env polyfill

v2.1.0

Compare Source

Minor Changes
  • 82153ed: Upgraded compatible wagmi and @coinbase/wallet-sdk versions to support Coinbase Smart Wallet.

    Smart Wallet enables users to create a new wallet in seconds with Passkeys, without installing an app or extension. Smart Wallet users can use the same account and address across all onchain apps with RainbowKit.

    Smart Wallet and the underlying smart contract is fully compatible with Wagmi, but dApps need to ensure that their offchain signature validation is ERC-6492 compliant to support smart contract wallets. Follow this guide for more information.

    Coinbase Wallet users on desktop and mobile will now interact with a new connection flow in RainbowKit alongside Smart Wallet.

  • 90d6931: Introduced the Enhanced Provider to handle fallback resolutions when a Mainnet provider transport is unavailable.

    ENS names for dApps without a Mainnet provider will now properly resolve. Additional conveniences will be soon be rolling out in RainbowKit.

v2.0.8

Compare Source

Patch Changes
  • 8841891: Added real-time balance fetching based on the Recent Transaction API. As a transaction is confirmed on-chain, the user's gas balance will be updated to reflect the transaction.

    import { useAddRecentTransaction } from "@​rainbow-me/rainbowkit";
    
    export default () => {
      const addRecentTransaction = useAddRecentTransaction();
    
      return (
        <button
          onClick={() => {
            addRecentTransaction({
              hash: "0x...",
              description: "...",
            });
          }}
        >
          Add recent transaction
        </button>
      );
    };

v2.0.7

Compare Source

Patch Changes
  • af4ea4e: Added Kraken Wallet support with krakenWallet wallet connector
  • f0b3b25: Mitigated behavior in Coinbase Wallet where the user would be captured in the in-app browser upon redirect.

v2.0.6

Compare Source

Patch Changes
  • 7ab6e50: Added Compass Wallet support with compassWallet wallet connector
  • 515498f: Locked the dependencies for the coinbaseWallet wallet connector to Coinbase Wallet SDK v3 to temporarily mitigate breaking changes included an upcoming version of Wagmi.

v2.0.5

Compare Source

Patch Changes
  • 4dd1e45: Fixed an issue that allowed duplicate wallets to be added to the Connect Modal when using connectorsForWallets
  • 1a0f209: Added a small check to throw an error if the wallet list is empty overall or empty within any category.
  • ec41346: Amended the getDefaultConfig return type to prevent indirect type annotation errors and better infer type for parameters from Wagmi's createConfig.
  • fc4d7e1: Resolved a bug where if multiInjectedProviderDiscovery was set to false the roninWallet would prevent showing Opening Ronin Wallet... UI in the connect modal.
  • 81ba812: Added support for zetachain and zetachainAthensTestnet testnet chain
  • b11118f: Added Kaikas Wallet support with kaikasWallet wallet connector and added klaytn chain with klaytnBaobab testnet support.

v2.0.4

Compare Source

Patch Changes
  • 77dcec3: Added Bybit Wallet support with bybitWallet wallet connector
  • 6c240ba: Added Gate Wallet support with gateWallet wallet connector
  • 34419b5: Added Bitverse Wallet support with bitverseWallet wallet connector
  • 5c60239: Added 1inch Wallet support with oneInchWallet wallet connector

v2.0.3

Compare Source

Patch Changes
  • b80e8fa: Improved the synchronous connection flow for the WalletButton and WalletButton.Custom components
  • 985b80b: Resolved an issue where ENS resolution would fail and throw an error for ENS names with disallowed characters.
  • b25db9a: Added blast and blastSepolia network support

Configuration

📅 Schedule: Branch creation - "* 0-3 * * 1" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

Copy link

socket-security bot commented May 13, 2024

New, updated, and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@rainbow-me/[email protected] 🔁 npm/@rainbow-me/[email protected] environment, network Transitive: eval, filesystem, shell, unsafe +684 279 MB danielsinclair

View full report↗︎

@renovate renovate bot force-pushed the renovate/rainbow-me-rainbowkit-2.x branch from b1fab9b to a35d401 Compare May 20, 2024 16:50
@renovate renovate bot changed the title fix(deps): update dependency @rainbow-me/rainbowkit to v2.0.7 fix(deps): update dependency @rainbow-me/rainbowkit to v2.0.8 May 20, 2024
@renovate renovate bot force-pushed the renovate/rainbow-me-rainbowkit-2.x branch from a35d401 to f8327bd Compare May 21, 2024 16:09
@renovate renovate bot changed the title fix(deps): update dependency @rainbow-me/rainbowkit to v2.0.8 fix(deps): update dependency @rainbow-me/rainbowkit to v2.1.0 May 21, 2024
@renovate renovate bot force-pushed the renovate/rainbow-me-rainbowkit-2.x branch from f8327bd to 88fa874 Compare May 26, 2024 08:07
@renovate renovate bot changed the title fix(deps): update dependency @rainbow-me/rainbowkit to v2.1.0 fix(deps): update dependency @rainbow-me/rainbowkit to v2.1.1 May 26, 2024
@renovate renovate bot force-pushed the renovate/rainbow-me-rainbowkit-2.x branch from 88fa874 to 0179ff9 Compare June 3, 2024 05:12
@renovate renovate bot changed the title fix(deps): update dependency @rainbow-me/rainbowkit to v2.1.1 fix(deps): update dependency @rainbow-me/rainbowkit to v2.1.2 Jun 3, 2024
@renovate renovate bot force-pushed the renovate/rainbow-me-rainbowkit-2.x branch from 0179ff9 to 24c31b4 Compare July 6, 2024 20:48
@renovate renovate bot changed the title fix(deps): update dependency @rainbow-me/rainbowkit to v2.1.2 fix(deps): update dependency @rainbow-me/rainbowkit to v2.1.3 Jul 6, 2024
@renovate renovate bot force-pushed the renovate/rainbow-me-rainbowkit-2.x branch from 24c31b4 to 08541ed Compare August 9, 2024 05:41
@renovate renovate bot changed the title fix(deps): update dependency @rainbow-me/rainbowkit to v2.1.3 fix(deps): update dependency @rainbow-me/rainbowkit to v2.1.4 Aug 9, 2024
@renovate renovate bot force-pushed the renovate/rainbow-me-rainbowkit-2.x branch from 08541ed to 56f11f5 Compare August 25, 2024 18:01
@renovate renovate bot changed the title fix(deps): update dependency @rainbow-me/rainbowkit to v2.1.4 fix(deps): update dependency @rainbow-me/rainbowkit to v2.1.5 Aug 25, 2024
Copy link

socket-security bot commented Aug 25, 2024

👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

View full report↗︎

@renovate renovate bot force-pushed the renovate/rainbow-me-rainbowkit-2.x branch from 56f11f5 to 665afc5 Compare September 13, 2024 02:50
@renovate renovate bot changed the title fix(deps): update dependency @rainbow-me/rainbowkit to v2.1.5 fix(deps): update dependency @rainbow-me/rainbowkit to v2.1.6 Sep 13, 2024
@renovate renovate bot force-pushed the renovate/rainbow-me-rainbowkit-2.x branch from 665afc5 to f6a3048 Compare September 30, 2024 05:47
@renovate renovate bot changed the title fix(deps): update dependency @rainbow-me/rainbowkit to v2.1.6 fix(deps): update dependency @rainbow-me/rainbowkit to v2.1.7 Sep 30, 2024
@renovate renovate bot force-pushed the renovate/rainbow-me-rainbowkit-2.x branch 2 times, most recently from 1a0e8f3 to 452d886 Compare October 7, 2024 06:56
@renovate renovate bot force-pushed the renovate/rainbow-me-rainbowkit-2.x branch from 452d886 to 899da2b Compare October 19, 2024 05:50
@renovate renovate bot changed the title fix(deps): update dependency @rainbow-me/rainbowkit to v2.1.7 fix(deps): update dependency @rainbow-me/rainbowkit to v2.2.0 Oct 19, 2024
@renovate renovate bot force-pushed the renovate/rainbow-me-rainbowkit-2.x branch from 899da2b to 093217d Compare December 6, 2024 23:44
@renovate renovate bot changed the title fix(deps): update dependency @rainbow-me/rainbowkit to v2.2.0 fix(deps): update dependency @rainbow-me/rainbowkit to v2.2.1 Dec 6, 2024
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
@renovate renovate bot force-pushed the renovate/rainbow-me-rainbowkit-2.x branch from 093217d to 4da9ab0 Compare January 17, 2025 23:01
@renovate renovate bot changed the title fix(deps): update dependency @rainbow-me/rainbowkit to v2.2.1 fix(deps): update dependency @rainbow-me/rainbowkit to v2.2.2 Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants