This repository has been archived by the owner on Oct 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 206
Calculate collectible price in dutch sell #385
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…sell' into calculate-collectible-price-in-dutch-sell
Use decodeDutchAuctionData and linear function formula.
Update 0x.js to get the fix in DutchAuctionWrapper.decodeDutchAuctionData.
…e-collectible-price-in-dutch-sell
…rice-in-dutch-sell
unjapones
commented
May 16, 2019
@@ -3,7 +3,7 @@ | |||
"version": "0.1.0", | |||
"private": true, | |||
"dependencies": { | |||
"0x.js": "^6.0.8", | |||
"0x.js": "^6.0.9", |
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.
Because 0xProject/0x-monorepo#1814
unjapones
commented
May 16, 2019
// Use y = mx + b (linear function) | ||
const m = endAmount.minus(beginAmount).dividedBy(startTimeSeconds.minus(beginTimeSeconds)); | ||
const b = beginAmount.minus(beginTimeSeconds.multipliedBy(m)); | ||
return m.multipliedBy(todayInSeconds()).plus(b); |
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.
BTW I compared the result using getAuctionDetailsAsync
and the amount was the same (the decimal part of the amount was not, but we can ignore it).
Rename collectible_price_chart_card to dutch_auction_price_chart_card.
…rice-in-dutch-sell
Remove '$' from current owner address. Add 'Ends' to collectible order expiration date (below image).
Agupane
approved these changes
May 17, 2019
@@ -3,7 +3,7 @@ | |||
"version": "0.1.0", | |||
"private": true, | |||
"dependencies": { | |||
"0x.js": "^6.0.8", | |||
"0x.js": "^6.0.9", | |||
"@0x/connect": "^5.0.8", |
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.
Q: This library also had a release, should we update it?
mariano-aguero
approved these changes
May 17, 2019
birimbau
pushed a commit
to birimbau/VeriDex
that referenced
this pull request
Jan 4, 2020
…-price-in-dutch-sell Calculate collectible price in dutch sell
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Connects #376.
Includes
/src/util/collectibles.ts
file (similtar to/src/util/tokens.ts
) which exportsgetCollectiblePrice
.dutch_auction_price_chart_card
component for the Price Chart content.Screenshots
Basic sell (cancellable)
Dutch sell (not cancellable)
Basic buy
Dutch buy