bitshares / bitshares/bitshares-ui
Credit offer page -> sorting table can cause white screen
- Dominant language
- JavaScript
- Stars
- 520
- Forks
- 575
- Avg merge
- 12h 7m
- Merged PRs (30d)
- 5
Description
**Describe the bug**
Clicking the table header to sort by Available, Total or minimum results in the entire screen turning white.
**To Reproduce**
1. Go to credit offer page
2. click on the header for 'Available' to sort
3. Get white screen
**Expected behavior**
Table sorts without white screen
**Screenshots**
```
vendor.049af5c1d008aea05c6b.js:2 TypeError: Cannot read properties of undefined (reading 'toJS')
at Object.convert_satoshi_to_typed (app.ca0591fe36ffc3c5e8fa.js:1:654721)
at N._sortByAmount (explorer.3618f7ce2754a162d898.js:1:2244)
at Object.sorter (explorer.3618f7ce2754a162d898.js:1:3062)
at vendor.049af5c1d008aea05c6b.js:2:1175051
at Array.sort ()
at n.value (vendor.049af5c1d008aea05c6b.js:2:1178028)
at n.value (vendor.049af5c1d008aea05c6b.js:2:1175836)
at n.value (vendor.049af5c1d008aea05c6b.js:2:1175160)
at o.renderComponent (vendor.049af5c1d008aea05c6b.js:2:1171898)
at bs (vendor.049af5c1d008aea05c6b.js:2:3666048)
ns @ vendor.049af5c1d008aea05c6b.js:2
app.ca0591fe36ffc3c5e8fa.js:1 TypeError: Cannot read properties of undefined (reading 'toJS')
at Object.convert_satoshi_to_typed (app.ca0591fe36ffc3c5e8fa.js:1:654721)
at N._sortByAmount (explorer.3618f7ce2754a162d898.js:1:2244)
at Object.sorter (explorer.3618f7ce2754a162d898.js:1:3062)
at vendor.049af5c1d008aea05c6b.js:2:1175051
at Array.sort ()
at n.value (vendor.049af5c1d008aea05c6b.js:2:1178028)
at n.value (vendor.049af5c1d008aea05c6b.js:2:1175836)
at n.value (vendor.049af5c1d008aea05c6b.js:2:1175160)
at o.renderComponent (vendor.049af5c1d008aea05c6b.js:2:1171898)
at bs (vendor.049af5c1d008aea05c6b.js:2:3666048)
componentDidCatch @ app.ca0591fe36ffc3c5e8fa.js:1
```
**Desktop (please complete the following information):**
Opera GX browser, windows, wallet.bitshares.org
**Additional info**
* If you attempt to sort by 'rate' before sorting available/total/minimum, the sort will work and no white screen will trigger
* After refreshing the page the available/total/minimum sorts won't work again
* Does not occur in firefox nor chrome
Contributor guide
Research direction
Start at the credit offer page's sorting behavior and trace the _sortByAmount call that reaches convert_satoshi_to_typed and fails while reading toJS. Reproduce the Available, Total, and minimum sorting issue in Opera GX, then verify that each table sort works without a white screen and that the existing rate sort remains functional.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100