Skip to content

Commit

Permalink
fix after review
Browse files Browse the repository at this point in the history
  • Loading branch information
mihaicalinluca committed Mar 28, 2024
1 parent 1852432 commit c4ae976
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ pub trait CallPromisesModule: common::CommonModule {
.accept_funds()
.with_gas_limit(gas_limit)
.with_egld_or_single_esdt_transfer(payment)
.async_call()
.register_promise();
}

Expand All @@ -38,7 +37,6 @@ pub trait CallPromisesModule: common::CommonModule {
.typed(vault_proxy::VaultProxy)
.retrieve_funds(token, token_nonce, amount)
.with_gas_limit(gas_limit)
.async_call()
.with_callback(self.callbacks().retrieve_funds_callback())
.with_extra_gas_for_callback(10_000_000)
.register_promise();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@ pub trait BackTransfersFeatureModule {
token_nonce: u64,
amount: BigUint,
) {
let ((), back_transfers) = self
let back_transfers = self
.tx()
.to(&to)
.typed(vault_proxy::VaultProxy)
.retrieve_funds(token, token_nonce, amount)
.execute_on_dest_context_with_back_transfers::<()>();
.returns(ReturnsBackTransfers)
.sync_call();

require!(
back_transfers.esdt_payments.len() == 1 || back_transfers.total_egld_amount != 0,
Expand All @@ -39,12 +40,13 @@ pub trait BackTransfersFeatureModule {
token_nonce: u64,
amount: BigUint,
) {
let ((), back_transfers) = self
let back_transfers = self
.tx()
.to(&to)
.typed(vault_proxy::VaultProxy)
.retrieve_funds(token.clone(), token_nonce, amount.clone())
.execute_on_dest_context_with_back_transfers::<()>();
.returns(ReturnsBackTransfers)
.sync_call();

require!(
back_transfers.esdt_payments.len() == 1 || back_transfers.total_egld_amount != 0,
Expand All @@ -56,12 +58,13 @@ pub trait BackTransfersFeatureModule {
&back_transfers.esdt_payments.into_multi_value(),
);

let ((), back_transfers) = self
let back_transfers = self
.tx()
.to(&to)
.typed(vault_proxy::VaultProxy)
.retrieve_funds(token, token_nonce, amount)
.execute_on_dest_context_with_back_transfers::<()>();
.returns(ReturnsBackTransfers)
.sync_call();

require!(
back_transfers.esdt_payments.len() == 1 || back_transfers.total_egld_amount != 0,
Expand Down

0 comments on commit c4ae976

Please sign in to comment.