-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: Critical: Item market entry remains in market storage node upon succesful buyItem call #53
Comments
This enebles us to exclude certain category/rarity combinations from the item shop. Currently excluding legendary hair items due to #53 - [x] cleaned up item-shop data - [x] added const for filtering out by `[[Category, Rarity[]]]` - [x] implemented filters in item-shop - [x] update view --------- Co-authored-by: Xabier Almazor <[email protected]> Co-authored-by: Xabier Almazor <[email protected]> Co-authored-by: Wietze <[email protected]> Co-authored-by: Xabier Almazor Telek <[email protected]> Co-authored-by: Pandelis Symeonidis <[email protected]> Co-authored-by: Axel Verheul <[email protected]> Co-authored-by: Pandelis Symeonidis <[email protected]>
Code from #61 is called in the |
@Pandelissym was able to reproduce this locally. After validating the offers and reallocating the assets, the // Update metrics
marketFacet.updateMetrics('item', {
marketplaceAverageLevel: {
type: 'remove',
value: sellRecord.asset.level,
},
});
// Remove market entry
market.itemEntries.delete(sellRecord.id);
void marketFacet.deleteNode(
sellRecord.recorderKit.recorder.getStorageNode(),
); #61 can cause marketplaceAverageLevel: M.splitRecord({
type: M.or('add', 'remove'),
value: M.gte(0),
}), Since |
Fixed marketplaceAverageLevel metric. For items, this metric was being calculated incorrectly. This lead to specific cases where the metric might become a negative value after updating. This would violate the typeguard of the metric which expects it to be greater or equal than 0 and an error would be thrown. This means the buy item flow would not complete hence why the item would still remain in the market state. Fixes 2 bugs: 1. #61 2. #53 Co-authored-by: Pandelis Symeonidis <[email protected]>
Description
We encountered this issue when purchasing a legendary hair item, the buy flow worked as expected (item was moved to buyers wallet, displayed in inventory, and can be equipped/unequipped). The market entry however, remains in the market path on the storageNode despite having been sold. This results in a "ghost" entry that can never be bought since the item is no longer on contract.
To be clear: this bug does not compromise offer safety nor does it allow unwanted behavior in regards to token transfers. It simply polutes the market list with entries that are no longer available.
Repro steps
The cause of the bug is unclear and there's currently no way to reproduce it consistently
That being said, I can verify the following market entry has been correctly fulfilled, and remains in the storageNode
Acceptance criteria
The text was updated successfully, but these errors were encountered: