Skip to content

Commit

Permalink
added esdt processing for transfer step in interactor
Browse files Browse the repository at this point in the history
  • Loading branch information
mihaicalinluca committed Aug 26, 2024
1 parent 5b28351 commit 85e06df
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use multiversx_sc::types::{Tx, TxEnv, TxFromSpecified, TxGas, TxPayment, TxToSpecified};

use crate::scenario_model::TransferStep;
use crate::{imports::TxESDT, scenario_model::TransferStep};

use super::{address_annotated, gas_annotated, StepWrapper, TxToStep};

Expand Down Expand Up @@ -48,6 +48,12 @@ where
let full_payment_data = payment.into_full_payment_data(env);
if let Some(annotated_egld_payment) = full_payment_data.egld {
step.tx.egld_value = annotated_egld_payment.into();
} else {
step.tx.esdt_value = full_payment_data
.multi_esdt
.iter()
.map(TxESDT::from)
.collect();
}

step
Expand Down

0 comments on commit 85e06df

Please sign in to comment.