Skip to content

Commit

Permalink
TODO: removal
Browse files Browse the repository at this point in the history
  • Loading branch information
baitcode committed Dec 10, 2024
1 parent 88f8db8 commit 9553035
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions src/staker.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -272,18 +272,16 @@ pub mod Staker {
}
);
} else {
// Add the first record
if is_add {
log.append().write(
StakingLogRecord {
timestamp: get_block_timestamp(),
total_staked: amount,
cumulative_staked_per_second: 0,
}
);
} else {
assert(false, 'IMPOSSIBRU'); // TODO: fix
}
// Add the first record. If withdrawal, then it's underflow.
assert(is_add, 'BAD AMOUNT');

log.append().write(
StakingLogRecord {
timestamp: get_block_timestamp(),
total_staked: amount,
cumulative_staked_per_second: 0,
}
);
}
}

Expand Down

0 comments on commit 9553035

Please sign in to comment.