From 4f9d66bbed8692dad8837757ae81e834bf335b8f Mon Sep 17 00:00:00 2001 From: okeolaolatun23-glitch Date: Mon, 24 Aug 2026 23:32:03 +0000 Subject: [PATCH] fix: remove orphaned module guards.rs and its require_not_paused function --- src/guards.rs | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 src/guards.rs diff --git a/src/guards.rs b/src/guards.rs deleted file mode 100644 index e497682d..00000000 --- a/src/guards.rs +++ /dev/null @@ -1,19 +0,0 @@ -use soroban_sdk::Env; - -use crate::types::{ContractError, DataKey}; - -/// Returns `Err(ContractPaused)` if the contract is currently paused. -/// -/// Called at the top of every state-changing entry point so that a paused -/// contract immediately rejects all mutations without reaching business logic. -pub fn require_not_paused(env: &Env) -> Result<(), ContractError> { - if env - .storage() - .instance() - .get::(&DataKey::Paused) - .unwrap_or(false) - { - return Err(ContractError::ContractPaused); - } - Ok(()) -}