Skip to content

Conversation

@albertfolch-redeemeum
Copy link
Contributor

@albertfolch-redeemeum albertfolch-redeemeum commented Apr 21, 2023

  • feat: relist offer
  • improved types
  • fixed width of draft modal: it got too big in big screens
  • fix loading spinner when you want to export exchanges with delivery data: if you clicked on the button and then cancel the confirmation of the transaction to enable identity, then the loading spinner was not removed
  • fix datepicker so that if you dont specify an initial date, you see the "Choose date..." text & if you click on a disable date, you see the same text
  • extracted the logic to create an offer/s into an useCreateOffers hook
  • remove useless code
  • fixed low priority error you get after creating an offer and seeing the success modal (BigNumber error in console if the offer is not token gated)
  • fix: in the modal to export the exchange delivery data, changed the initial value to the beginning of the month & remove disable behaviour on the export in option 2
  • fix: style/overflow of export exchanges with delivery data modal (calendar of the datepicker was being cut off)

@albertfolch-redeemeum albertfolch-redeemeum requested a review from a team April 21, 2023 15:15
@albertfolch-redeemeum albertfolch-redeemeum linked an issue Apr 21, 2023 that may be closed by this pull request
@albertfolch-redeemeum albertfolch-redeemeum marked this pull request as draft April 21, 2023 15:15
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Apr 21, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: f61df30
Status: ✅  Deploy successful!
Preview URL: https://bdcb0ecd.interface-a9d.pages.dev
Branch Preview URL: https://568-offer-relist.interface-a9d.pages.dev

View logs

@albertfolch-redeemeum albertfolch-redeemeum changed the base branch from main to mvfw-2023 April 21, 2023 15:23
@albertfolch-redeemeum albertfolch-redeemeum changed the base branch from mvfw-2023 to main April 21, 2023 15:24
@albertfolch-redeemeum albertfolch-redeemeum self-assigned this Apr 21, 2023
@albertfolch-redeemeum albertfolch-redeemeum marked this pull request as ready for review April 21, 2023 15:24
@levalleux-ludo
Copy link
Member

levalleux-ludo commented Apr 21, 2023

@levalleux-ludo
Copy link
Member

What happen if I relist an offer that is still valid?
Is the old one voided?
How is the dApp supporting such a case?

@albertfolch-redeemeum
Copy link
Contributor Author

What happen if I relist an offer that is still valid? Is the old one voided? How is the dApp supporting such a case?

you can relist any offer, no restrictions and no side effects

@albertfolch-redeemeum
Copy link
Contributor Author

A bit confused here: https://api.thegraph.com/subgraphs/name/bosonprotocol/mumbai-testing/graphql?query=query+MyQuery+%7B%0A++productV1Products%28%0A++++where%3A+%7Buuid_in%3A+%5B"1584b4c-0217-68a0-e0a4-b82b02708fd2"%2C+"0b657a3-7302-e733-af74-37d08806cc7c"%5D%7D%0A++%29+%7B%0A++++id%0A++++variants+%7B%0A++++++offer+%7B%0A++++++++id%0A++++++++metadataUri%0A++++++++metadataHash%0A++++++++metadata+%7B%0A++++++++++name%0A++++++++++...+on+ProductV1MetadataEntity+%7B%0A++++++++++++id%0A++++++++++++name%0A++++++++++++uuid%0A++++++++++++productV1Seller+%7B%0A++++++++++++++name%0A++++++++++++++externalUrl%0A++++++++++++%7D%0A++++++++++++licenseUrl%0A++++++++++%7D%0A++++++++%7D%0A++++++%7D%0A++++%7D%0A++%7D%0A%7D

The 2 offers are the one that was expired and the relisted one. The 2 offers have the same UUID But the product UUID is different. I think it should be the opposite:

  • offer UUID should be different as the offer ID are different on-chain
  • product UUID should be the same (?) as the offer just relist the same product with the same variations.

The 2 offers have the same UUID

this is a bug

product UUID should be the same (?) as the offer just relist the same product with the same variations.

why the same? I think it should be different, everything different, just different dates...basically the same behaviour as if you were to create the same product using local storage and setting the dates differently (no actual relationship with the 'old' offer) ...maybe it should be called 'duplicate' instead of 'relist' then

@levalleux-ludo
Copy link
Member

levalleux-ludo commented Apr 21, 2023

A bit confused here: https://api.thegraph.com/subgraphs/name/bosonprotocol/mumbai-testing/graphql?query=query+MyQuery+%7B%0A++productV1Products%28%0A++++where%3A+%7Buuid_in%3A+%5B"1584b4c-0217-68a0-e0a4-b82b02708fd2"%2C+"0b657a3-7302-e733-af74-37d08806cc7c"%5D%7D%0A++%29+%7B%0A++++id%0A++++variants+%7B%0A++++++offer+%7B%0A++++++++id%0A++++++++metadataUri%0A++++++++metadataHash%0A++++++++metadata+%7B%0A++++++++++name%0A++++++++++...+on+ProductV1MetadataEntity+%7B%0A++++++++++++id%0A++++++++++++name%0A++++++++++++uuid%0A++++++++++++productV1Seller+%7B%0A++++++++++++++name%0A++++++++++++++externalUrl%0A++++++++++++%7D%0A++++++++++++licenseUrl%0A++++++++++%7D%0A++++++++%7D%0A++++++%7D%0A++++%7D%0A++%7D%0A%7D

The 2 offers are the one that was expired and the relisted one. The 2 offers have the same UUID But the product UUID is different. I think it should be the opposite:

  • offer UUID should be different as the offer ID are different on-chain
  • product UUID should be the same (?) as the offer just relist the same product with the same variations.

As a consequence of having the same offer UUID, the licenseURL and externalURL set in the new offer metadata are still referencing the old expired offer.
Check here: https://api.thegraph.com/subgraphs/name/bosonprotocol/mumbai-testing/graphql?query=query+MyQuery+%7B%0A++productV1Products%28where%3A+%7Buuid_in%3A+%5B"15dc403-714-57bf-e35b-44610bff33e4"%2C+"4e823-c447-be75-d05a-f36270e5afe"%5D%7D%29+%7B%0A++++id%0A++++variants+%7B%0A++++++offer+%7B%0A++++++++id%0A++++++++metadataUri%0A++++++++metadataHash%0A++++++++metadata+%7B%0A++++++++++name%0A++++++++++...+on+ProductV1MetadataEntity+%7B%0A++++++++++++id%0A++++++++++++name%0A++++++++++++uuid%0A++++++++++++productV1Seller+%7B%0A++++++++++++++name%0A++++++++++++++externalUrl%0A++++++++++++%7D%0A++++++++++++licenseUrl%0A++++++++++++productUuid%0A++++++++++++product+%7B%0A++++++++++++++uuid%0A++++++++++++%7D%0A++++++++++%7D%0A++++++++++licenseUrl%0A++++++++++externalUrl%0A++++++++%7D%0A++++++%7D%0A++++%7D%0A++%7D%0A%7D

@albertfolch-redeemeum
Copy link
Contributor Author

A bit confused here: https://api.thegraph.com/subgraphs/name/bosonprotocol/mumbai-testing/graphql?query=query+MyQuery+%7B%0A++productV1Products%28%0A++++where%3A+%7Buuid_in%3A+%5B"1584b4c-0217-68a0-e0a4-b82b02708fd2"%2C+"0b657a3-7302-e733-af74-37d08806cc7c"%5D%7D%0A++%29+%7B%0A++++id%0A++++variants+%7B%0A++++++offer+%7B%0A++++++++id%0A++++++++metadataUri%0A++++++++metadataHash%0A++++++++metadata+%7B%0A++++++++++name%0A++++++++++...+on+ProductV1MetadataEntity+%7B%0A++++++++++++id%0A++++++++++++name%0A++++++++++++uuid%0A++++++++++++productV1Seller+%7B%0A++++++++++++++name%0A++++++++++++++externalUrl%0A++++++++++++%7D%0A++++++++++++licenseUrl%0A++++++++++%7D%0A++++++++%7D%0A++++++%7D%0A++++%7D%0A++%7D%0A%7D
The 2 offers are the one that was expired and the relisted one. The 2 offers have the same UUID But the product UUID is different. I think it should be the opposite:

  • offer UUID should be different as the offer ID are different on-chain
  • product UUID should be the same (?) as the offer just relist the same product with the same variations.

As a consequence of having the same offer UUID, the licenseURL and externalURL set in the new offer metadata are still referencing the old expired offer. Check here: https://api.thegraph.com/subgraphs/name/bosonprotocol/mumbai-testing/graphql?query=query+MyQuery+%7B%0A++productV1Products%28where%3A+%7Buuid_in%3A+%5B"15dc403-714-57bf-e35b-44610bff33e4"%2C+"4e823-c447-be75-d05a-f36270e5afe"%5D%7D%29+%7B%0A++++id%0A++++variants+%7B%0A++++++offer+%7B%0A++++++++id%0A++++++++metadataUri%0A++++++++metadataHash%0A++++++++metadata+%7B%0A++++++++++name%0A++++++++++...+on+ProductV1MetadataEntity+%7B%0A++++++++++++id%0A++++++++++++name%0A++++++++++++uuid%0A++++++++++++productV1Seller+%7B%0A++++++++++++++name%0A++++++++++++++externalUrl%0A++++++++++++%7D%0A++++++++++++licenseUrl%0A++++++++++++productUuid%0A++++++++++++product+%7B%0A++++++++++++++uuid%0A++++++++++++%7D%0A++++++++++%7D%0A++++++++++licenseUrl%0A++++++++++externalUrl%0A++++++++%7D%0A++++++%7D%0A++++%7D%0A++%7D%0A%7D

this should be fixed now, for example:
https://api.thegraph.com/subgraphs/name/bosonprotocol/mumbai-testing/graphql?query=query+MyQuery+%7B%0A++productV1Products%28orderBy%3A%22id%22%2C+orderDirection%3A%22desc%22%2C+where%3A+%7Buuid_in%3A+%5B%22a6361f3-34d-cc0a-1263-37bf0c050ae%22%2C+%2240a15bc-8b85-8617-515b-50cafb776a7%22%5D%7D%29+%7B%0A++++id%0A++++variants+%7B%0A++++++offer+%7B%0A++++++++createdAt%0A++++++++id%0A++++++++metadataUri%0A++++++++metadataHash%0A++++++++metadata+%7B%0A++++++++++name%0A++++++++++...+on+ProductV1MetadataEntity+%7B%0A++++++++++++id%0A++++++++++++name%0A++++++++++++uuid%0A++++++++++++productV1Seller+%7B%0A++++++++++++++name%0A++++++++++++++externalUrl%0A++++++++++++%7D%0A++++++++++++licenseUrl%0A++++++++++++productUuid%0A++++++++++++product+%7B%0A++++++++++++++uuid%0A++++++++++++%7D%0A++++++++++%7D%0A++++++++++licenseUrl%0A++++++++++externalUrl%0A++++++++%7D%0A++++++%7D%0A++++%7D%0A++%7D%0A%7D

@levalleux-ludo

@albertfolch-redeemeum albertfolch-redeemeum merged commit be75ed5 into main Apr 24, 2023
@albertfolch-redeemeum albertfolch-redeemeum deleted the 568-offer-relist branch April 24, 2023 14:16
albertfolch-redeemeum added a commit that referenced this pull request Apr 25, 2023
* feat: relist offer

* refactor: remove comments

* fix: uuids
albertfolch-redeemeum added a commit that referenced this pull request Apr 27, 2023
* feat: relist offer (#596)

* feat: relist offer

* refactor: remove comments

* fix: uuids

* fix: disable relist button if you are not the operator
albertfolch-redeemeum added a commit that referenced this pull request May 11, 2023
* chore: add sellers 184,190,191 in curation list

* chore: add seller id 195 in curation list

* add seller id 196 in curation list

* chore: upgrade to react-kit 0.16.2-alpha.16

* chore: add seller 202 in curation list (#574)

* chore: add seller 197 in seller curation list (#576)

* fix: custom fonts (#579)

* fix: custom font

* refactor: remove wrong import

* feat: add neuropolitical custom font (#587)

* chore: add seller 207 in seller curation list (#591)

* fix: tabnapping protection (#594)

* feat: change seller deposit copy (#603)

* feat: remove promotional banner (#601) (#604)

* feat: remove promotional banner

* fix: build

* feat: relist offer (#596) (#606)

* feat: relist offer (#596)

* feat: relist offer

* refactor: remove comments

* fix: uuids

* fix: disable relist button if you are not the operator

---------

Co-authored-by: Ludovic Levalleux <[email protected]>
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.

Offer Relist

3 participants