Skip to content

Commit

Permalink
feat: add Rabby Wallet + remove terms of service link
Browse files Browse the repository at this point in the history
  • Loading branch information
therealemjy committed Aug 9, 2023
1 parent cd92d4f commit aef722d
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 32 deletions.
24 changes: 24 additions & 0 deletions src/assets/img/wallets/rabbyWallet.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/clients/web3/connectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export const connectorIdByName = {
[Connector.BitKeep]: 'injected',
[Connector.InfinityWallet]: 'injected',
[Connector.SafePal]: 'injected',
[Connector.RabbyWallet]: 'injected',
[Connector.CoinbaseWallet]: 'coinbaseWallet',
[Connector.BinanceChainWallet]: 'bsc',
[Connector.WalletConnect]: 'walletConnect',
Expand Down
1 change: 1 addition & 0 deletions src/clients/web3/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ export enum Connector {
OkxWallet = 'OkxWallet',
OperaWallet = 'OperaWallet',
BitKeep = 'BitKeep',
RabbyWallet = 'RabbyWallet',
}
26 changes: 2 additions & 24 deletions src/components/AuthModal/WalletList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,7 @@ import { useTranslation } from 'translation';
import { Connector } from 'clients/web3/types';

import { toast } from '../../Toast';
import {
INTEGRATED_WALLETS,
UPCOMING_WALLETS,
VENUS_TERMS_OF_SERVICE_URL,
WALLETS,
} from '../constants';
import { INTEGRATED_WALLETS, UPCOMING_WALLETS, WALLETS } from '../constants';
import { useStyles } from './styles';

export interface WalletListProps {
Expand All @@ -22,7 +17,7 @@ export interface WalletListProps {

export const WalletList: React.FC<WalletListProps> = ({ onLogin }) => {
const styles = useStyles();
const { t, Trans } = useTranslation();
const { t } = useTranslation();

const handleLogin = async (connector: Connector) => {
try {
Expand Down Expand Up @@ -86,23 +81,6 @@ export const WalletList: React.FC<WalletListProps> = ({ onLogin }) => {
</div>
))}
</div>

<div css={styles.footer}>
<Typography variant="small2">
<Trans
i18nKey="authModal.walletList.termsOfServiceLink"
components={{
Anchor: (
<a // eslint-disable-line jsx-a11y/anchor-has-content
href={VENUS_TERMS_OF_SERVICE_URL}
target="_blank"
rel="noreferrer"
/>
),
}}
/>
</Typography>
</div>
</div>
);
};
5 changes: 0 additions & 5 deletions src/components/AuthModal/WalletList/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ export const useStyles = () => {
}
`,
walletList: css`
margin-bottom: ${theme.spacing(8)};
display: grid;
grid-template-columns: 1fr 1fr 1fr 1fr;
grid-gap: ${theme.spacing(4)};
Expand Down Expand Up @@ -58,9 +57,5 @@ export const useStyles = () => {
comingSoonText: css`
color: ${theme.palette.text.secondary};
`,
footer: css`
text-align: center;
padding: ${theme.spacing(0, 4)};
`,
};
};
9 changes: 7 additions & 2 deletions src/components/AuthModal/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { ReactComponent as LedgerLogo } from 'assets/img/wallets/ledgerLogo.svg'
import { ReactComponent as MetaMaskLogo } from 'assets/img/wallets/metaMaskLogo.svg';
import { ReactComponent as OkxWalletLogo } from 'assets/img/wallets/okxLogo.svg';
import { ReactComponent as OperaWalletLogo } from 'assets/img/wallets/operaWalletLogo.svg';
import { ReactComponent as RabbyWalletLogo } from 'assets/img/wallets/rabbyWallet.svg';
import { ReactComponent as SafePalLogo } from 'assets/img/wallets/safePalWalletLogo.svg';
import { ReactComponent as TrustWalletLogo } from 'assets/img/wallets/trustWalletLogo.svg';
import { ReactComponent as WalletConnectLogo } from 'assets/img/wallets/walletConnectLogo.svg';
Expand All @@ -17,8 +18,6 @@ import { isRunningInOperaBrowser } from 'utilities/walletDetection';

import { BaseWallet, IntegratedWallet, Wallet } from './types';

export const VENUS_TERMS_OF_SERVICE_URL = 'https://www.swipe.io/terms';

export const WALLETS: Wallet[] = [
{
name: t('wallets.metamask'),
Expand Down Expand Up @@ -73,6 +72,12 @@ export const WALLETS: Wallet[] = [
connector: Connector.BitKeep,
mainnetOnly: true,
},
{
name: t('wallets.rabbyWallet'),
Logo: RabbyWalletLogo,
connector: Connector.RabbyWallet,
mainnetOnly: true,
},
];

// Add Opera Wallet to the top of the list if dApp is running in Opera
Expand Down
2 changes: 1 addition & 1 deletion src/translation/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,6 @@
"borrowInfo": {
"stats": {
"apy": "APY",
"distributionApy": "Distribution APY",
"totalBorrow": "Total borrow"
},
"title": "Borrow info"
Expand Down Expand Up @@ -1024,6 +1023,7 @@
"metamask": "MetaMask",
"okxWallet": "OKX Wallet",
"opera": "Opera Wallet",
"rabbyWallet": "Rabby Wallet",
"safePal": "SafePal",
"trustWallet": "Trust Wallet",
"walletConnect": "WalletConnect"
Expand Down

0 comments on commit aef722d

Please sign in to comment.