Skip to content

Commit

Permalink
Merge pull request #779 from multiversx/revert-energy-update-change
Browse files Browse the repository at this point in the history
revert energy update change
  • Loading branch information
dorin-iancu authored Oct 3, 2023
2 parents 3491557 + b8a2a3f commit a94a332
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 a94a332

Please sign in to comment.