Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion pallets/flexible-fee/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ use bifrost_primitives::{
use bifrost_xcm_interface::calls::{PolkadotXcmCall, RelaychainCall};
use core::convert::Into;
use cumulus_primitives_core::ParaId;
use frame_support::traits::tokens::WithdrawConsequence;
use frame_support::traits::ExistenceRequirement;
use frame_support::{
dispatch::PostDispatchInfo,
Expand Down Expand Up @@ -603,7 +604,10 @@ impl<T: Config> Pallet<T> {
for currency_id in fee_currency_list {
// If it is mainnet currency
if currency_id == BNC {
if T::MultiCurrency::ensure_can_withdraw(currency_id, who, fee_amount).is_ok() {
if matches!(
<T::MultiCurrency>::can_withdraw(currency_id, who, fee_amount),
WithdrawConsequence::Success
) {
return Ok((currency_id, fee_amount, Price::one(), Price::one()));
}
} else {
Expand Down