Compare commits

...
Author SHA1 Message Date
Madalina Raicu 94889b7396 fix(trading): fix order toast intent on amendments 2023-04-13 15:07:51 +03:00
2 changed files with 5 additions and 2 deletions
@@ -292,7 +292,7 @@ describe('getVegaTransactionContentIntent', () => {
Intent.Success
);
expect(getVegaTransactionContentIntent(editOrder).intent).toBe(
Intent.Success
Intent.Primary
);
expect(getVegaTransactionContentIntent(cancelOrder).intent).toBe(
Intent.Primary
@@ -681,6 +681,9 @@ export const getVegaTransactionContentIntent = (tx: VegaStoredTxState) => {
// Transaction can be successful but the order can be rejected by the network
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 };
};