@@ -23,16 +23,14 @@ use did::{
23
23
} ;
24
24
use frame_system:: EnsureRoot ;
25
25
use 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 ,
30
28
} ;
31
29
use sp_core:: ConstBool ;
32
30
33
31
use crate :: {
34
32
weights:: { self , rocksdb_weights:: constants:: RocksDbWeight } ,
35
- Balances , DotNames , Migration , Runtime , RuntimeCall , RuntimeEvent , RuntimeHoldReason , RuntimeOrigin , UniqueLinking ,
33
+ Balances , Migration , Runtime , RuntimeCall , RuntimeEvent , RuntimeHoldReason , RuntimeOrigin ,
36
34
} ;
37
35
38
36
#[ cfg( test) ]
@@ -198,7 +196,15 @@ impl pallet_did_lookup::Config for Runtime {
198
196
199
197
pub ( crate ) type UniqueLinkingDeployment = pallet_did_lookup:: Instance2 ;
200
198
impl 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
+
202
208
type BalanceMigrationManager = ( ) ;
203
209
type Currency = Balances ;
204
210
type Deposit = constants:: did_lookup:: DidLookupDeposit ;
@@ -238,7 +244,13 @@ pub(crate) type DotNamesDeployment = pallet_web3_names::Instance2;
238
244
impl pallet_web3_names:: Config < DotNamesDeployment > for Runtime {
239
245
type BalanceMigrationManager = ( ) ;
240
246
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
+
242
254
type Currency = Balances ;
243
255
type Deposit = constants:: dot_names:: Web3NameDeposit ;
244
256
type MaxNameLength = constants:: dot_names:: MaxNameLength ;
0 commit comments