-
Notifications
You must be signed in to change notification settings - Fork 993
Open
Labels
I10-unconfirmedIssue might be valid, but it's not yet known.Issue might be valid, but it's not yet known.I2-bugThe node fails to follow expected behavior.The node fails to follow expected behavior.
Description
Is there an existing issue?
- I have searched the existing issues
Experiencing problems? Have you tried our Stack Exchange first?
- This is not a support question.
Description of bug
If an item's metadata or attributes are "locked", they cannot be "unlocked" later:
polkadot-sdk/substrate/frame/nfts/src/lib.rs
Line 1379 in 607a1b2
/// When the metadata or attributes are locked, it won't be possible the unlock them. |
However, the ItemPropertiesLocked
event is emitted with parameters that mirror the input values rather than the actual state changes.
When executing lock_item_properties
on an item with already locked metadata or attributes, and setting lock_metadata
or lock_attributes
to false:
- The locked values stay locked, which is correct
- The transaction succeeds, which is controversial
- The ItemPropertiesLocked event indicates an unlocked state, which is misleading
Steps to reproduce
- Create a collection with default settings
- Create an item for a collection
- Execute
lockItemProperties
- set true forlockMetadata
andlockAttributes
- Execute
lockItemProperties
- set false forlockMetadata
andlockAttributes
Check that the ItemPropertiesLocked
event is emitted with lockMetadata: false
and lockAttributes: false
Metadata
Metadata
Assignees
Labels
I10-unconfirmedIssue might be valid, but it's not yet known.Issue might be valid, but it's not yet known.I2-bugThe node fails to follow expected behavior.The node fails to follow expected behavior.