mirror of
https://github.com/logos-blockchain/lez-programs.git
synced 2026-07-03 13:39:38 +00:00
The swap and add-liquidity instructions debited user-owned token holdings without requiring those accounts to be signers. Mark them `signer` so a transaction can't move a user's tokens without their authorization: - add liquidity: `user_holding_lp` is now `#[account(mut, signer)]` - swap (both directions): `user_holding_a` and `user_holding_b` are now `#[account(mut, signer)]` Regenerate artifacts/amm-idl.json to reflect the new signer metadata. Update integration tests accordingly: swaps now sign and supply nonces for both user holdings (incrementing both nonces), and `amm_new_definition_precreated_zero_balance_user_lp` becomes `amm_new_definition_precreated_user_lp_unsigned_fails`, asserting an unsigned pre-existing LP holding is rejected and the transaction reverts.