Skip to content

Commit

Permalink
Make RecordedAuthPayload consistently return None for invoker. (#900
Browse files Browse the repository at this point in the history
)

This check has accidentally been removed during refactoring.
  • Loading branch information
dmkozh authored Jun 27, 2023
1 parent 400d806 commit f30ec3a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion soroban-env-host/src/auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1119,7 +1119,11 @@ impl AccountAuthorizationTracker {
fn get_recorded_auth_payload(&self, host: &Host) -> Result<RecordedAuthPayload, HostError> {
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(
Expand Down

0 comments on commit f30ec3a

Please sign in to comment.