From 02aab10d285c7e1ed1fcb99a31d4bbfbb841f024 Mon Sep 17 00:00:00 2001 From: Ash Date: Mon, 25 Nov 2024 14:16:21 -0800 Subject: [PATCH 1/2] remove dupe check --- contracts/account/src/contract.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/contracts/account/src/contract.rs b/contracts/account/src/contract.rs index 15a7f6a..5ba938a 100644 --- a/contracts/account/src/contract.rs +++ b/contracts/account/src/contract.rs @@ -66,12 +66,11 @@ pub fn sudo(deps: DepsMut, env: Env, msg: AccountSudoMsg) -> ContractResult { - let cred_bytes = cred_bytes.ok_or(ContractError::EmptySignature)?; execute::before_tx( deps.as_ref(), &env, &Binary::from(tx_bytes.as_slice()), - Some(Binary::from(cred_bytes.as_slice())).as_ref(), + cred_bytes.as_ref(), simulate, ) } From 077104689fa2ed2f27baa738f2c2fa7fd2a45fc1 Mon Sep 17 00:00:00 2001 From: Ash Date: Mon, 25 Nov 2024 14:44:38 -0800 Subject: [PATCH 2/2] lint --- contracts/account/src/contract.rs | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/contracts/account/src/contract.rs b/contracts/account/src/contract.rs index 5ba938a..342ac91 100644 --- a/contracts/account/src/contract.rs +++ b/contracts/account/src/contract.rs @@ -65,15 +65,13 @@ pub fn sudo(deps: DepsMut, env: Env, msg: AccountSudoMsg) -> ContractResult { - execute::before_tx( - deps.as_ref(), - &env, - &Binary::from(tx_bytes.as_slice()), - cred_bytes.as_ref(), - simulate, - ) - } + } => execute::before_tx( + deps.as_ref(), + &env, + &Binary::from(tx_bytes.as_slice()), + cred_bytes.as_ref(), + simulate, + ), AccountSudoMsg::AfterTx { .. } => execute::after_tx(), } }