From e7ec622672ee254df525957728a49d411b73cf44 Mon Sep 17 00:00:00 2001 From: Thomas Eizinger Date: Fri, 26 Nov 2021 10:13:58 +1100 Subject: [PATCH] Margin is not actually optional The type definition was wrong. Margin is actually always set. --- taker-frontend/src/components/Trade.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/taker-frontend/src/components/Trade.tsx b/taker-frontend/src/components/Trade.tsx index 1ce5f32..0bcae3c 100644 --- a/taker-frontend/src/components/Trade.tsx +++ b/taker-frontend/src/components/Trade.tsx @@ -56,7 +56,7 @@ interface TradeProps { maxQuantity: number; referencePrice?: number; askPrice?: number; - margin?: string; + margin: string; leverage?: number; quantity: string; liquidationPrice?: number; @@ -101,7 +101,7 @@ export default function Trade({ const referencePrice = `$${referencePriceAsNumber?.toLocaleString() || "0.0"}`; const askPrice = `$${askPriceAsNumber?.toLocaleString() || "0.0"}`; const liquidationPrice = `$${liquidationPriceAsNumber?.toLocaleString() || "0.0"}`; - const margin = `₿${marginAsNumber?.toLocaleString() || "0.0"}`; + const margin = `₿${marginAsNumber.toLocaleString()}`; const { isOpen, onOpen, onClose } = useDisclosure();