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

feat: integrate tally wallet #450

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion src/components/ConnectWalletModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 2 additions & 1 deletion src/components/TxConfirmationView/NetworkMismatch/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 2 additions & 1 deletion src/components/TxConfirmationView/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,8 @@ export default function TxConfirmationView({
{!!dangerousMessage && !mainTxConfirmed && <InfoPanel>{dangerousMessage}</InfoPanel>}
</InfoWrapper>

{(global.window as any)?.ethereum?.isMetaMask &&
{((global.window as any)?.ethereum?.isMetaMask ||
(global.window as any)?.ethereum?.isTally) &&
mainTxConfirmed &&
currentProviderName === 'browser' &&
aTokenData?.address && <AddATokenButton aTokenData={aTokenData} />}
Expand Down