mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-20 22:05:42 +00:00
Add FixedPointOperand blanket implementation (#14634)
* bound `Balance` to `FixedPointOperand` * ".git/.scripts/commands/fmt/fmt.sh" * clean up code * Apply suggestions from code review Co-authored-by: Gavin Wood <gavin@parity.io> * wip * add blanket `FixedPointOperand` impl * update nis CurrencyBalance * remove CheckedNeg bound --------- Co-authored-by: command-bot <> Co-authored-by: Gavin Wood <gavin@parity.io>
This commit is contained in:
@@ -56,7 +56,6 @@ use sp_runtime::{
|
||||
transaction_validity::{
|
||||
InvalidTransaction, TransactionValidity, TransactionValidityError, ValidTransaction,
|
||||
},
|
||||
FixedPointOperand,
|
||||
};
|
||||
|
||||
#[cfg(test)]
|
||||
@@ -156,8 +155,8 @@ pub struct ChargeAssetTxPayment<T: Config> {
|
||||
impl<T: Config> ChargeAssetTxPayment<T>
|
||||
where
|
||||
T::RuntimeCall: Dispatchable<Info = DispatchInfo, PostInfo = PostDispatchInfo>,
|
||||
AssetBalanceOf<T>: Send + Sync + FixedPointOperand,
|
||||
BalanceOf<T>: Send + Sync + FixedPointOperand + IsType<ChargeAssetBalanceOf<T>>,
|
||||
AssetBalanceOf<T>: Send + Sync,
|
||||
BalanceOf<T>: Send + Sync + IsType<ChargeAssetBalanceOf<T>>,
|
||||
ChargeAssetIdOf<T>: Send + Sync,
|
||||
Credit<T::AccountId, T::Fungibles>: IsType<ChargeAssetLiquidityOf<T>>,
|
||||
{
|
||||
@@ -213,8 +212,8 @@ impl<T: Config> sp_std::fmt::Debug for ChargeAssetTxPayment<T> {
|
||||
impl<T: Config> SignedExtension for ChargeAssetTxPayment<T>
|
||||
where
|
||||
T::RuntimeCall: Dispatchable<Info = DispatchInfo, PostInfo = PostDispatchInfo>,
|
||||
AssetBalanceOf<T>: Send + Sync + FixedPointOperand,
|
||||
BalanceOf<T>: Send + Sync + From<u64> + FixedPointOperand + IsType<ChargeAssetBalanceOf<T>>,
|
||||
AssetBalanceOf<T>: Send + Sync,
|
||||
BalanceOf<T>: Send + Sync + From<u64> + IsType<ChargeAssetBalanceOf<T>>,
|
||||
ChargeAssetIdOf<T>: Send + Sync,
|
||||
Credit<T::AccountId, T::Fungibles>: IsType<ChargeAssetLiquidityOf<T>>,
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user