bitshares / bitshares/bitshares-ui
[0.5] Issue with determinate count of symbols after comma (precision)
- Dominant language
- JavaScript
- Stars
- 520
- Forks
- 575
- Avg merge
- 12h 7m
- Merged PRs (30d)
- 5
Description
**Describe the bug**
if you have two assets with different precision `PIRATE` precision = 8 and `PIRATE.PIRATE` precision = 7
**To Reproduce**
Steps to reproduce the behavior:
1. Please create asset TEST with precision=8
2. Please create asses GATEWAY.TEST with precision=7
3. Please create a gateway - `GATEWAY`
4. please process some amount of GATEWAY.TEST to your account
5. Goto to NewWithdrawal for the amount `GATEWAY.TEST`
6. Here doesn't work click to your balance and after specified amount then on next step your amount will be multiplied to 10
**Expected behavior**
The application doesn't pay attention to precision from API settings and after the fount first asset `PIRATE.PIRATE` but after the loop, it found another asset `PIRATE` and will use precision 8 instead of 7
**Desktop (please complete the following information):**
- OS: Mac OS
- Browser Crome
- Version latest commit from dev branch
**Additional context**
i found workaround
if (item.get("symbol") == selectedAsset) {
//fromAsset = item;
//withdrawalCurrencyPrecision = item.get("precision");
}
it will fix override precision after found `PIRATE.PIRATE` but i'm still expection issue by clicking to available ballance
p.s./ Legacy withdrawal is working fine
Contributor guide
Research direction
Start by reproducing the NewWithdrawal flow with assets that share a symbol but have different precision values. Trace the asset lookup and the available-balance click described in the issue, then verify that the selected asset's precision remains in use and the amount is not multiplied incorrectly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- blockchain, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100