From 00d71b1ff06eac15284c191834926be2d6fe17ed Mon Sep 17 00:00:00 2001 From: Pi Lanningham Date: Fri, 26 Jan 2024 15:12:57 -0500 Subject: [PATCH] Remove unneccesary tuples Closes #39 --- validators/pool.ak | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/validators/pool.ak b/validators/pool.ak index 2116048..0a1eaff 100644 --- a/validators/pool.ak +++ b/validators/pool.ak @@ -394,16 +394,11 @@ validator(settings_policy_id: PolicyId) { // sizes of pools, such that an individual LP token is granular enough for depositing and withdrawing for most users. expect Some(initial_lq) = math.sqrt(coin_a_amt_sans_protocol_fees * coin_b_amt) - // Use the asset names we computed above to compute the whole Asset IDs of the tokens we expect - let new_pool_ref = (own_policy_id, new_pool_ref_token) - let new_pool_nft = (own_policy_id, new_pool_nft_token) - let new_pool_lq = (own_policy_id, new_pool_lp_token) - // And check that we mint the correct tokens, and nothing else. let expected_mint = - shared.to_value((new_pool_ref.1st, new_pool_ref.2nd, 1)) - |> value.merge(shared.to_value((new_pool_nft.1st, new_pool_nft.2nd, 1))) - |> value.merge(shared.to_value((new_pool_lq.1st, new_pool_lq.2nd, initial_lq))) + shared.to_value((own_policy_id, new_pool_ref_token, 1)) + |> value.merge(shared.to_value((own_policy_id, new_pool_nft_token, 1))) + |> value.merge(shared.to_value((own_policy_id, new_pool_lp_token, initial_lq))) let mint_is_correct = value.from_minted_value(ctx.transaction.mint) == expected_mint