Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug fixes: Locked Balance display; Portfolio History screen #5842

Merged
merged 2 commits into from Nov 25, 2021
Merged

Bug fixes: Locked Balance display; Portfolio History screen #5842

merged 2 commits into from Nov 25, 2021

Conversation

ghost
Copy link

@ghost ghost commented Nov 18, 2021

2 bugfixes for 1.8.0:

Locked Balance display

Since #5813, the timing when a new trade affects locked balance display is slightly different, so now we need to update the UI when a new block is published. (Until now was only updated when the trade and offer collections changed size).

Portfolio History screen

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 #5358

Details

 

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


Solution: try/catch/handle the ClassCastException.

@ghost ghost changed the title Fix ClassCastException in Portfolio History screen Bug fixes: Locked Balance display; Portfolio History screen Nov 19, 2021
@boring-cyborg boring-cyborg bot added in:altcoins is:no-priority PR or issue marked with this label is not up for compensation right now labels Nov 19, 2021
@ripcurlx
Copy link
Contributor

@jmacxx Please have a look at the broken test mentioned here https://github.com/bisq-network/bisq/runs/4268685330?check_suite_focus=true. Thanks!

@ghost
Copy link
Author

ghost commented Nov 22, 2021

Something went wrong with the git history at the second commit, I've redone it and should be ok now.

@ripcurlx ripcurlx added this to the v1.8.0 milestone Nov 25, 2021
Copy link
Contributor

@ripcurlx ripcurlx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

@ripcurlx ripcurlx merged commit ba6d5e2 into bisq-network:master Nov 25, 2021
@ghost ghost mentioned this pull request Dec 20, 2021
@ghost ghost deleted the fix_exception_portfolio_history branch October 18, 2023 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in:altcoins is:no-priority PR or issue marked with this label is not up for compensation right now
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant