fix(orders): cancel all and pegged orders amendable (#3843)
This commit is contained in:
parent
0db5d0ce87
commit
fd338c7400
@ -482,7 +482,7 @@ describe('amend and cancel order', { tags: '@smoke' }, () => {
|
||||
testOrderCancellation(order);
|
||||
});
|
||||
});
|
||||
it('must be able to cancel all orders on a market', () => {
|
||||
it('must be able to cancel all orders on all markets', () => {
|
||||
// 7003-MORD-009
|
||||
// 7003-MORD-010
|
||||
// 7003-MORD-011
|
||||
@ -496,9 +496,7 @@ describe('amend and cancel order', { tags: '@smoke' }, () => {
|
||||
.should('have.text', 'Cancel all')
|
||||
.then(($btn) => {
|
||||
cy.wrap($btn).click({ force: true });
|
||||
const order: OrderCancellation = {
|
||||
marketId: 'market-0',
|
||||
};
|
||||
const order: OrderCancellation = {};
|
||||
testOrderCancellation(order);
|
||||
});
|
||||
});
|
||||
|
@ -133,11 +133,9 @@ export const OrderListManager = ({
|
||||
|
||||
const cancelAll = useCallback(() => {
|
||||
create({
|
||||
orderCancellation: {
|
||||
marketId,
|
||||
},
|
||||
orderCancellation: {},
|
||||
});
|
||||
}, [create, marketId]);
|
||||
}, [create]);
|
||||
|
||||
return (
|
||||
<>
|
||||
|
@ -226,8 +226,8 @@ describe('OrderListTable', () => {
|
||||
const amendCell = getAmendCell();
|
||||
const typeCell = screen.getAllByRole('gridcell')[2];
|
||||
expect(typeCell).toHaveTextContent('Mid - 10.0 Peg limit');
|
||||
expect(amendCell.queryByTestId('edit')).not.toBeInTheDocument();
|
||||
expect(amendCell.queryByTestId('cancel')).not.toBeInTheDocument();
|
||||
expect(amendCell.queryByTestId('edit')).toBeInTheDocument();
|
||||
expect(amendCell.queryByTestId('cancel')).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it.each([
|
||||
|
@ -329,7 +329,7 @@ export const isOrderActive = (status: Schema.OrderStatus) => {
|
||||
};
|
||||
|
||||
export const isOrderAmendable = (order: Order | undefined) => {
|
||||
if (!order || order.peggedOrder || order.liquidityProvision) {
|
||||
if (!order || order.liquidityProvision) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user