Skip to content
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

TRN-400 Emit event when listing is closed from accepted offer #880

Merged
merged 2 commits into from
Oct 6, 2024

Conversation

JCSanPedro
Copy link
Collaborator

@JCSanPedro JCSanPedro commented Sep 19, 2024

This PR modifies the accept_offer impl in the marketplace pallet so that it emits a FixedPriceSaleClose event in the case an offer is accepted, whilst a listing for that token already exists.

This allows front-end experiences to track this particular event when it occurs.

Copy link
Contributor

@JasonTulp JasonTulp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm! Nice job

@JasonTulp
Copy link
Contributor

Btw updating benchmarks for every PR isn't required, only if you add extra storage writes or reads for an extrinsic, otherwise the changes in benchmarks would be negligible

@JCSanPedro JCSanPedro force-pushed the TRN-400-accept-offer-listing-event branch from 7831fcb to e34744d Compare September 24, 2024 03:23
@JCSanPedro
Copy link
Collaborator Author

Btw updating benchmarks for every PR isn't required, only if you add extra storage writes or reads for an extrinsic, otherwise the changes in benchmarks would be negligible

Ah I run the benchmark as I thought emitting an extra event would contribute to the weight.

@surangap surangap merged commit 2818cb0 into main Oct 6, 2024
2 checks passed
@surangap surangap deleted the TRN-400-accept-offer-listing-event branch October 6, 2024 20:58
@zees-dev zees-dev mentioned this pull request Oct 9, 2024
4 tasks
Nick95550 pushed a commit that referenced this pull request Oct 9, 2024
* emit FixedPriceSaleClose event if token is listed and offer is accepted

* add OfferAccept variant for FixedPriceClosureReason
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants