-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
Minimum Price Support in UI + Minor contract fix #37
Conversation
… a minor bug in the auction contract for minimum price checks
This pull request is being automatically deployed with Vercel (learn more). metaplex-web – ./js🔍 Inspect: https://vercel.com/metaplex/metaplex-web/BPr7Dq8m3Bq8tU1VcvzbVrMuSxhj ono-store – ./js🔍 Inspect: https://vercel.com/metaplex/ono-store/5p4py5xXjq1Y2H8hekyj3usGN69R helium – ./js🔍 Inspect: https://vercel.com/metaplex/helium/DeGgchZRqMMaVcLPhwta4QC8c7Xh |
28: number; | ||
29: number; | ||
30: number; | ||
31: number; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Forgive me @bartosz-lipinski
) : ( | ||
<Row style={{ width: '100%', flexWrap: 'nowrap' }}> | ||
{state && state.days > 0 && ( | ||
{state && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just my formatter formatting things better than your formatter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
commit the config so its the same....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah we probably should
type: attributes.priceFloor | ||
? PriceFloorType.Minimum | ||
: PriceFloorType.None, | ||
hash: new U832ArrayBorshHack({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we create a static method on U832ArrayBorshHack
so we could do something like U832ArrayBorshHack.fromArray(asArray)
or U832ArrayBorshHack.create(asArray)
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah not a bad call. @bartosz-lipinski is gonna first see if there is a way borsh can just handle this case better so we don't even need this, but if there isn't, I'll add that.
@@ -235,7 +235,7 @@ pub fn place_bid<'r, 'b: 'r>( | |||
args.amount, | |||
min[0] | |||
); | |||
if args.amount <= min[0] { | |||
if args.amount < min[0] { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the minimum is 1 and you bid 1, you can't bid it. With this fix, you can now bid 1. Nothing special here. :)
this.hash = args.hash || new Uint8Array(32); | ||
if (this.type === PriceFloorType.Minimum) { | ||
if (args.minPrice) { | ||
this.hash.set(args.minPrice.toArrayLike(Buffer, 'le', 8), 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this sets the first 8 entries, and leaves the rest as 0s?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
correct.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love it. Let's merge this bad boy.
@bartosz-lipinski let me know when you've resolved that react issue you said you had |
* feat(packs): redeeming * feat: add probability to cards in pack (#32) * dummy modal component (#33) * fix an ability to close modal (#34) * fix: fetch editions on pack page * fix: re-fetch data on visiting artworks page fix: pull items page typing fix: hide initial store modal fix: build issues return websockets drop websockets clean-up * refactor: clean-up * feat: remove packs from homepage (#36) * feat: merge voucher metadata with pack (#37) * fix: instruction chunks to optimize packs creation (#38) * refactor: remove websockets * fix: build * refactor: remove unneded fetch * fix: fetch item that is redeemed * feat: Add limit of cards per pack (#40) * fix: revert meta use effect * feat: update transactions due to program changes * fix: build and clean-up * chore: update CHANGELOG.md * chore: update CHANGELOG * feat: extend pack details view with voucher (#41) * feat: redesign pack card (#42) * feat: updated pack card * fix: comments fixed * fix: packs layout on small screens (#43) * fix: hotfix create art view card (#44) * feat: remove opening pack after click (#45) * feat: remove pack card animation (#46) * feat: remove animation from packs (#47) * feat: new open pack button (#48) * fix: less compilation * refactor: pack page always has editionId (#49) * feat: implement request cards as a single transaction. (#50) * fix: build * feat: create action to request cards (#51) * fix: auctions cards UI layout (#52) * feat: modal for redeemed cards (#53) * feat: redeem pack modal * fix: small refactor * fix: comments fixed * fix: refactor after comments * feat: implement full pack size claim (#54) * feat: modal for approve transactions explanation (#55) * feat: added approve transaction step * fix: comments fixed * refactor: remove unused component * feat: update logic of packs displaying in My Items section (#56) * feat: Use Context to store pack state (#58) * fix: import * fix: styles * fix: style variable * fix: fetch pack state after redeem (#59) * Merge master from foundation * fix: packs feature flag * feat: pack page mobile view (#57) * fix: build * feat: partially open pack (#62) * feat: mobile view for claim pack modal (#63) * feat: provide random oracle in transactions (#64) * fix: redeemed cards list is wrong (#65) Co-authored-by: Paul <5280742+kurpav@users.noreply.github.com> Co-authored-by: ViacheslavMylostyvyi <gamer2forse@gmail.com> Co-authored-by: Irina Kadushkina <69786983+ikadushkina@users.noreply.github.com>
* feat(packs): redeeming * feat: add probability to cards in pack (#32) * dummy modal component (#33) * fix an ability to close modal (#34) * fix: fetch editions on pack page * fix: re-fetch data on visiting artworks page fix: pull items page typing fix: hide initial store modal fix: build issues return websockets drop websockets clean-up * refactor: clean-up * feat: remove packs from homepage (#36) * feat: merge voucher metadata with pack (#37) * fix: instruction chunks to optimize packs creation (#38) * refactor: remove websockets * fix: build * refactor: remove unneded fetch * fix: fetch item that is redeemed * feat: Add limit of cards per pack (#40) * fix: revert meta use effect * feat: update transactions due to program changes * fix: build and clean-up * chore: update CHANGELOG.md * chore: update CHANGELOG * feat: extend pack details view with voucher (#41) * feat: redesign pack card (#42) * feat: updated pack card * fix: comments fixed * fix: packs layout on small screens (#43) * fix: hotfix create art view card (#44) * feat: remove opening pack after click (#45) * feat: remove pack card animation (#46) * feat: remove animation from packs (#47) * feat: new open pack button (#48) * fix: less compilation * refactor: pack page always has editionId (#49) * feat: implement request cards as a single transaction. (#50) * fix: build * feat: create action to request cards (#51) * fix: auctions cards UI layout (#52) * feat: modal for redeemed cards (#53) * feat: redeem pack modal * fix: small refactor * fix: comments fixed * fix: refactor after comments * feat: implement full pack size claim (#54) * feat: modal for approve transactions explanation (#55) * feat: added approve transaction step * fix: comments fixed * refactor: remove unused component * feat: update logic of packs displaying in My Items section (#56) * feat: Use Context to store pack state (#58) * fix: import * fix: styles * fix: style variable * fix: fetch pack state after redeem (#59) * Merge master from foundation * fix: packs feature flag * feat: pack page mobile view (#57) * fix: build * feat: partially open pack (#62) * feat: mobile view for claim pack modal (#63) * feat: provide random oracle in transactions (#64) * fix: redeemed cards list is wrong (#65) * feat: update pack opening resume Co-authored-by: Paul <5280742+kurpav@users.noreply.github.com> Co-authored-by: ViacheslavMylostyvyi <gamer2forse@gmail.com> Co-authored-by: Irina Kadushkina <69786983+ikadushkina@users.noreply.github.com>
* feat(packs): redeeming * feat: add probability to cards in pack (metaplex-foundation#32) * dummy modal component (metaplex-foundation#33) * fix an ability to close modal (metaplex-foundation#34) * fix: fetch editions on pack page * fix: re-fetch data on visiting artworks page fix: pull items page typing fix: hide initial store modal fix: build issues return websockets drop websockets clean-up * refactor: clean-up * feat: remove packs from homepage (metaplex-foundation#36) * feat: merge voucher metadata with pack (metaplex-foundation#37) * fix: instruction chunks to optimize packs creation (metaplex-foundation#38) * refactor: remove websockets * fix: build * refactor: remove unneded fetch * fix: fetch item that is redeemed * feat: Add limit of cards per pack (metaplex-foundation#40) * fix: revert meta use effect * feat: update transactions due to program changes * fix: build and clean-up * chore: update CHANGELOG.md * chore: update CHANGELOG * feat: extend pack details view with voucher (metaplex-foundation#41) * feat: redesign pack card (metaplex-foundation#42) * feat: updated pack card * fix: comments fixed * fix: packs layout on small screens (metaplex-foundation#43) * fix: hotfix create art view card (metaplex-foundation#44) * feat: remove opening pack after click (metaplex-foundation#45) * feat: remove pack card animation (metaplex-foundation#46) * feat: remove animation from packs (metaplex-foundation#47) * feat: new open pack button (metaplex-foundation#48) * fix: less compilation * refactor: pack page always has editionId (metaplex-foundation#49) * feat: implement request cards as a single transaction. (metaplex-foundation#50) * fix: build * feat: create action to request cards (metaplex-foundation#51) * fix: auctions cards UI layout (metaplex-foundation#52) * feat: modal for redeemed cards (metaplex-foundation#53) * feat: redeem pack modal * fix: small refactor * fix: comments fixed * fix: refactor after comments * feat: implement full pack size claim (metaplex-foundation#54) * feat: modal for approve transactions explanation (metaplex-foundation#55) * feat: added approve transaction step * fix: comments fixed * refactor: remove unused component * feat: update logic of packs displaying in My Items section (metaplex-foundation#56) * feat: Use Context to store pack state (metaplex-foundation#58) * fix: import * fix: styles * fix: style variable * fix: fetch pack state after redeem (metaplex-foundation#59) * Merge master from foundation * fix: packs feature flag * feat: pack page mobile view (metaplex-foundation#57) * fix: build * feat: partially open pack (metaplex-foundation#62) * feat: mobile view for claim pack modal (metaplex-foundation#63) * feat: provide random oracle in transactions (metaplex-foundation#64) * fix: redeemed cards list is wrong (metaplex-foundation#65) Co-authored-by: Paul <5280742+kurpav@users.noreply.github.com> Co-authored-by: ViacheslavMylostyvyi <gamer2forse@gmail.com> Co-authored-by: Irina Kadushkina <69786983+ikadushkina@users.noreply.github.com>
* feat(packs): redeeming * feat: add probability to cards in pack (metaplex-foundation#32) * dummy modal component (metaplex-foundation#33) * fix an ability to close modal (metaplex-foundation#34) * fix: fetch editions on pack page * fix: re-fetch data on visiting artworks page fix: pull items page typing fix: hide initial store modal fix: build issues return websockets drop websockets clean-up * refactor: clean-up * feat: remove packs from homepage (metaplex-foundation#36) * feat: merge voucher metadata with pack (metaplex-foundation#37) * fix: instruction chunks to optimize packs creation (metaplex-foundation#38) * refactor: remove websockets * fix: build * refactor: remove unneded fetch * fix: fetch item that is redeemed * feat: Add limit of cards per pack (metaplex-foundation#40) * fix: revert meta use effect * feat: update transactions due to program changes * fix: build and clean-up * chore: update CHANGELOG.md * chore: update CHANGELOG * feat: extend pack details view with voucher (metaplex-foundation#41) * feat: redesign pack card (metaplex-foundation#42) * feat: updated pack card * fix: comments fixed * fix: packs layout on small screens (metaplex-foundation#43) * fix: hotfix create art view card (metaplex-foundation#44) * feat: remove opening pack after click (metaplex-foundation#45) * feat: remove pack card animation (metaplex-foundation#46) * feat: remove animation from packs (metaplex-foundation#47) * feat: new open pack button (metaplex-foundation#48) * fix: less compilation * refactor: pack page always has editionId (metaplex-foundation#49) * feat: implement request cards as a single transaction. (metaplex-foundation#50) * fix: build * feat: create action to request cards (metaplex-foundation#51) * fix: auctions cards UI layout (metaplex-foundation#52) * feat: modal for redeemed cards (metaplex-foundation#53) * feat: redeem pack modal * fix: small refactor * fix: comments fixed * fix: refactor after comments * feat: implement full pack size claim (metaplex-foundation#54) * feat: modal for approve transactions explanation (metaplex-foundation#55) * feat: added approve transaction step * fix: comments fixed * refactor: remove unused component * feat: update logic of packs displaying in My Items section (metaplex-foundation#56) * feat: Use Context to store pack state (metaplex-foundation#58) * fix: import * fix: styles * fix: style variable * fix: fetch pack state after redeem (metaplex-foundation#59) * Merge master from foundation * fix: packs feature flag * feat: pack page mobile view (metaplex-foundation#57) * fix: build * feat: partially open pack (metaplex-foundation#62) * feat: mobile view for claim pack modal (metaplex-foundation#63) * feat: provide random oracle in transactions (metaplex-foundation#64) * fix: redeemed cards list is wrong (metaplex-foundation#65) * feat: update pack opening resume Co-authored-by: Paul <5280742+kurpav@users.noreply.github.com> Co-authored-by: ViacheslavMylostyvyi <gamer2forse@gmail.com> Co-authored-by: Irina Kadushkina <69786983+ikadushkina@users.noreply.github.com>
No description provided.