From 65b8ebf9d2f848f205dc0251068875738bd4b208 Mon Sep 17 00:00:00 2001 From: DhruvJain1122 Date: Fri, 1 Apr 2022 13:53:18 +0530 Subject: [PATCH] feat: tally integration --- src/components/ConnectWalletModal/index.tsx | 2 +- src/components/TxConfirmationView/NetworkMismatch/index.tsx | 3 ++- src/components/TxConfirmationView/index.tsx | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/ConnectWalletModal/index.tsx b/src/components/ConnectWalletModal/index.tsx index 778c55e6c..0f9501b24 100644 --- a/src/components/ConnectWalletModal/index.tsx +++ b/src/components/ConnectWalletModal/index.tsx @@ -67,7 +67,7 @@ export default function ConnectWalletModal({ title: intl.formatMessage(messages.titleBrowserWallet, { walletName: isImToken ? 'imToken' : 'Browser', }), - description: '(MetaMask, Trustwallet, Enjin)', + description: '(MetaMask, Trustwallet, Enjin, Tally)', providerName: 'browser', icon: isImToken ? icons.imToken : icons.browserWallets, disabled: !browserWalletProvider, diff --git a/src/components/TxConfirmationView/NetworkMismatch/index.tsx b/src/components/TxConfirmationView/NetworkMismatch/index.tsx index d7fae2956..e282601a9 100644 --- a/src/components/TxConfirmationView/NetworkMismatch/index.tsx +++ b/src/components/TxConfirmationView/NetworkMismatch/index.tsx @@ -80,10 +80,11 @@ export default function NetworkMismatch({ const config = ADD_CONFIG[neededChainId]; const isMetaMask = (global.window as any)?.ethereum?.isMetaMask; + const isTally = (global.window as any)?.ethereum?.isTally; // @ts-ignore const isCoinbaseWallet = library?.provider?.isCoinbaseWallet === true; const isAddable = - (isMetaMask || isCoinbaseWallet) && + (isMetaMask || isTally || isCoinbaseWallet) && ['browser', 'wallet-link'].includes(currentProviderName) && config; const { publicJsonRPCWSUrl, publicJsonRPCUrl } = getNetworkConfig(neededChainId); diff --git a/src/components/TxConfirmationView/index.tsx b/src/components/TxConfirmationView/index.tsx index 5c1df9a75..bcc5e0c8e 100644 --- a/src/components/TxConfirmationView/index.tsx +++ b/src/components/TxConfirmationView/index.tsx @@ -374,7 +374,8 @@ export default function TxConfirmationView({ {!!dangerousMessage && !mainTxConfirmed && {dangerousMessage}} - {(global.window as any)?.ethereum?.isMetaMask && + {((global.window as any)?.ethereum?.isMetaMask || + (global.window as any)?.ethereum?.isTally) && mainTxConfirmed && currentProviderName === 'browser' && aTokenData?.address && }