Skip to content

Commit

Permalink
burn old token
Browse files Browse the repository at this point in the history
  • Loading branch information
dorin-iancu committed Sep 29, 2023
1 parent 0210549 commit eec1b06
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion locked-asset/energy-factory/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,15 @@ pub trait SimpleLockEnergy:
);

let output_tokens = self.update_energy(&user, |energy: &mut Energy<Self::Api>| {
self.extend_new_token_period(payment, unlock_epoch, current_epoch, energy)
self.extend_new_token_period(payment.clone(), unlock_epoch, current_epoch, energy)
});

self.send().esdt_local_burn(
&payment.token_identifier,
payment.token_nonce,
&payment.amount,
);

self.send().direct_esdt(
&caller,
&output_tokens.token_identifier,
Expand Down

0 comments on commit eec1b06

Please sign in to comment.