--- a/pallets/proxy-rmrk-core/src/lib.rs +++ b/pallets/proxy-rmrk-core/src/lib.rs @@ -389,17 +389,15 @@ let collection = Self::get_typed_nft_collection(collection_id, misc::CollectionType::Regular)?; - if !Self::get_nft_property_decoded(collection_id, nft_id, RmrkProperty::Transferable)? { - return Err(>::NonTransferable.into()); - } + ensure!( + Self::get_nft_property_decoded(collection_id, nft_id, RmrkProperty::Transferable)?, + >::NonTransferable + ); - if Self::get_nft_property_decoded( - collection_id, - nft_id, - RmrkProperty::PendingNftAccept, - )? { - return Err(>::NoPermission.into()); - } + ensure!( + !Self::get_nft_property_decoded(collection_id, nft_id, RmrkProperty::PendingNftAccept)?, + >::NoPermission + ); let target_owner;