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-530 check token owner on simple offer #878

Merged
merged 2 commits into from
Sep 16, 2024

Conversation

Nick95550
Copy link
Collaborator

This PR address an issue with the simple offer extrinsic in the marketplace pallet. The issue is that the extrinsic allows for simple offers to be made on tokens that have been burnt.

To fix this an additional check has been added to the pallet that checks the owner of the token of interest before processing. Returning an error NoTokenOwner in the failure case where the owner is None.

Related issue

PR checklist

  • Describe the added/changed/fixed/removed behaviour
  • Tag related issue(s)
  • Add appropriate unit tests and/or integration tests to the integration test repository

@Nick95550 Nick95550 force-pushed the TRN-530-prevent-offers-on-burnt-tokens branch from b0e6b29 to e216b63 Compare September 9, 2024 03:42
@Nick95550 Nick95550 changed the title check token owner on simple offer TRN-530 check token owner on simple offer Sep 9, 2024
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.

Nice work, few minor comments but otherwise looks great!

pallet/marketplace/src/impls.rs Outdated Show resolved Hide resolved
pallet/marketplace/src/lib.rs Outdated Show resolved Hide resolved
pallet/marketplace/src/tests.rs Show resolved Hide resolved
@Nick95550 Nick95550 force-pushed the TRN-530-prevent-offers-on-burnt-tokens branch from 25e8019 to edae085 Compare September 10, 2024 08:01
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 work man!

Copy link
Contributor

@surangap surangap left a comment

Choose a reason for hiding this comment

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

lgtm 👍

@Nick95550 Nick95550 merged commit cad5b7d into main Sep 16, 2024
2 checks passed
@Nick95550 Nick95550 deleted the TRN-530-prevent-offers-on-burnt-tokens branch September 16, 2024 22:07
@JasonTulp JasonTulp mentioned this pull request Sep 17, 2024
4 tasks
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.

3 participants