From f30ec3aadafe312da0f4bd9fbd528be29f99fd7e Mon Sep 17 00:00:00 2001 From: Dmytro Kozhevin Date: Tue, 27 Jun 2023 13:19:37 -0400 Subject: [PATCH] Make `RecordedAuthPayload` consistently return `None` for invoker. (#900) This check has accidentally been removed during refactoring. --- soroban-env-host/src/auth.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/soroban-env-host/src/auth.rs b/soroban-env-host/src/auth.rs index 96d15becb..d1d6533fb 100644 --- a/soroban-env-host/src/auth.rs +++ b/soroban-env-host/src/auth.rs @@ -1119,7 +1119,11 @@ impl AccountAuthorizationTracker { fn get_recorded_auth_payload(&self, host: &Host) -> Result { Ok(RecordedAuthPayload { address: if let Some(addr) = self.address { - Some(host.visit_obj(addr, |a: &ScAddress| Ok(a.clone()))?) + if !self.is_invoker { + Some(host.visit_obj(addr, |a: &ScAddress| Ok(a.clone()))?) + } else { + None + } } else { if !self.is_invoker { return Err(host.err(