File tree Expand file tree Collapse file tree
docs/build/smart-contracts/example-contracts Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -83,6 +83,7 @@ use soroban_sdk::{
8383#[repr(u32 )]
8484pub enum Error {
8585 UnknownDelegate = 1 ,
86+ InsufficientDelegates = 2 ,
8687}
8788
8889#[contracttype]
@@ -125,9 +126,10 @@ impl CustomAccountInterface for ModularAccount {
125126 let delegates = env . custom_account (). get_delegated_signers ();
126127
127128 // With no delegates to forward to, the account would authenticate
128- // nothing and be effectively unauthenticated, so reject it.
129+ // nothing and be effectively unauthenticated, so reject it. A real
130+ // account might require more than one delegate to meet a threshold.
129131 if delegates . is_empty () {
130- return Err (Error :: UnknownDelegate );
132+ return Err (Error :: InsufficientDelegates );
131133 }
132134
133135 // Check if the delegates are accepted by the modular account.
@@ -187,7 +189,7 @@ type Signature = ();
187189let delegates = env . custom_account (). get_delegated_signers ();
188190
189191if delegates . is_empty () {
190- return Err (Error :: UnknownDelegate );
192+ return Err (Error :: InsufficientDelegates );
191193}
192194
193195for delegate in delegates . iter () {
You can’t perform that action at this time.
0 commit comments