Difference in price of the video and price to be paid
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 3.5k
- Forks
- 409
- PR merge metrics
- No merged PRs in 30d
Description
@alyssaoc commented on [Wed Sep 05 2018](https://github.com/lbryio/lbry/issues/1429)
@LavRadis commented on [Tue Nov 14 2017](https://github.com/lbryio/lbry-desktop/issues/742)
## The Issue
There is a different price on the video and when you want to download it and buy it. Not sure if it affects multiple videos, it probably does but I couldn't check due to my balance. It is probably some kind of a rounding issue.
### Steps to reproduce
1. Open a video with price 0.58 LBC
2. When you try to pay for it, the price will be reported as 0.57
### Expected behaviour
Prices should be always the same.
### Actual behaviour
Prices are different.
## System Configuration
- LBRY Daemon version: 0.18.0
- LBRY App version: 0.18.0
- LBRY Installation ID: 7tYN144rHXrspzJG9xLP28fi1JztXnbpKro6DBJEQyzBmXTyDgqRLfYsUvHYFVmMe2
- Operating system: Win 10
## Screenshots

---
@LavRadis commented on [Tue Nov 14 2017](https://github.com/lbryio/lbry-desktop/issues/742#issuecomment-344287021)
After clearing the cache, both prices are 0.57.
---
@liamcardenas commented on [Mon Dec 11 2017](https://github.com/lbryio/lbry-desktop/issues/742#issuecomment-350861176)
@tzarebczan do you think this is an issue with updating prices? i.e. if you make the price .58 but then lower it to .57 it doesn't update? has anyone had issues with that?
---
@kauffj commented on [Mon Dec 11 2017](https://github.com/lbryio/lbry-desktop/issues/742#issuecomment-350862995)
@liamcardenas I'm pretty much 100% sure I know the cause of this issue. The `cost_info` reducer caches costs separately from the `claims` reducer, and refreshing a claim _does not_ update the cost.
Both the claim and the cost info should be hard-refreshed at least when rendering a ``, and likely more frequently (consider a `` left open).
---
@kauffj commented on [Wed Sep 05 2018](https://github.com/lbryio/lbry/issues/1429#issuecomment-418878232)
@alyssaoc https://github.com/lbryio/lbry/issues/1197 possibly better describes the daemon changes and/or should be considered a duplicate of this.
To solve this, #1197 needs to be completed and then associated API changes would need to be made application side.
---
@tzarebczan commented on [Tue Sep 18 2018](https://github.com/lbryio/lbry/issues/1429#issuecomment-422450106)
I think this issue should be moved back to lbry-app. Even if the price between resolve/get calls is fixed, the issue on the app side is that the price loads once when the content page loads, and then again when the get call happens - this is either normal or the UX needs to be improved to show that the price updated (due to exchange rates) during the time the claim was opened.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the rendering flow and the cost_info and claims reducers, which the issue identifies as separate sources of price data. Reproduce the 0.58-versus-0.57 case and follow the claim refresh and purchase paths; done means the displayed price and payment price stay consistent after updates.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- electron, javascript, react
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100