Skip to content

Commit

Permalink
fix: rm Default requirement for AccountId types
Browse files Browse the repository at this point in the history
  • Loading branch information
wischli committed Feb 25, 2022
1 parent e3aa793 commit a673dfe
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pallets/did/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ pub mod pallet {
+ DeriveDidCallAuthorizationVerificationKeyRelationship;

/// Type for a DID subject identifier.
type DidIdentifier: Parameter + Default + DidVerifiableIdentifier + MaxEncodedLen;
type DidIdentifier: Parameter + DidVerifiableIdentifier + MaxEncodedLen;

/// Origin type expected by the proxied dispatchable calls.
#[cfg(not(feature = "runtime-benchmarks"))]
Expand Down
2 changes: 0 additions & 2 deletions pallets/did/src/origin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ impl<OuterOrigin, DidIdentifier, AccountId> EnsureOrigin<OuterOrigin> for Ensure
where
OuterOrigin: Into<Result<DidRawOrigin<DidIdentifier, AccountId>, OuterOrigin>>
+ From<DidRawOrigin<DidIdentifier, AccountId>>,
DidIdentifier: Default,
AccountId: Default,
{
type Success = DidRawOrigin<DidIdentifier, AccountId>;

Expand Down
2 changes: 1 addition & 1 deletion pallets/pallet-did-lookup/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ pub mod pallet {
type OriginSuccess: CallSources<AccountIdOf<Self>, DidIdentifierOf<Self>>;

/// The identifier to which accounts can get associated.
type DidIdentifier: Parameter + Default + MaxEncodedLen;
type DidIdentifier: Parameter + MaxEncodedLen;

/// The currency that is used to reserve funds for each did.
type Currency: ReservableCurrency<AccountIdOf<Self>>;
Expand Down
2 changes: 1 addition & 1 deletion pallets/pallet-web3-names/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ pub mod pallet {
+ TryFrom<Vec<u8>, Error = Error<Self>>
+ MaxEncodedLen;
/// The type of a name owner.
type Web3NameOwner: Parameter + Default + MaxEncodedLen;
type Web3NameOwner: Parameter + MaxEncodedLen;
/// Weight information for extrinsics in this pallet.
type WeightInfo: WeightInfo;
}
Expand Down
2 changes: 1 addition & 1 deletion support/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ pub mod mock_origin {
}
}

#[derive(Debug, Clone, PartialEq, Eq, Encode, Decode, TypeInfo, Default, MaxEncodedLen)]
#[derive(Debug, Clone, PartialEq, Eq, Encode, Decode, TypeInfo, MaxEncodedLen)]
pub struct SubjectId(pub AccountId32);

impl From<AccountId32> for SubjectId {
Expand Down

0 comments on commit a673dfe

Please sign in to comment.