From 98d5639c07c13ba384f3906fae6c42448f99e90d Mon Sep 17 00:00:00 2001 From: brentstone Date: Tue, 30 Apr 2024 19:19:15 -0700 Subject: [PATCH] bug fix: handle empty public keys correctly --- crates/sdk/src/tx.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/sdk/src/tx.rs b/crates/sdk/src/tx.rs index 555c62adee..f6040947f2 100644 --- a/crates/sdk/src/tx.rs +++ b/crates/sdk/src/tx.rs @@ -3272,7 +3272,7 @@ pub async fn build_update_account( Some(threshold) } else { - let invalid_too_few_pks: bool = (public_keys.is_empty() + let invalid_too_few_pks = (!public_keys.is_empty() && public_keys.len() < account.threshold as usize) || (account.get_all_public_keys().len() < account.threshold as usize);