Skip to content

Commit

Permalink
MOD: removed unused imports
Browse files Browse the repository at this point in the history
  • Loading branch information
casweeney committed Dec 11, 2024
1 parent f9b8709 commit 56eb773
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions onchain/cairo/launchpad/src/launchpad/locker/lock_manager.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,14 @@ pub mod LockManager {
use core::starknet::SyscallResultTrait;
use core::starknet::event::EventEmitter;
use core::starknet::storage::{
StoragePointerReadAccess, StoragePointerWriteAccess, Map, StoragePathEntry, MutableVecTrait,
Vec, VecTrait
StoragePointerReadAccess, StoragePointerWriteAccess, Map, StoragePathEntry, Vec,
MutableVecTrait, VecTrait
};
use core::traits::TryInto;
use openzeppelin::token::erc20::{ERC20ABIDispatcher, ERC20ABIDispatcherTrait};

use starknet::syscalls::deploy_syscall;
use starknet::{
ContractAddress, contract_address_const, get_caller_address, get_contract_address,
get_block_timestamp, Store, ClassHash
ContractAddress, contract_address_const, get_caller_address, get_block_timestamp, ClassHash
};

#[storage]
Expand Down Expand Up @@ -278,7 +276,7 @@ pub mod LockManager {
// Only count active locks
let mut active_count = 0;
let mut i = 0;

while i < self.user_locks_list.entry(user).len() {
let lock_address = self.user_locks_list.entry(user).at(i).read();

Expand All @@ -287,7 +285,7 @@ pub mod LockManager {
}
i += 1;
};

active_count
}

Expand All @@ -298,7 +296,7 @@ pub mod LockManager {
let mut active_index = 0;
let mut i = 0;
let mut user_lock = contract_address_const::<0>();

while i < self.user_locks_list.entry(user).len() {
let lock_address = self.user_locks_list.entry(user).at(i).read();

Expand All @@ -319,7 +317,7 @@ pub mod LockManager {
// Only count active locks
let mut active_count = 0;
let mut i = 0;

while i < self.token_locks_list.entry(token).len() {
let lock_address = self.token_locks_list.entry(token).at(i).read();

Expand All @@ -328,7 +326,7 @@ pub mod LockManager {
}
i += 1;
};

active_count
}

Expand All @@ -339,7 +337,7 @@ pub mod LockManager {
let mut active_index = 0;
let mut i = 0;
let mut token_lock = contract_address_const::<0>();

while i < self.token_locks_list.entry(token).len() {
let lock_address = self.token_locks_list.entry(token).at(i).read();

Expand Down

0 comments on commit 56eb773

Please sign in to comment.