pub fn do_asset_withdraw(
			asset: &bridge::ResourceId,
			sender: &T::AccountId,
			amount: BalanceOf<T>,
		) -> Option<BalanceOf<T>> {
			let bridge_id = <bridge::Pallet<T>>::account_id();
			let holding_balance = BridgeBalances::<T>::get(asset, &bridge_id).unwrap_or_default();
			let recipient_balance = BridgeBalances::<T>::get(asset, sender).unwrap_or_default();

			BridgeBalances::<T>::insert(asset, sender, recipient_balance.checked_sub(&amount)?);
			BridgeBalances::<T>::insert(asset, &bridge_id, holding_balance.checked_add(&amount)?);

			Some(amount)
		}
/// Withdraw specific amount assets from sender.
///
/// Assets would be withdrawn from the sender and then deposit to bridge account.
/// Bridge account is treat as holding account of all assets.
///
/// DO NOT guarantee asset was registered
/// DO NOT grarantee sender account has enough balance
Withdraw specific amount assets from sender.
Assets would be withdrawn from the sender and then deposit to bridge account.
Bridge account is treat as holding account of all assets.

DO NOT guarantee asset was registered
DO NOT grarantee sender account has enough balance
Withdraw specific amount assets from sender . Assets would be withdrawn from the sender and then deposit to bridge account . Bridge account is treat as holding account of all assets . DO NOT guarantee asset was registered DO NOT grarantee sender account has enough balance
pub fn do_asset_withdraw(
			asset: &bridge::ResourceId,
			sender: &T::AccountId,
			amount: BalanceOf<T>,
		) -> Option<BalanceOf<T>> {
			let bridge_id = <bridge::Pallet<T>>::account_id();
			let holding_balance = BridgeBalances::<T>::get(asset, &bridge_id).unwrap_or_default();
			let recipient_balance = BridgeBalances::<T>::get(asset, sender).unwrap_or_default();
			BridgeBalances::<T>::insert(asset, sender, recipient_balance.checked_sub(&amount)?);
			BridgeBalances::<T>::insert(asset, &bridge_id, holding_balance.checked_add(&amount)?);
			Some(amount)
		}
pub fn do_asset_withdraw ( asset : & bridge :: ResourceId , sender : & T :: AccountId , amount : BalanceOf < T > , ) -> Option < BalanceOf < T > > { let bridge_id = < bridge :: Pallet < T > > :: account_id ( ) ; let holding_balance = BridgeBalances :: < T > :: get ( asset , & bridge_id ) . unwrap_or_default ( ) ; let recipient_balance = BridgeBalances :: < T > :: get ( asset , sender ) . unwrap_or_default ( ) ; BridgeBalances :: < T > :: insert ( asset , sender , recipient_balance . checked_sub ( & amount ) ? ) ; BridgeBalances :: < T > :: insert ( asset , & bridge_id , holding_balance . checked_add ( & amount ) ? ) ; Some ( amount ) }
Withdraw specific amount assets from sender.
Withdraw specific amount assets from sender .
asset
&bridge::ResourceId
sender
&T::AccountId
amount
BalanceOf<T>
asset
&bridge::ResourceId
sender
&T::AccountId
amount
BalanceOf<T>