🐛 Depositing PalletAttributeSet on incorrect nft#2740
🐛 Depositing PalletAttributeSet on incorrect nft#2740ggwpez merged 9 commits intoparitytech:masterfrom
Conversation
jsidorenko
left a comment
There was a problem hiding this comment.
Agree, semantically it's better to emit the event with the params you've added.
|
@vikiival can you add a test? |
liamaharon
left a comment
There was a problem hiding this comment.
LGTM once test is added
Will try ^-^ 💯 |
|
Ty @vikiival! Just search for |
|
Hello, However, this issue prevents from correctly indexing NFT events from the chain 🥺. Therefore I would like to ask if someone more capable is able to write the test or if we can merge it as it is minor change |
Done, test added |
|
@bkchr @liamaharon can we merge? 🥺🥹 |
## Context Implementing `HolderOf(collection_id)` we have observed a fancy glitch where pallet deposits event with incorrect values ### Test case [Observe following extrinsic](https://assethub-polkadot.subscan.io/extrinsic/0xdc72321b7674aa209c2f194ed49bd6bd12708af103f98b5b9196e0132dcba777) To mint in collection `51` user needs to be `HolderOf(50)`. Therefore current user is owner of item `394` `witness_data { owned_item: 394 }` All checking is done correctly, storage is updated correctly  However the event which is emitted does not make semantic sense as we updated storage for `50-394` not for `51-114`  ## The fix This PR fixes that depositing `PalletAttributeSet` emits correct values. --------- Co-authored-by: Jegor Sidorenko <[email protected]> Co-authored-by: Jegor Sidorenko <[email protected]>
## Context Implementing `HolderOf(collection_id)` we have observed a fancy glitch where pallet deposits event with incorrect values ### Test case [Observe following extrinsic](https://assethub-polkadot.subscan.io/extrinsic/0xdc72321b7674aa209c2f194ed49bd6bd12708af103f98b5b9196e0132dcba777) To mint in collection `51` user needs to be `HolderOf(50)`. Therefore current user is owner of item `394` `witness_data { owned_item: 394 }` All checking is done correctly, storage is updated correctly  However the event which is emitted does not make semantic sense as we updated storage for `50-394` not for `51-114`  ## The fix This PR fixes that depositing `PalletAttributeSet` emits correct values. --------- Co-authored-by: Jegor Sidorenko <[email protected]> Co-authored-by: Jegor Sidorenko <[email protected]>
* remove no longer valid check from the ensure_weights_are_correct * fix compilation

Context
Implementing
HolderOf(collection_id)we have observed a fancy glitch where pallet deposits event with incorrect valuesTest case
Observe following extrinsic
To mint in collection
51user needs to beHolderOf(50).Therefore current user is owner of item
394witness_data { owned_item: 394 }All checking is done correctly, storage is updated correctly
However the event which is emitted does not make semantic sense as we updated storage for
50-394not for51-114The fix
This PR fixes that depositing
PalletAttributeSetemits correct values.