From dd8328cf9f2b6feed30af3cb6690d50f71ffaf1c Mon Sep 17 00:00:00 2001 From: bristinWild Date: Mon, 8 Jun 2026 19:58:14 +0530 Subject: [PATCH] fix: update AMM unit test fixtures for LP token authority pool_lp_created() and pool_lp_created_after_lock() fixtures now use Authority::new(token_lp_definition_id) matching the production change where the pool-definition PDA is the LP token's mint authority. --- programs/amm/src/tests.rs | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/programs/amm/src/tests.rs b/programs/amm/src/tests.rs index f1d9f18..1b9eb3a 100644 --- a/programs/amm/src/tests.rs +++ b/programs/amm/src/tests.rs @@ -873,7 +873,12 @@ impl AccountWithMetadataForTests { name: String::from("test"), total_supply: BalanceForTests::lp_supply_init(), metadata_id: None, - authority: token_core::Authority::renounced(), + authority: token_core::Authority::new( + IdForTests::token_lp_definition_id() + .as_ref() + .try_into() + .expect("AccountId is always 32 bytes"), + ), }), nonce: Nonce(0), }, @@ -899,7 +904,12 @@ impl AccountWithMetadataForTests { name: String::from("LP Token"), total_supply: MINIMUM_LIQUIDITY, metadata_id: None, - authority: token_core::Authority::renounced(), + authority: token_core::Authority::new( + IdForTests::token_lp_definition_id() + .as_ref() + .try_into() + .expect("AccountId is always 32 bytes"), + ), }), nonce: Nonce(0), }, @@ -917,7 +927,12 @@ impl AccountWithMetadataForTests { name: String::from("test"), total_supply: BalanceForTests::lp_supply_init(), metadata_id: None, - authority: token_core::Authority::renounced(), + authority: token_core::Authority::new( + IdForTests::token_lp_definition_id() + .as_ref() + .try_into() + .expect("AccountId is always 32 bytes"), + ), }), nonce: Nonce(0), },