Skip to content

Commit

Permalink
Rename mint param
Browse files Browse the repository at this point in the history
Signed-off-by: Dengjianping <djptux@gmail.com>
  • Loading branch information
Dengjianping committed Jul 11, 2022
1 parent a6dbf82 commit adf68f8
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions primitives/src/assets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ where
asset_id: AssetId,
account: &C::AccountId,
amount: Balance,
mint: bool,
will_increase_total_supply: bool,
) -> Result<(), FungibleLedgerError>;

/// Check whether `account` can decrease its balance by `amount` in the given `asset_id`.
Expand Down Expand Up @@ -390,14 +390,17 @@ where
asset_id: AssetId,
account: &C::AccountId,
amount: Balance,
mint: bool,
will_increase_total_supply: bool,
) -> Result<(), FungibleLedgerError> {
Self::ensure_valid(asset_id)?;
FungibleLedgerError::from_deposit(if asset_id == A::NativeAssetId::get() {
<Native as FungibleInspect<C::AccountId>>::can_deposit(account, amount, false)
} else {
<NonNative as FungiblesInspect<C::AccountId>>::can_deposit(
asset_id, account, amount, mint,
asset_id,
account,
amount,
will_increase_total_supply,
)
})
}
Expand Down

0 comments on commit adf68f8

Please sign in to comment.