From 85e06df3496266cf457141df360f13617c4d68a7 Mon Sep 17 00:00:00 2001 From: Mihai Calin Luca Date: Mon, 26 Aug 2024 23:37:41 +0300 Subject: [PATCH] added esdt processing for transfer step in interactor --- .../src/scenario/tx_to_step/tx_to_step_transfer.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/framework/scenario/src/scenario/tx_to_step/tx_to_step_transfer.rs b/framework/scenario/src/scenario/tx_to_step/tx_to_step_transfer.rs index d2bf9636c9..d2baa6bc6c 100644 --- a/framework/scenario/src/scenario/tx_to_step/tx_to_step_transfer.rs +++ b/framework/scenario/src/scenario/tx_to_step/tx_to_step_transfer.rs @@ -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}; @@ -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