Browse Source

Margin is not actually optional

The type definition was wrong. Margin is actually always set.
debug-collab-settlement
Thomas Eizinger 3 years ago
parent
commit
e7ec622672
No known key found for this signature in database GPG Key ID: 651AC83A6C6C8B96
  1. 4
      taker-frontend/src/components/Trade.tsx

4
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();

Loading…
Cancel
Save