OpenBazaar-Client
OpenBazaar-Client copied to clipboard
Deal with Listings that have Below Minimum Prices
Brief Description:
Listings that have a price below the minimum are blocked by the server. This should be prevented from happening in the client.
Prices can become too low in two ways. The minimum can change on the server, or a price pinned to a fiat currency can drop below the minimum when the value of BTC to the fiat currency changes.
- pull the minimum price from an API call
- when creating or editing an item, don't allow prices below the minimum
- in discover, don't show items with prices below the minimum
- in the user view, show a warning on listings with prices below the minimum, so a seller can see that their listings need to be edited (we may want to only show those listings to the seller).
- if a user tries to buy an item with a price below the minimum (if they enter the item address directly, for instance), they should see a warning instead of the buying modal
@jjeffryes Any updates on this?
No updates yet, this is still a TODO.
Currently the minimum price is set in the itemEdit.html template file, as var minBTCPrice = 0.0005
It would be much better to make this a variable in config.js, so it can be used in the following places:
- when editing a listing
- when buying a listing (in the buy wizard after the buy button is pressed)
- when paying for a transaction in the transaction modal (if the user buys a listing and doesn't pay for it, and late when they pay in the transaction modal if the minimum price has dropped below the price of the unpaid item, they should see a warning of some kind).