[bisq-network/bisq] Fix ClassCastException in Portfolio History screen (PR #5842)
jmacxx
notifications at github.com
Fri Nov 19 00:40:05 CET 2021
To reproduce the problem: your portfolio history contains a canceled offer that was made with a different onion address. This can be quite common if you have changed your onion address.
Its a similar problem as previously found in https://github.com/bisq-network/bisq/pull/5358
---
Nov-18 16:55:36.129 [JavaFX Application Thread] ERROR bisq.common.setup.CommonSetup: Uncaught Exception from thread JavaFX Application Thread
Nov-18 16:55:36.130 [JavaFX Application Thread] ERROR bisq.common.setup.CommonSetup: throwableMessage= class bisq.core.offer.OpenOffer cannot be cast to class bisq.core.trade.model.bisq_v1.Trade (bisq.core.offer.OpenOffer and bisq.core.trade.model.bisq_v1.Trade are in unnamed module of loader 'app')
Nov-18 16:55:36.130 [JavaFX Application Thread] ERROR bisq.common.setup.CommonSetup: throwableClass= class java.lang.ClassCastException
Nov-18 16:55:36.134 [JavaFX Application Thread] ERROR bisq.common.setup.CommonSetup: Stack trace:
java.lang.ClassCastException: class bisq.core.offer.OpenOffer cannot be cast to class bisq.core.trade.model.bisq_v1.Trade (bisq.core.offer.OpenOffer and bisq.core.trade.model.bisq_v1.Trade are in unnamed module of loader 'app')
at bisq.core.trade.ClosedTradableUtil.castToTrade(ClosedTradableUtil.java:75)
at bisq.core.trade.ClosedTradableManager.isBsqTradeFee(ClosedTradableManager.java:219)
at bisq.core.trade.ClosedTradableFormatter.getTradeFeeAsString(ClosedTradableFormatter.java:124)
at bisq.desktop.main.portfolio.closedtrades.ClosedTradesViewModel.getTradeFee(ClosedTradesViewModel.java:75)
at bisq.desktop.main.portfolio.closedtrades.ClosedTradesView$12$1.updateItem(ClosedTradesView.java:743)
at bisq.desktop.main.portfolio.closedtrades.ClosedTradesView$12$1.updateItem(ClosedTradesView.java:739)
at javafx.scene.control.TableCell.updateItem(TableCell.java:665)
![unhandled_exception](https://user-images.githubusercontent.com/47253594/142510522-5d96f828-21ed-49a6-9213-30a21717209e.png)
---
**Solution:** try/catch/handle the ClassCastException.
You can view, comment on, or merge this pull request online at:
https://github.com/bisq-network/bisq/pull/5842
-- Commit Summary --
* Fix exception in Portfolio History screen
-- File Changes --
M core/src/main/java/bisq/core/trade/ClosedTradableManager.java (9)
-- Patch Links --
https://github.com/bisq-network/bisq/pull/5842.patch
https://github.com/bisq-network/bisq/pull/5842.diff
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq/pull/5842
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20211118/89cb7f69/attachment-0001.htm>
More information about the bisq-github
mailing list