Skip to content

Commit 7b52ab0

Browse files
chore: minor cleanup:
1 parent 8d17f16 commit 7b52ab0

File tree

4 files changed

+7
-11
lines changed

4 files changed

+7
-11
lines changed

programs/squads_smart_account_program/src/instructions/settings_transaction_sync.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
use account_events::{AddSpendingLimitEvent, RemoveSpendingLimitEvent};
21
use anchor_lang::prelude::*;
32

4-
use crate::{ consensus::ConsensusAccount, consensus_trait::{Consensus, ConsensusAccountType}, errors::*, events::*, program::SquadsSmartAccountProgram, state::*, utils::*};
3+
use crate::{consensus::ConsensusAccount, consensus_trait::{Consensus, ConsensusAccountType}, errors::*, events::*, program::SquadsSmartAccountProgram, state::*, utils::*};
54

65
#[derive(AnchorSerialize, AnchorDeserialize)]
76
pub struct SyncSettingsTransactionArgs {

programs/squads_smart_account_program/src/instructions/transaction_close.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,8 @@ use crate::consensus_trait::ConsensusAccountType;
1818
use crate::errors::*;
1919
use crate::program::SquadsSmartAccountProgram;
2020
use crate::state::*;
21-
use crate::utils;
2221
use crate::LogAuthorityInfo;
2322
use crate::SmartAccountEvent;
24-
use crate::TransactionContent;
2523
use crate::TransactionEvent;
2624
use crate::TransactionEventType;
2725

@@ -534,7 +532,7 @@ pub struct CloseEmptyPolicyTransaction<'info> {
534532
pub empty_policy: AccountInfo<'info>,
535533

536534
/// CHECK: `seeds` and `bump` verify that the account is the canonical Proposal,
537-
/// the logic within `transaction_close` does the rest of the checks.
535+
/// the logic within `close_empty_policy_transaction` does the rest of the checks.
538536
#[account(
539537
mut,
540538
seeds = [
@@ -579,7 +577,7 @@ impl CloseEmptyPolicyTransaction<'_> {
579577
/// empty/deleted policies.
580578
///
581579
/// Since a policy can never exist at the same address again after being
582-
/// closed, any transaction & proposal associated with it can be closed.
580+
/// closed, any transaction & proposal associated with it can be closed safely.
583581
pub fn close_empty_policy_transaction(ctx: Context<Self>) -> Result<()> {
584582
let proposal = &mut ctx.accounts.proposal;
585583
let proposal_rent_collector = &ctx.accounts.proposal_rent_collector;

programs/squads_smart_account_program/src/interface/consensus_trait.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use anchor_lang::prelude::*;
22
use borsh::{BorshDeserialize, BorshSerialize};
33

4-
use crate::{errors::SmartAccountError, Permission, SmartAccountSigner};
4+
use crate::{Permission, SmartAccountSigner};
55

66
#[derive(BorshSerialize, BorshDeserialize, PartialEq, Eq, PartialOrd, Ord, Clone, Copy, Debug)]
77
pub enum ConsensusAccountType {

programs/squads_smart_account_program/src/state/policies/policy_core/policy.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
use anchor_lang::prelude::*;
22

3+
use super::{payloads::PolicyPayload, traits::PolicyTrait, PolicyExecutionContext};
4+
use crate::state::policies::implementations::InternalFundTransferPolicy;
35
use crate::{
46
errors::*,
57
interface::consensus_trait::{Consensus, ConsensusAccountType},
6-
InternalFundTransferExecutionArgs, Permission, ProgramInteractionExecutionArgs,
8+
InternalFundTransferExecutionArgs, ProgramInteractionExecutionArgs,
79
ProgramInteractionPolicy, Proposal, Settings, SettingsChangeExecutionArgs,
810
SettingsChangePolicy, SmartAccountSigner, SpendingLimitExecutionArgs, SpendingLimitPolicy,
911
Transaction, SEED_POLICY, SEED_PREFIX,
@@ -25,9 +27,6 @@ pub enum PolicyExpirationArgs {
2527
SettingsState,
2628
}
2729

28-
use super::{payloads::PolicyPayload, traits::PolicyTrait, PolicyExecutionContext};
29-
use crate::state::policies::implementations::InternalFundTransferPolicy;
30-
3130
#[account]
3231
pub struct Policy {
3332
/// The smart account this policy belongs to.

0 commit comments

Comments
 (0)