diff --git a/soroban-sdk/src/env.rs b/soroban-sdk/src/env.rs index 8fd002ba..8903134a 100644 --- a/soroban-sdk/src/env.rs +++ b/soroban-sdk/src/env.rs @@ -965,7 +965,9 @@ impl Env { .unwrap(); let prev_auth_manager = self.env_impl.snapshot_auth_manager().unwrap(); - self.env_impl.switch_to_recording_auth(true).unwrap(); + self.env_impl + .switch_to_recording_auth_inherited_from_snapshot(&prev_auth_manager) + .unwrap(); self.invoke_contract::<()>( &token_id, &soroban_sdk_macros::internal_symbol_short!("set_admin"), @@ -1014,7 +1016,9 @@ impl Env { constructor_args: Vec, ) -> Address { let prev_auth_manager = self.env_impl.snapshot_auth_manager().unwrap(); - self.env_impl.switch_to_recording_auth(true).unwrap(); + self.env_impl + .switch_to_recording_auth_inherited_from_snapshot(&prev_auth_manager) + .unwrap(); let args_vec: std::vec::Vec = constructor_args.iter().map(|v| v.into_val(self)).collect(); let contract_id: Address = self