Skip to content

Commit

Permalink
handle bank name mismatch
Browse files Browse the repository at this point in the history
  • Loading branch information
saml33 committed Oct 20, 2024
1 parent f9cf86b commit 6102c14
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion components/trade/AdvancedTradeForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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])

Expand Down

0 comments on commit 6102c14

Please sign in to comment.