Add reduce only to mango instruction parsing (#21583)

* add reduce only to mango instruction parsing

* yarn format
This commit is contained in:
tjshipe 2021-12-03 19:21:42 -05:00 committed by GitHub
parent a433bb310d
commit e130b2cffc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View File

@ -113,6 +113,10 @@ export function PlacePerpOrderDetailsCard(props: {
<td className="text-lg-end">{orderLotDetails?.size}</td>
</tr>
)}
<tr>
<td>Reduce only</td>
<td className="text-lg-end">{info.reduceOnly}</td>
</tr>
</InstructionCard>
);
}

View File

@ -192,7 +192,9 @@ export type PlacePerpOrder = {
clientOrderId: String;
side: String;
orderType: String;
reduceOnly: String;
};
export const decodePlacePerpOrder = (
ix: TransactionInstruction
): PlacePerpOrder => {
@ -203,6 +205,7 @@ export const decodePlacePerpOrder = (
clientOrderId: decoded.PlacePerpOrder.clientOrderId.toString(),
side: decoded.PlacePerpOrder.side.toString(),
orderType: decoded.PlacePerpOrder.orderType.toString(),
reduceOnly: decoded.PlacePerpOrder.reduceOnly.toString(),
};
return placePerpOrder;