Skip to content

Commit

Permalink
disable eth
Browse files Browse the repository at this point in the history
  • Loading branch information
armaniferrante committed Feb 14, 2022
1 parent 617db9c commit 77b65d4
Showing 1 changed file with 23 additions and 10 deletions.
33 changes: 23 additions & 10 deletions src/components/DepositDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ import Tab from '@material-ui/core/Tab';
import { DialogContentText, Tooltip } from '@material-ui/core';
import { EthFeeEstimate } from './EthFeeEstimate';

const DISABLED_MINTS = new Set(['ABE7D8RU1eHfCJWzHYZZeymeE8k9nPPXfqge2NQYyKoL']);
const DISABLED_MINTS = new Set([
'ABE7D8RU1eHfCJWzHYZZeymeE8k9nPPXfqge2NQYyKoL',
]);

export default function DepositDialog({
open,
Expand All @@ -46,7 +48,11 @@ export default function DepositDialog({
const [tab, setTab] = useState(0);

// SwapInfos to ignore.
if (swapInfo && swapInfo.coin && swapInfo.coin.erc20Contract === '0x2b2e04bf86978b45bb2edf54aca876973bdd43c0') {
if (
swapInfo &&
swapInfo.coin &&
swapInfo.coin.erc20Contract === '0x2b2e04bf86978b45bb2edf54aca876973bdd43c0'
) {
swapInfo = null;
}

Expand All @@ -57,9 +63,13 @@ export default function DepositDialog({
if (!mint) {
firstTab = 'SOL';
} else {
secondTab = `${
swapInfo.coin.erc20Contract ? 'ERC20' : 'Native'
} ${secondTab}`;
if (swapInfo.blockchain !== 'eth') {
secondTab = `${
swapInfo.coin.erc20Contract ? 'ERC20' : 'Native'
} ${secondTab}`;
} else {
secondTab = null;
}
}
tabs = (
<Tabs
Expand All @@ -71,7 +81,8 @@ export default function DepositDialog({
>
<Tab label={firstTab} />
{(!DISABLED_MINTS.has(mint && mint.toString()) ||
localStorage.getItem('sollet-private')) && <Tab label={secondTab} />}
localStorage.getItem('sollet-private')) &&
secondTab && <Tab label={secondTab} />}
</Tabs>
);
}
Expand Down Expand Up @@ -102,7 +113,10 @@ export default function DepositDialog({
{tokenSymbol ?? abbreviateAddress(mint)}. Do not send SOL to
this address.
<br />
<b style={{ color: 'red' }}>WARNING</b>: You are using a deprecated account type. Please migrate your tokens. Ideally, create a new wallet. If you send to this address from a poorly implemented wallet, you may burn tokens.
<b style={{ color: 'red' }}>WARNING</b>: You are using a
deprecated account type. Please migrate your tokens. Ideally,
create a new wallet. If you send to this address from a poorly
implemented wallet, you may burn tokens.
</DialogContentText>
) : (
<DialogContentText>
Expand All @@ -119,8 +133,7 @@ export default function DepositDialog({
<DialogContentText variant="body2">
<Link
href={
`https://solscan.io/account/${depositAddressStr}` +
urlSuffix
`https://solscan.io/account/${depositAddressStr}` + urlSuffix
}
target="_blank"
rel="noopener"
Expand Down Expand Up @@ -199,7 +212,7 @@ function SolletSwapDepositAddress({ balanceInfo, swapInfo, ethAccount }) {
);
}

if (blockchain === 'eth') {
if (false && blockchain === 'eth') {
return (
<>
<DialogContentText>
Expand Down

0 comments on commit 77b65d4

Please sign in to comment.