From b8a2a3f851e51c203b66cee507127c8573c65de5 Mon Sep 17 00:00:00 2001 From: Dorin Marian Iancu Date: Tue, 3 Oct 2023 14:05:46 +0300 Subject: [PATCH] revert energy update change --- locked-asset/proxy_dex/src/energy_update.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/locked-asset/proxy_dex/src/energy_update.rs b/locked-asset/proxy_dex/src/energy_update.rs index 9bc045b6d..0c62e34f7 100644 --- a/locked-asset/proxy_dex/src/energy_update.rs +++ b/locked-asset/proxy_dex/src/energy_update.rs @@ -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 {