fix(trading): fix order toast intent on amendments (#3433)
This commit is contained in:
parent
77e16ad1b7
commit
2f6800212e
@ -292,7 +292,7 @@ describe('getVegaTransactionContentIntent', () => {
|
|||||||
Intent.Success
|
Intent.Success
|
||||||
);
|
);
|
||||||
expect(getVegaTransactionContentIntent(editOrder).intent).toBe(
|
expect(getVegaTransactionContentIntent(editOrder).intent).toBe(
|
||||||
Intent.Success
|
Intent.Primary
|
||||||
);
|
);
|
||||||
expect(getVegaTransactionContentIntent(cancelOrder).intent).toBe(
|
expect(getVegaTransactionContentIntent(cancelOrder).intent).toBe(
|
||||||
Intent.Primary
|
Intent.Primary
|
||||||
|
@ -681,6 +681,9 @@ export const getVegaTransactionContentIntent = (tx: VegaStoredTxState) => {
|
|||||||
|
|
||||||
// Transaction can be successful but the order can be rejected by the network
|
// Transaction can be successful but the order can be rejected by the network
|
||||||
const intent =
|
const intent =
|
||||||
(tx.order && getOrderToastIntent(tx.order.status)) || intentMap[tx.status];
|
(tx.order &&
|
||||||
|
!isOrderAmendmentTransaction(tx.body) &&
|
||||||
|
getOrderToastIntent(tx.order.status)) ||
|
||||||
|
intentMap[tx.status];
|
||||||
return { intent, content };
|
return { intent, content };
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user