From b02ad4c9381fef1e6f2d45d7cdf1882a39fff7a3 Mon Sep 17 00:00:00 2001 From: Siddesh Date: Thu, 21 Nov 2024 15:19:29 +0530 Subject: [PATCH] feat: add bnb chain in mail app --- .../email-app/src/components/connected-wallet-info.tsx | 5 ++++- examples/email-app/src/components/new-email.tsx | 9 ++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/examples/email-app/src/components/connected-wallet-info.tsx b/examples/email-app/src/components/connected-wallet-info.tsx index 8d4ed316..e22cefaa 100644 --- a/examples/email-app/src/components/connected-wallet-info.tsx +++ b/examples/email-app/src/components/connected-wallet-info.tsx @@ -1,4 +1,4 @@ -import { TokenETH, TokenPUSH, TokenSOL } from '@web3icons/react'; +import { TokenBNB, TokenETH, TokenPUSH, TokenSOL } from '@web3icons/react'; import { usePrivy } from '@privy-io/react-auth'; import { trimAddress } from '@/lib/utils'; import { useAppContext } from '@/context/app-context'; @@ -15,6 +15,7 @@ const ConnectedWalletInfo = () => { } setSelectedEmail(null); }; + return (
{(pushAccount || authenticated) && ( @@ -28,6 +29,8 @@ const ConnectedWalletInfo = () => { ) : user?.wallet?.chainType === 'solana' ? ( + ) : user?.wallet?.chainId === 'eip155:56' ? ( + ) : ( )} diff --git a/examples/email-app/src/components/new-email.tsx b/examples/email-app/src/components/new-email.tsx index 7f6befca..e90886bf 100644 --- a/examples/email-app/src/components/new-email.tsx +++ b/examples/email-app/src/components/new-email.tsx @@ -19,7 +19,7 @@ import { import { useAppContext } from '@/context/app-context'; import { usePrivy, useSolanaWallets } from '@privy-io/react-auth'; import { useSignMessage } from 'wagmi'; -import { TokenETH, TokenPUSH, TokenSOL } from '@web3icons/react'; +import { TokenBNB, TokenETH, TokenPUSH, TokenSOL } from '@web3icons/react'; import { hexToBytes } from 'viem'; import { IEmail } from '@/types'; import { X } from 'lucide-react'; @@ -164,6 +164,8 @@ ${email.body ? 'eip155:1' : recipient.chain === 'sol' ? 'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp' + : recipient.chain === 'bnb' + ? 'eip155:56' : 'push:devnet' }:${recipient.address}` ); @@ -252,6 +254,8 @@ ${email.body ) : recipient.chain === 'sol' ? ( + ) : recipient.chain === 'bnb' ? ( + ) : ( )} @@ -289,6 +293,9 @@ ${email.body + + +