Skip to content

Commit

Permalink
Merge pull request #1748 from multiversx/interactor-esdt-transfer
Browse files Browse the repository at this point in the history
added esdt processing for transfer step in interactor
  • Loading branch information
andrei-marinica authored Sep 3, 2024
2 parents c7cf953 + 85e06df commit 84e6f05
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 84e6f05

Please sign in to comment.