pub(crate) fn internal_send_tokens(
        &self,
        sender_id: &AccountId,
        token_id: &AccountId,
        amount: Balance,
    ) -> Promise {
        ext_fungible_token::ft_transfer(
            sender_id.clone(),
            U128(amount),
            None,
            token_id,
            1,
            GAS_FOR_FT_TRANSFER,
        )
        .then(ext_self::exchange_callback_post_withdraw(
            token_id.clone(),
            sender_id.clone(),
            U128(amount),
            &env::current_account_id(),
            0,
            GAS_FOR_RESOLVE_TRANSFER,
        ))
    }
/// Sends given amount to given user and if it fails, returns it back to user's balance.
/// Tokens must already be subtracted from internal balance.
Sends given amount to given user and if it fails, returns it back to user's balance.
Tokens must already be subtracted from internal balance.
Sends given amount to given user and if it fails returns it back to user ' s balance . Tokens must already be subtracted from internal balance .
pub(crate) fn internal_send_tokens(
        &self,
        sender_id: &AccountId,
        token_id: &AccountId,
        amount: Balance,
    ) -> Promise {
        ext_fungible_token::ft_transfer(
            sender_id.clone(),
            U128(amount),
            None,
            token_id,
            1,
            GAS_FOR_FT_TRANSFER,
        )
        .then(ext_self::exchange_callback_post_withdraw(
            token_id.clone(),
            sender_id.clone(),
            U128(amount),
            &env::current_account_id(),
            0,
            GAS_FOR_RESOLVE_TRANSFER,
        ))
    }
pub ( crate ) fn internal_send_tokens ( & self , sender_id : & AccountId , token_id : & AccountId , amount : Balance , ) -> Promise { ext_fungible_token :: ft_transfer ( sender_id . clone ( ) , U128 ( amount ) , None , token_id , 1 , GAS_FOR_FT_TRANSFER , ) . then ( ext_self :: exchange_callback_post_withdraw ( token_id . clone ( ) , sender_id . clone ( ) , U128 ( amount ) , & env :: current_account_id ( ) , 0 , GAS_FOR_RESOLVE_TRANSFER , ) ) }
Sends given amount to given user and if it fails, returns it back to user's balance.
Sends given amount to given user and if it fails returns it back to user ' s balance .
&self
sender_id
&AccountId
token_id
&AccountId
amount
Balance
&self
sender_id
&AccountId
token_id
&AccountId
amount
Balance