mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 03:27:58 +00:00
Rename pallet trait Trait to Config (#7599)
* rename Trait to Config * add test asserting using Trait is still valid. * fix ui tests
This commit is contained in:
committed by
GitHub
parent
dd3c84c362
commit
1cbfc9257f
@@ -16,7 +16,7 @@
|
||||
// limitations under the License.
|
||||
|
||||
use codec::{Encode, Decode};
|
||||
use crate::Trait;
|
||||
use crate::Config;
|
||||
use frame_support::{
|
||||
weights::DispatchInfo,
|
||||
StorageMap,
|
||||
@@ -35,16 +35,16 @@ use sp_std::vec;
|
||||
/// Note that this does not set any priority by default. Make sure that AT LEAST one of the signed
|
||||
/// extension sets some kind of priority upon validating transactions.
|
||||
#[derive(Encode, Decode, Clone, Eq, PartialEq)]
|
||||
pub struct CheckNonce<T: Trait>(#[codec(compact)] T::Index);
|
||||
pub struct CheckNonce<T: Config>(#[codec(compact)] T::Index);
|
||||
|
||||
impl<T: Trait> CheckNonce<T> {
|
||||
impl<T: Config> CheckNonce<T> {
|
||||
/// utility constructor. Used only in client/factory code.
|
||||
pub fn from(nonce: T::Index) -> Self {
|
||||
Self(nonce)
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: Trait> sp_std::fmt::Debug for CheckNonce<T> {
|
||||
impl<T: Config> sp_std::fmt::Debug for CheckNonce<T> {
|
||||
#[cfg(feature = "std")]
|
||||
fn fmt(&self, f: &mut sp_std::fmt::Formatter) -> sp_std::fmt::Result {
|
||||
write!(f, "CheckNonce({})", self.0)
|
||||
@@ -56,7 +56,7 @@ impl<T: Trait> sp_std::fmt::Debug for CheckNonce<T> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: Trait> SignedExtension for CheckNonce<T> where
|
||||
impl<T: Config> SignedExtension for CheckNonce<T> where
|
||||
T::Call: Dispatchable<Info=DispatchInfo>
|
||||
{
|
||||
type AccountId = T::AccountId;
|
||||
|
||||
Reference in New Issue
Block a user