Commit dc368ed7 authored by DhruvJain1122's avatar DhruvJain1122 Committed by GitHub

feat: Adding Tally Ho wallet with name & logo for Tally Ho Users (#3820)

* changes

* add tally
parent b109248b
......@@ -11,6 +11,7 @@ import { UnsupportedChainIdError, useWeb3React } from 'web3-react-core'
import { WalletConnectConnector } from 'web3-react-walletconnect-connector'
import MetamaskIcon from '../../assets/images/metamask.png'
import TallyIcon from '../../assets/images/tally.png'
import { ReactComponent as Close } from '../../assets/images/x.svg'
import { fortmatic, injected } from '../../connectors'
import { OVERLAY_READY } from '../../connectors/Fortmatic'
......@@ -220,6 +221,7 @@ export default function WalletModal({
// get wallets user can switch too, depending on device/browser
function getOptions() {
const isMetamask = !!window.ethereum?.isMetaMask
const isTally = !!window.ethereum?.isTally
return Object.keys(SUPPORTED_WALLETS).map((key) => {
const option = SUPPORTED_WALLETS[key]
// check for mobile options
......@@ -271,6 +273,24 @@ export default function WalletModal({
// likewise for generic
else if (option.name === 'Injected' && isMetamask) {
return null
} else if (option.name === 'Injected' && isTally) {
return (
<Option
id={`connect-${key}`}
key={key}
onClick={() => {
option.connector === connector
? setWalletView(WALLET_VIEWS.ACCOUNT)
: !option.href && tryActivation(option.connector)
}}
color={'#E8831D'}
header={<Trans>Tally</Trans>}
active={option.connector === connector}
subheader={null}
link={null}
icon={TallyIcon}
/>
)
}
}
......
......@@ -13,6 +13,7 @@ interface Window {
// value that is populated and returns true by the Coinbase Wallet mobile dapp browser
isCoinbaseWallet?: true
isMetaMask?: true
isTally?: false
autoRefreshOnNetworkChange?: boolean
}
web3?: Record<string, unknown>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment