Skip to content

Commit

Permalink
fix bug with read storage operation
Browse files Browse the repository at this point in the history
  • Loading branch information
mubarak23 committed Aug 19, 2024
1 parent cb9c4c5 commit 2c18f12
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/lockable/lockable.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ pub mod LockableComponent {
// IMPORTS
// *************************************************************************
use starknet::storage::StoragePointerWriteAccess;
use starknet::storage::StoragePointerReadAccess;
use starknet::{ContractAddress, get_caller_address, get_block_timestamp};
use token_bound_accounts::components::account::account::AccountComponent;
use token_bound_accounts::interfaces::IAccount::{IAccount, IAccountDispatcherTrait};
Expand All @@ -17,13 +18,13 @@ pub mod LockableComponent {
};

#[storage]
pub struct Storage {
struct Storage {
lock_until: u64
}

#[event]
#[derive(Drop, starknet::Event)]
pub enum Event {
enum Event {
AccountLocked: AccountLocked
}

Expand Down Expand Up @@ -96,8 +97,7 @@ pub mod LockableComponent {
}

fn is_lock(self: @ComponentState<TContractState>) -> bool {
// self.lock_until.read() > get_block_timestamp()
true
self.lock_until.read() > get_block_timestamp()
}
}
}
Expand Down

0 comments on commit 2c18f12

Please sign in to comment.