@@ -23,16 +23,14 @@ use did::{
2323} ;
2424use frame_system:: EnsureRoot ;
2525use runtime_common:: {
26- constants,
27- did:: EnsureNoLinkedAccountDeletionHook ,
28- dot_names:: { AllowedDotNameClaimer , AllowedUniqueLinkingAssociator } ,
29- AccountId , DidIdentifier , EnsureNoLinkedWeb3NameDeletionHook , SendDustAndFeesToTreasury ,
26+ constants, did:: EnsureNoLinkedAccountDeletionHook , AccountId , DidIdentifier , EnsureNoLinkedWeb3NameDeletionHook ,
27+ SendDustAndFeesToTreasury ,
3028} ;
3129use sp_core:: ConstBool ;
3230
3331use crate :: {
3432 weights:: { self , rocksdb_weights:: constants:: RocksDbWeight } ,
35- Balances , DotNames , Migration , Runtime , RuntimeCall , RuntimeEvent , RuntimeHoldReason , RuntimeOrigin , UniqueLinking ,
33+ Balances , Migration , Runtime , RuntimeCall , RuntimeEvent , RuntimeHoldReason , RuntimeOrigin ,
3634} ;
3735
3836#[ cfg( test) ]
@@ -198,7 +196,15 @@ impl pallet_did_lookup::Config for Runtime {
198196
199197pub ( crate ) type UniqueLinkingDeployment = pallet_did_lookup:: Instance2 ;
200198impl pallet_did_lookup:: Config < UniqueLinkingDeployment > for Runtime {
201- type AssociateOrigin = EnsureDidOrigin < DidIdentifier , AccountId , AllowedUniqueLinkingAssociator < UniqueLinking > > ;
199+ #[ cfg( not( feature = "runtime-benchmarks" ) ) ]
200+ type AssociateOrigin = EnsureDidOrigin <
201+ DidIdentifier ,
202+ AccountId ,
203+ runtime_common:: dot_names:: AllowedUniqueLinkingAssociator < crate :: UniqueLinking > ,
204+ > ;
205+ #[ cfg( feature = "runtime-benchmarks" ) ]
206+ type AssociateOrigin = EnsureDidOrigin < DidIdentifier , AccountId , did:: origin:: Everyone > ;
207+
202208 type BalanceMigrationManager = ( ) ;
203209 type Currency = Balances ;
204210 type Deposit = constants:: did_lookup:: DidLookupDeposit ;
@@ -238,7 +244,13 @@ pub(crate) type DotNamesDeployment = pallet_web3_names::Instance2;
238244impl pallet_web3_names:: Config < DotNamesDeployment > for Runtime {
239245 type BalanceMigrationManager = ( ) ;
240246 type BanOrigin = EnsureRoot < AccountId > ;
241- type ClaimOrigin = EnsureDidOrigin < DidIdentifier , AccountId , AllowedDotNameClaimer < DotNames > > ;
247+
248+ #[ cfg( not( feature = "runtime-benchmarks" ) ) ]
249+ type ClaimOrigin =
250+ EnsureDidOrigin < DidIdentifier , AccountId , runtime_common:: dot_names:: AllowedDotNameClaimer < crate :: DotNames > > ;
251+ #[ cfg( feature = "runtime-benchmarks" ) ]
252+ type ClaimOrigin = EnsureDidOrigin < DidIdentifier , AccountId , did:: origin:: Everyone > ;
253+
242254 type Currency = Balances ;
243255 type Deposit = constants:: dot_names:: Web3NameDeposit ;
244256 type MaxNameLength = constants:: dot_names:: MaxNameLength ;
0 commit comments