diff --git a/framework/contracts/account/src/error.rs b/framework/contracts/account/src/error.rs index 95e3808ac..9aa93eec8 100644 --- a/framework/contracts/account/src/error.rs +++ b/framework/contracts/account/src/error.rs @@ -112,6 +112,9 @@ pub enum AccountError { contract: String, }, + #[error("No auth methods capabilities on this account (xion feature disabled)")] + NoAuthMethods {}, + #[error("Abstract Account don't have Authentication")] AbsAccNoAuth {}, diff --git a/framework/contracts/account/src/execution.rs b/framework/contracts/account/src/execution.rs index b92dba82e..0d4b5c98b 100644 --- a/framework/contracts/account/src/execution.rs +++ b/framework/contracts/account/src/execution.rs @@ -127,7 +127,7 @@ pub fn add_auth_method( } #[cfg(not(feature = "xion"))] { - Ok(AccountResponse::action("add_auth")) + Err(AccountError::NoAuthMethods {}) } } @@ -138,7 +138,7 @@ pub fn remove_auth_method(_deps: DepsMut, _env: Env, _id: u8) -> AccountResult { } #[cfg(not(feature = "xion"))] { - Ok(AccountResponse::action("remove_auth")) + Err(AccountError::NoAuthMethods {}) } }