Skip to content

Commit

Permalink
Improve error for missing signatures. (#1306)
Browse files Browse the repository at this point in the history
### What

Improve error for missing signatures.

### Why

[TODO: Why this change is being made. Include any context required to
understand the why.]

### Known limitations

[TODO or N/A]
  • Loading branch information
dmkozh authored Dec 20, 2023
1 parent 6cfe0e3 commit 2569460
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions soroban-env-host/src/builtin_contracts/account_contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,13 @@ pub(crate) fn check_account_authentication(
len
));
}
if len == 0 {
return Err(host.error(
ContractError::AuthenticationError.into(),
"no account signatures found",
&[],
));
}
let payload_obj = host.bytes_new_from_slice(payload)?;
let account = host.load_account(account_id)?;
let mut prev_pk: Option<BytesN<32>> = None;
Expand Down

0 comments on commit 2569460

Please sign in to comment.