Skip to content

Commit

Permalink
Remove checks in simple lock legacy SC
Browse files Browse the repository at this point in the history
  • Loading branch information
psorinionut committed Jun 5, 2024
1 parent c4d11a9 commit 5c3b990
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions legacy-contracts/simple-lock-legacy/src/proxy_lp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,28 +55,6 @@ pub trait ProxyLpModule: crate::locked_token::LockedTokenModule {
let lp_proxy_token_attributes: LpProxyTokenAttributes<Self::Api> =
lp_proxy_token_mapper.get_token_attributes(token_nonce);

let current_epoch = self.blockchain().get_block_epoch();
if lp_proxy_token_attributes.first_token_locked_nonce > 0 {
let token_attributes: LockedTokenAttributes<Self::Api> = self
.locked_token()
.get_token_attributes(lp_proxy_token_attributes.first_token_locked_nonce);

require!(
current_epoch >= token_attributes.unlock_epoch,
CANNOT_UNLOCK_YET_ERR_MSG
);
}
if lp_proxy_token_attributes.second_token_locked_nonce > 0 {
let token_attributes: LockedTokenAttributes<Self::Api> = self
.locked_token()
.get_token_attributes(lp_proxy_token_attributes.second_token_locked_nonce);

require!(
current_epoch >= token_attributes.unlock_epoch,
CANNOT_UNLOCK_YET_ERR_MSG
);
}

lp_proxy_token_attributes.lp_token_id
}

Expand Down

0 comments on commit 5c3b990

Please sign in to comment.