Skip to content

Commit

Permalink
revert energy update change
Browse files Browse the repository at this point in the history
  • Loading branch information
dorin-iancu committed Oct 3, 2023
1 parent 3491557 commit b8a2a3f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions locked-asset/proxy_dex/src/energy_update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ pub trait EnergyUpdateModule:
.get_token_attributes(token_id, token_nonce);
energy.update_after_unlock_any(token_amount, attributes.unlock_epoch, current_epoch);
} else if token_id == &old_locked_token_id {
if self.blockchain().is_smart_contract(user) {
return;
}

let attributes = self.decode_legacy_token(token_id, token_nonce);
let epoch_amount_pairs = attributes.get_unlock_amounts_per_epoch(token_amount);
for pair in epoch_amount_pairs.pairs {
Expand Down

0 comments on commit b8a2a3f

Please sign in to comment.