From 4f905cf850d2861c6bf2aa05fc916a70fd09bbb7 Mon Sep 17 00:00:00 2001 From: saml33 Date: Mon, 13 Feb 2023 15:17:10 +1100 Subject: [PATCH] add unsettled perp to mobile unsettled table --- components/trade/UnsettledTrades.tsx | 51 +++++++++++++++++++++++++--- 1 file changed, 46 insertions(+), 5 deletions(-) diff --git a/components/trade/UnsettledTrades.tsx b/components/trade/UnsettledTrades.tsx index 015444c2..3a23da4a 100644 --- a/components/trade/UnsettledTrades.tsx +++ b/components/trade/UnsettledTrades.tsx @@ -160,13 +160,17 @@ const UnsettledTrades = ({
{unsettledSpotBalances[mktAddress].base ? (
- {unsettledSpotBalances[mktAddress].base}{' '} + {' '} {base}
) : null} {unsettledSpotBalances[mktAddress].quote ? (
- {unsettledSpotBalances[mktAddress].quote}{' '} + {' '} {quote}
) : null} @@ -233,7 +237,40 @@ const UnsettledTrades = ({ ) : ( -
+
+ {unsettledPerpPositions.map((position) => { + const market = group.getPerpMarketByMarketIndex(position.marketIndex) + + return ( +
+ +
+
+ {' '} + USDC +
+ {!isUnownedAccount ? ( + handleSettlePerpFunds(market)} + size="medium" + > + {settleMktAddress === market.publicKey.toString() ? ( + + ) : ( + + )} + + ) : null} +
+
+ ) + })} {Object.entries(unsettledSpotBalances).map(([mktAddress]) => { const market = group.getSerum3MarketByExternalMarket( new PublicKey(mktAddress) @@ -250,13 +287,17 @@ const UnsettledTrades = ({
{unsettledSpotBalances[mktAddress].base ? ( - {unsettledSpotBalances[mktAddress].base}{' '} + {' '} {base} ) : null} {unsettledSpotBalances[mktAddress].quote ? ( - {unsettledSpotBalances[mktAddress].quote}{' '} + {' '} {quote} ) : null}