Experiencing problems? Have you tried our Stack Exchange first?
[X] This is not a support question.
Description of bug
When using the frame_support::traits::tokens::nonfungibles_v2::Inspect/Mutate traits implementation in pallet-nfts, there is a discrepancy between the AttributeNamespace used for storing and retrieving collection attributes.
The result is that no data is found when trying to retrieve a previously stored value. The methods should be using the same namespace, probably CollectionOwner is the most appropriate.
Steps to reproduce
<T as Config>::Nonfungible::set_collection_attribute(collection, key, value)?;
let result = <T as Config>::Nonfungible::collection_attribute(collection, key);
The result will be None instead of the expected Some(value).
Is there an existing issue?
Experiencing problems? Have you tried our Stack Exchange first?
Description of bug
When using the
frame_support::traits::tokens::nonfungibles_v2::Inspect
/Mutate
traits implementation in pallet-nfts, there is a discrepancy between theAttributeNamespace
used for storing and retrieving collection attributes.The setter
fn set_collection_attribute
usesAttributeNamespace::Pallet
whereas the getterfn collection_attribute
usesAttributeNamespace::CollectionOwner
.The result is that no data is found when trying to retrieve a previously stored value. The methods should be using the same namespace, probably
CollectionOwner
is the most appropriate.Steps to reproduce
The
result
will beNone
instead of the expectedSome(value)
.