From 12f2e974072f95212b3c6a8cbd265496e546f064 Mon Sep 17 00:00:00 2001 From: Thomas Date: Sat, 9 Nov 2024 00:51:49 +0100 Subject: [PATCH] removed zero token1 and token2 validation, as setting the slider UI to 0 will trigger that warning, which we do not want --- src/app/state/orderInputSlice.test.ts | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/src/app/state/orderInputSlice.test.ts b/src/app/state/orderInputSlice.test.ts index 1d3d07f3..a8a919bd 100644 --- a/src/app/state/orderInputSlice.test.ts +++ b/src/app/state/orderInputSlice.test.ts @@ -66,32 +66,6 @@ describe("OrderInputSlice", () => { ); }); - it("Validation works for zero token1 amount", () => { - store.dispatch( - orderInputSlice.actions.setTokenAmount({ - amount: 0, - specifiedToken: SpecifiedToken.TOKEN_1, - }) - ); - expect(store.getState().orderInput.validationToken1.valid).toBe(false); - expect(store.getState().orderInput.validationToken1.message).toBe( - ErrorMessage.NONZERO_AMOUNT - ); - }); - - it("Validation works for zero token2 amount", () => { - store.dispatch( - orderInputSlice.actions.setTokenAmount({ - amount: 0, - specifiedToken: SpecifiedToken.TOKEN_2, - }) - ); - expect(store.getState().orderInput.validationToken2.valid).toBe(false); - expect(store.getState().orderInput.validationToken2.message).toBe( - ErrorMessage.NONZERO_AMOUNT - ); - }); - it("Validation works for insufficient balance for token1 on sell order ", () => { store.dispatch(orderInputSlice.actions.setSide(OrderSide.SELL)); store.dispatch(