From 2569460880ee16db43b1cd4efb39bc4e5dbb7376 Mon Sep 17 00:00:00 2001 From: Dmytro Kozhevin Date: Tue, 19 Dec 2023 21:44:37 -0500 Subject: [PATCH] Improve error for missing signatures. (#1306) ### 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] --- soroban-env-host/src/builtin_contracts/account_contract.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/soroban-env-host/src/builtin_contracts/account_contract.rs b/soroban-env-host/src/builtin_contracts/account_contract.rs index f03dec402..d79e6a477 100644 --- a/soroban-env-host/src/builtin_contracts/account_contract.rs +++ b/soroban-env-host/src/builtin_contracts/account_contract.rs @@ -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> = None;