Ignore swap info coins

This commit is contained in:
Armani Ferrante 2021-09-15 13:21:12 -05:00
parent 3266b339c4
commit 926af80518
No known key found for this signature in database
GPG Key ID: D597A80BCF8E12B7
2 changed files with 12 additions and 2 deletions

View File

@ -45,6 +45,11 @@ export default function DepositDialog({
const { mint, tokenName, tokenSymbol, owner } = balanceInfo;
const [tab, setTab] = useState(0);
// SwapInfos to ignore.
if (swapInfo && swapInfo.coin && swapInfo.coin.erc20Contract === '0x2b2e04bf86978b45bb2edf54aca876973bdd43c0') {
swapInfo = null;
}
let tabs = null;
if (swapInfo) {
let firstTab = `SPL ${tokenSymbol ?? swapInfo.coin.ticker}`;

View File

@ -58,13 +58,18 @@ export default function SendDialog({ open, onClose, publicKey, balanceInfo }) {
const [tab, setTab] = useState('spl');
const onSubmitRef = useRef();
const [swapCoinInfo] = useSwapApiGet(
let [swapCoinInfo] = useSwapApiGet(
showSwapAddress && balanceInfo.mint && isProdNetwork
? `coins/sol/${balanceInfo.mint.toBase58()}`
: null,
);
const ethAccount = useEthAccount();
// SwapInfos to ignore.
if (swapCoinInfo && swapCoinInfo.erc20Contract === '0x2b2e04bf86978b45bb2edf54aca876973bdd43c0') {
swapCoinInfo = null;
}
const ethAccount = useEthAccount();
const { mint, tokenName, tokenSymbol } = balanceInfo;
const getTabs = (mint) => {