From 6102c1482c0ae795b042ce15031cd18e75ec4469 Mon Sep 17 00:00:00 2001 From: saml33 Date: Sun, 20 Oct 2024 20:58:57 +1100 Subject: [PATCH] handle bank name mismatch --- components/trade/AdvancedTradeForm.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/components/trade/AdvancedTradeForm.tsx b/components/trade/AdvancedTradeForm.tsx index c8634a92..00a2a460 100644 --- a/components/trade/AdvancedTradeForm.tsx +++ b/components/trade/AdvancedTradeForm.tsx @@ -191,7 +191,14 @@ const AdvancedTradeForm = () => { const perpBaseBankMint = useMemo(() => { const group = mangoStore.getState().group if (!group || !baseSymbol || selectedMarket instanceof Serum3Market) return - const bank = group.getFirstBankByName(baseSymbol) + let bankName = baseSymbol + if (baseSymbol === 'BTC') { + bankName = 'wBTC (Portal)' + } + if (baseSymbol === 'ETH') { + bankName = 'ETH (Portal)' + } + const bank = group.getFirstBankByName(bankName) return bank?.mint }, [baseSymbol, selectedMarket])