From 825152fd3d51d297e033d13d1e994713b4343ad6 Mon Sep 17 00:00:00 2001 From: maltekliemann Date: Mon, 28 Mar 2022 19:37:45 +0200 Subject: [PATCH] Add check for zero in `join_with_exact_pool` --- zrml/swaps/src/tests.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/zrml/swaps/src/tests.rs b/zrml/swaps/src/tests.rs index c2644f9a6..413421e7c 100644 --- a/zrml/swaps/src/tests.rs +++ b/zrml/swaps/src/tests.rs @@ -568,6 +568,11 @@ fn pool_amount_must_not_be_zero() { Swaps::pool_exit(alice_signed(), 0, 0, vec!(_1, _1, _1, _1)), crate::Error::::MathApproximation ); + + assert_noop!( + Swaps::pool_join_with_exact_pool_amount(alice_signed(), 0, ASSET_A, 0, 0,), + crate::Error::::MathApproximation + ); }); }