Skip to content

Commit

Permalink
fix scarb format
Browse files Browse the repository at this point in the history
  • Loading branch information
mubarak23 committed Aug 20, 2024
1 parent f53d27b commit a0602dc
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/components/lockable/lockable.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,9 @@ pub mod LockableComponent {

let is_valid = account_comp._is_valid_signer(get_caller_address());
assert(is_valid, Errors::UNAUTHORIZED);

assert(
lock_until <= current_timestamp + YEAR_DAYS_SECONDS,
Errors::EXCEEDS_MAX_LOCK_TIME
lock_until <= current_timestamp + YEAR_DAYS_SECONDS, Errors::EXCEEDS_MAX_LOCK_TIME
);

let (lock_status, _) = self.is_locked();
Expand All @@ -99,7 +98,7 @@ pub mod LockableComponent {
);
}

fn is_locked (self: @ComponentState<TContractState>) -> (bool, u64) {
fn is_locked(self: @ComponentState<TContractState>) -> (bool, u64) {
let unlock_timestamp = self.lock_until.read();
let current_time = get_block_timestamp();
if (current_time < unlock_timestamp) {
Expand Down

0 comments on commit a0602dc

Please sign in to comment.