Add reduce only to mango instruction parsing (#21583)
* add reduce only to mango instruction parsing * yarn format
This commit is contained in:
@ -113,6 +113,10 @@ export function PlacePerpOrderDetailsCard(props: {
|
|||||||
<td className="text-lg-end">{orderLotDetails?.size}</td>
|
<td className="text-lg-end">{orderLotDetails?.size}</td>
|
||||||
</tr>
|
</tr>
|
||||||
)}
|
)}
|
||||||
|
<tr>
|
||||||
|
<td>Reduce only</td>
|
||||||
|
<td className="text-lg-end">{info.reduceOnly}</td>
|
||||||
|
</tr>
|
||||||
</InstructionCard>
|
</InstructionCard>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -192,7 +192,9 @@ export type PlacePerpOrder = {
|
|||||||
clientOrderId: String;
|
clientOrderId: String;
|
||||||
side: String;
|
side: String;
|
||||||
orderType: String;
|
orderType: String;
|
||||||
|
reduceOnly: String;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const decodePlacePerpOrder = (
|
export const decodePlacePerpOrder = (
|
||||||
ix: TransactionInstruction
|
ix: TransactionInstruction
|
||||||
): PlacePerpOrder => {
|
): PlacePerpOrder => {
|
||||||
@ -203,6 +205,7 @@ export const decodePlacePerpOrder = (
|
|||||||
clientOrderId: decoded.PlacePerpOrder.clientOrderId.toString(),
|
clientOrderId: decoded.PlacePerpOrder.clientOrderId.toString(),
|
||||||
side: decoded.PlacePerpOrder.side.toString(),
|
side: decoded.PlacePerpOrder.side.toString(),
|
||||||
orderType: decoded.PlacePerpOrder.orderType.toString(),
|
orderType: decoded.PlacePerpOrder.orderType.toString(),
|
||||||
|
reduceOnly: decoded.PlacePerpOrder.reduceOnly.toString(),
|
||||||
};
|
};
|
||||||
|
|
||||||
return placePerpOrder;
|
return placePerpOrder;
|
||||||
|
Reference in New Issue
Block a user