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

adding the binance wallet #3505

Merged
merged 3 commits into from
Feb 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/synapse-interface/components/Wallet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { useTranslations } from 'next-intl'
import { MetamaskIcon } from '@icons/WalletIcons/Metamask'
import { CoinbaseWalletIcon } from '@icons/WalletIcons/CoinbaseWalletIcon'
import { WalletConnectIcon } from '@icons/WalletIcons/WalletConnectIcon'
import { BinanceWalletIcon } from '@icons/WalletIcons/BinanceWalletIcon'
import { IconProps, WalletId } from '@utils/types'
import Spinner from './icons/Spinner'

Expand All @@ -22,6 +23,10 @@ const WALLETS = [
id: WalletId.CoinbaseWallet,
icon: CoinbaseWalletIcon,
},
{
id: WalletId.BinanceWallet,
icon: BinanceWalletIcon,
},
]

export const WalletIcon = ({
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { IconProps } from '@utils/types'

export const BinanceWalletIcon = ({ className = '', ...props }: IconProps) => {
return (
<svg
width="32"
height="32"
viewBox="0 0 32 32"
fill="none"
xmlns="http://www.w3.org/2000/svg"
className={className}
{...props}
>
<rect width="32" height="32" rx="8" fill="#F3BA2F"/>
<path
d="M11.0987 14.0987L16 9.19733L20.904 14.1013L23.4627 11.5427L16 4.08L8.54 11.54L11.0987 14.0987ZM4.08 16L6.63867 13.4413L9.19733 16L6.63867 18.5587L4.08 16ZM11.0987 17.9013L16 22.8027L20.904 17.8987L23.4653 20.456L16 27.92L8.54 20.46L8.53733 20.4573L11.0987 17.9013ZM22.8027 16L25.3613 13.4413L27.92 16L25.3613 18.5587L22.8027 16ZM18.8307 15.9973H18.832L16 13.1653L13.912 15.2533L13.7013 15.464L13.168 15.9973L13.1653 16L13.168 16.0027L16 18.8347L18.832 16.0027L18.8347 16L18.8307 15.9973Z"
fill="white"
/>
</svg>
)
}
1 change: 1 addition & 0 deletions packages/synapse-interface/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"test": "echo 'No jest tests defined.'"
},
"dependencies": {
"@binance/w3w-rainbow-connector-v2": "^1.0.2",
"@cloudflare/next-on-pages": "^1.11.0",
"@codecov/webpack-plugin": "^0.0.1-beta.10",
"@ethersproject/bignumber": "5.7.0",
Expand Down
1 change: 1 addition & 0 deletions packages/synapse-interface/utils/types/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ export enum WalletId {
MetaMask = 'metaMask',
WalletConnect = 'walletConnect',
CoinbaseWallet = 'coinbaseWallet',
BinanceWallet = 'binanceWallet',
}
export interface IconProps {
walletId?: string
Expand Down
2 changes: 2 additions & 0 deletions packages/synapse-interface/wagmiConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
safeWallet,
} from '@rainbow-me/rainbowkit/wallets'
import { connectorsForWallets } from '@rainbow-me/rainbowkit'
import binanceWallet from '@binance/w3w-rainbow-connector-v2'

import { createTransports } from '@/utils/createTransports'
import { supportedChains } from '@/constants/chains/supportedChains'
Expand All @@ -34,6 +35,7 @@ const connectors = connectorsForWallets(
ledgerWallet,
frameWallet,
safeWallet,
binanceWallet,
],
},
],
Expand Down
Loading
Loading