Disable kin erc20 withdrawals

This commit is contained in:
Nathaniel Parke 2021-05-19 11:18:30 +08:00
parent 28207bffbb
commit 4dcbdb23b8
1 changed files with 12 additions and 3 deletions

View File

@ -47,6 +47,9 @@ const WUSDT_MINT = new PublicKey(
); );
const USDT_MINT = new PublicKey('Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB'); const USDT_MINT = new PublicKey('Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB');
const DISABLED_ERC20_MINTS = new Set([
'kinXdEcpDQeHPEuQnqmUgtYykqKGVFq6CeVX5iAHJq6'
])
export default function SendDialog({ open, onClose, publicKey, balanceInfo }) { export default function SendDialog({ open, onClose, publicKey, balanceInfo }) {
const isProdNetwork = useIsProdNetwork(); const isProdNetwork = useIsProdNetwork();
@ -82,16 +85,22 @@ export default function SendDialog({ open, onClose, publicKey, balanceInfo }) {
<Tab label="ERC20 USDC" key="swap" value="swap" />, <Tab label="ERC20 USDC" key="swap" value="swap" />,
]; ];
} else { } else {
return [ const erc20Tab = (
<Tab label={`SPL ${swapCoinInfo.ticker}`} key="spl" value="spl" />,
<Tab <Tab
label={`${swapCoinInfo.erc20Contract ? 'ERC20' : 'Native'} ${ label={`${swapCoinInfo.erc20Contract ? 'ERC20' : 'Native'} ${
swapCoinInfo.ticker swapCoinInfo.ticker
}`} }`}
key="swap" key="swap"
value="swap" value="swap"
/>, />
);
const tabs = [
<Tab label={`SPL ${swapCoinInfo.ticker}`} key="spl" value="spl" />,
]; ];
if (!DISABLED_ERC20_MINTS.has(mint.toString())) {
tabs.push(erc20Tab);
}
return tabs;
} }
}; };