refactor: rename private_pda_spender to auth_transfer_proxy

This commit is contained in:
Moudy 2026-05-08 18:18:40 +02:00
parent 1bed9ecef2
commit cf699fde7c
4 changed files with 8 additions and 8 deletions

View File

@ -419,18 +419,18 @@ mod tests {
}
/// PDA init: initializes a new PDA under `authenticated_transfer`'s ownership.
/// The `private_pda_spender` program chains to `authenticated_transfer` with `pda_seeds`
/// The `auth_transfer_proxy` program chains to `authenticated_transfer` with `pda_seeds`
/// to establish authorization and the private PDA binding.
#[test]
fn private_pda_init() {
let program = Program::private_pda_spender();
let program = Program::auth_transfer_proxy();
let auth_transfer = Program::authenticated_transfer_program();
let keys = test_private_account_keys_1();
let npk = keys.npk();
let seed = PdaSeed::new([42; 32]);
let shared_secret_pda = SharedSecretKey::new(&[55; 32], &keys.vpk());
// PDA (new, private PDA) — AccountId derived from private_pda_spender's program ID
// PDA (new, private PDA) — AccountId derived from auth_transfer_proxy's program ID
let pda_id = AccountId::for_private_pda(&program.id(), &seed, &npk);
let pda_pre = AccountWithMetadata::new(Account::default(), false, pda_id);
@ -460,7 +460,7 @@ mod tests {
/// two-tx sequence with membership proofs.
#[test]
fn private_pda_withdraw() {
let program = Program::private_pda_spender();
let program = Program::auth_transfer_proxy();
let auth_transfer = Program::authenticated_transfer_program();
let keys = test_private_account_keys_1();
let npk = keys.npk();

View File

@ -313,12 +313,12 @@ mod tests {
}
#[must_use]
pub fn private_pda_spender() -> Self {
use test_program_methods::{PRIVATE_PDA_SPENDER_ELF, PRIVATE_PDA_SPENDER_ID};
pub fn auth_transfer_proxy() -> Self {
use test_program_methods::{AUTH_TRANSFER_PROXY_ELF, AUTH_TRANSFER_PROXY_ID};
Self {
id: PRIVATE_PDA_SPENDER_ID,
elf: PRIVATE_PDA_SPENDER_ELF.to_vec(),
id: AUTH_TRANSFER_PROXY_ID,
elf: AUTH_TRANSFER_PROXY_ELF.to_vec(),
}
}