fix(trading): hide funding tabs if market is not perp (#5181)

This commit is contained in:
m.ray 2023-11-03 12:49:31 +02:00 committed by GitHub
parent b0169a0d39
commit 8069aa5ee7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -82,6 +82,13 @@ export const TradePanels = ({ market, pinnedAsset }: TradePanelsProps) => {
'bg-vega-clight-500 dark:bg-vega-cdark-500': isActive, 'bg-vega-clight-500 dark:bg-vega-cdark-500': isActive,
} }
); );
if (
market?.tradableInstrument.instrument.product.__typename !==
'Perpetual' &&
(key === 'funding' || key === 'fundingPayments')
) {
return null;
}
return ( return (
<button <button
data-testid={key} data-testid={key}