From e25275acc906480b9fe2d62ca69b1463b49c8720 Mon Sep 17 00:00:00 2001 From: Grigoriy Simonov Date: Wed, 07 Dec 2022 06:40:42 +0000 Subject: [PATCH] chore: fix code review requess --- --- a/pallets/fungible/src/common.rs +++ b/pallets/fungible/src/common.rs @@ -435,7 +435,7 @@ _operator: T::CrossAccountId, _approve: bool, ) -> DispatchResultWithPostInfo { - fail!(>::SettingApprovalForAllNotAllowed) + fail!(>::SettingAllowanceForAllNotAllowed) } fn allowance_for_all(&self, _owner: T::CrossAccountId, _operator: T::CrossAccountId) -> bool { --- a/pallets/fungible/src/lib.rs +++ b/pallets/fungible/src/lib.rs @@ -128,7 +128,7 @@ /// Setting item properties is not allowed. SettingPropertiesNotAllowed, /// Setting approval for all is not allowed. - SettingApprovalForAllNotAllowed, + SettingAllowanceForAllNotAllowed, } #[pallet::config] --- a/pallets/nonfungible/src/benchmarking.rs +++ b/pallets/nonfungible/src/benchmarking.rs @@ -226,14 +226,14 @@ set_allowance_for_all { bench_init!{ owner: sub; collection: collection(owner); - operator: cross_from_sub(owner); owner: cross_sub; + operator: cross_sub(owner); owner: cross_sub; }; }: {>::set_allowance_for_all(&collection, &owner, &operator, true)} allowance_for_all { bench_init!{ owner: sub; collection: collection(owner); - operator: cross_from_sub(owner); owner: cross_sub; + operator: cross_sub(owner); owner: cross_sub; }; }: {>::allowance_for_all(&collection, &owner, &operator)} } --- a/tests/src/interfaces/augment-api-errors.ts +++ b/tests/src/interfaces/augment-api-errors.ts @@ -388,7 +388,7 @@ /** * Setting approval for all is not allowed. **/ - SettingApprovalForAllNotAllowed: AugmentedError; + SettingAllowanceForAllNotAllowed: AugmentedError; /** * Setting item properties is not allowed. **/ --- a/tests/src/interfaces/default/types.ts +++ b/tests/src/interfaces/default/types.ts @@ -1605,8 +1605,8 @@ readonly isFungibleItemsDontHaveData: boolean; readonly isFungibleDisallowsNesting: boolean; readonly isSettingPropertiesNotAllowed: boolean; - readonly isSettingApprovalForAllNotAllowed: boolean; - readonly type: 'NotFungibleDataUsedToMintFungibleCollectionToken' | 'FungibleItemsHaveNoId' | 'FungibleItemsDontHaveData' | 'FungibleDisallowsNesting' | 'SettingPropertiesNotAllowed' | 'SettingApprovalForAllNotAllowed'; + readonly isSettingAllowanceForAllNotAllowed: boolean; + readonly type: 'NotFungibleDataUsedToMintFungibleCollectionToken' | 'FungibleItemsHaveNoId' | 'FungibleItemsDontHaveData' | 'FungibleDisallowsNesting' | 'SettingPropertiesNotAllowed' | 'SettingAllowanceForAllNotAllowed'; } /** @name PalletInflationCall */ --- a/tests/src/interfaces/lookup.ts +++ b/tests/src/interfaces/lookup.ts @@ -3451,7 +3451,7 @@ * Lookup430: pallet_fungible::pallet::Error **/ PalletFungibleError: { - _enum: ['NotFungibleDataUsedToMintFungibleCollectionToken', 'FungibleItemsHaveNoId', 'FungibleItemsDontHaveData', 'FungibleDisallowsNesting', 'SettingPropertiesNotAllowed', 'SettingApprovalForAllNotAllowed'] + _enum: ['NotFungibleDataUsedToMintFungibleCollectionToken', 'FungibleItemsHaveNoId', 'FungibleItemsDontHaveData', 'FungibleDisallowsNesting', 'SettingPropertiesNotAllowed', 'SettingAllowanceForAllNotAllowed'] }, /** * Lookup431: pallet_refungible::ItemData --- a/tests/src/interfaces/types-lookup.ts +++ b/tests/src/interfaces/types-lookup.ts @@ -3663,8 +3663,8 @@ readonly isFungibleItemsDontHaveData: boolean; readonly isFungibleDisallowsNesting: boolean; readonly isSettingPropertiesNotAllowed: boolean; - readonly isSettingApprovalForAllNotAllowed: boolean; - readonly type: 'NotFungibleDataUsedToMintFungibleCollectionToken' | 'FungibleItemsHaveNoId' | 'FungibleItemsDontHaveData' | 'FungibleDisallowsNesting' | 'SettingPropertiesNotAllowed' | 'SettingApprovalForAllNotAllowed'; + readonly isSettingAllowanceForAllNotAllowed: boolean; + readonly type: 'NotFungibleDataUsedToMintFungibleCollectionToken' | 'FungibleItemsHaveNoId' | 'FungibleItemsDontHaveData' | 'FungibleDisallowsNesting' | 'SettingPropertiesNotAllowed' | 'SettingAllowanceForAllNotAllowed'; } /** @name PalletRefungibleItemData (431) */ -- gitstuff