From a3100e448875e76a374c4d5fe667c3fd1ba3c096 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Costin=20Caraba=C8=99?= Date: Fri, 29 Sep 2023 20:41:18 +0300 Subject: [PATCH] Fixes after review --- contracts/paymaster/src/forward_call.rs | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/contracts/paymaster/src/forward_call.rs b/contracts/paymaster/src/forward_call.rs index d230012a..5c29b644 100644 --- a/contracts/paymaster/src/forward_call.rs +++ b/contracts/paymaster/src/forward_call.rs @@ -15,24 +15,15 @@ pub trait ForwardCall { ) { let original_caller = self.blockchain().get_caller(); - let (contract_call_endpoint, contract_call_args) = - if !self.blockchain().is_smart_contract(&dest) { - let mut args_buffer = ManagedArgBuffer::new(); - args_buffer.push_arg(endpoint_name); - - (ESDT_TRANSFER_FUNC_NAME.into(), args_buffer) - } else { - (endpoint_name, endpoint_args.to_arg_buffer()) - }; - self.send() - .contract_call::<()>(dest, contract_call_endpoint) - .with_raw_arguments(contract_call_args) + .contract_call::<()>(dest, endpoint_name) + .with_raw_arguments(endpoint_args.to_arg_buffer()) .with_multi_token_transfer(payments) .async_call() .with_callback(self.callbacks().transfer_callback(original_caller)) .call_and_exit(); } + #[callback] fn transfer_callback( &self,