Commit graph

2998 commits

Author SHA1 Message Date
chimp1984
8e3f95383e
Add daoStateBlockChainNotConnecting property (impl. will come in other commits)
Add Preferences to service classes
2021-11-04 12:48:09 +01:00
chimp1984
1f929926cc
Remove prevHash from StateHash classes (the prevHash was only used for display.
For creating the hash we take the hash from the previous element. By removing it
we safe about 3 MB on data)

Add isSelfCreated field to DaoStateHash (indicates if we have created
the hash by ourself or if we have received it from a peer -> will be
part of later commits)
2021-11-04 12:48:09 +01:00
chimp1984
1abe68637d
Add useFullModeDaoMonitor field to PreferencesPayload
Add toggle to PreferencesView
Set useFullModeDaoMonitor default to true for headless nodes
2021-11-04 12:48:08 +01:00
chimp1984
cd3e8217ae
Rename onChangeAfterBatchProcessing to onDaoStateHashesChanged
at DaoStateMonitoringService.Listener
2021-11-04 12:48:07 +01:00
Christoph Atteneder
851bdcf9ff
Merge pull request #5797 from jmacxx/fix_exception_opening_mediation
Prevent NPE in case delayedPayoutTx is not present (failed trade)
2021-11-04 11:47:17 +01:00
Christoph Atteneder
928208c200
Merge pull request #5791 from jmacxx/fix_monese_satispay
Include holder name field for Monese & Satispay accounts
2021-11-04 10:54:12 +01:00
chimp1984
19eac435e5
Remove ClosedTradableListItem
Was empty wrapper for Tradable
2021-11-04 01:57:57 +01:00
chimp1984
733b4f06af
Fix layout 2021-11-04 01:26:59 +01:00
chimp1984
1ca0ed5e36
Add notification when BSQ swap trade got confirmed 2021-11-04 01:20:50 +01:00
chimp1984
8fa66ea7aa
Moved instance methods to ClosedTradableManager
Renamed ClosedTradeUtil to ClosedTradableUtil

Leaves only static functional methods in ClosedTradableUtil
Domain methods requiring services are in ClosedTradableManager
This keeps also the TradableList

All formatting code is in ClosedTradableFormatter
2021-11-03 23:54:18 +01:00
chimp1984
27df58b336
Extract formatter methods to ClosedTradeFormatter 2021-11-03 23:12:13 +01:00
chimp1984
acf7c216ae
Moved PriceUtil to bisq.core.util 2021-11-03 22:02:21 +01:00
chimp1984
7109666047
Moved AltcoinValidator, FiatPriceValidator and NumberValidator
to bisq.core.util.validation package. No code change.

Is needed for next refactorings.
2021-11-03 21:58:53 +01:00
chimp1984
24f18b75ae
Rename txFeeAsLong to tradeTxFee and txFeeAsLong to txFeeAsLong
Implement getTxFee in concrete classes. For Maker trades we return the txFee from the offer.

We use txFee in 2 different context:
1. For the txFee the taker pays and which is used for all the trade txs
2. As generic tx fee the user has paid. The makers tx fee is in the offer.
   The taker pays 3 times the tradeTxFee
2021-11-03 21:52:04 +01:00
chimp1984
5da5d47ad7
Fix getNumPastTrades method 2021-11-03 21:21:58 +01:00
chimp1984
c4a8627183
Use TradeModel instead of Trade in the avatar icon
classes and comparators
Add bsq wallet balance listener to update list
Use BsqSwapTrade details window if Bsq trade
Show "N/A" for deposits in case of BSQ swaps
Cleanup ClosedTradesDataModel
2021-11-03 20:10:15 +01:00
chimp1984
2ac5b3532c
Rename BSQ swap trades tab to Unconfirmed BSQ swaps
Move it left to closed trades
2021-11-03 19:06:06 +01:00
chimp1984
d4dc75ba23
Rename CompletedBsqSwapsView* classes to UnconfirmedBsqSwapsView* 2021-11-03 19:05:03 +01:00
chimp1984
680040d37e
Add info about trade if checkArgument fails
checkArgument(trade instanceof BuyerTrade) failed in dev testing
when clicking very fast confirm buttons.
Likely due lagging UI (previous trade in selection...).
Could not reproduce it afterwards
2021-11-03 19:00:09 +01:00
chimp1984
98bed9682d
Move ClosedTradableManager and ClosedTradeUtil one level up
We will move BsqSwapTrades into closed trades as well once confrimed
2021-11-03 18:21:45 +01:00
chimp1984
f6d2f7c8a5
Rename makerFee to makerFeeAsLong in BsqSwapTrade 2021-11-03 17:02:49 +01:00
chimp1984
964144c89f
Rename takerFee to takerFeeAsLong 2021-11-03 16:58:27 +01:00
chimp1984
3fa4b57d70
Rename getTradeVolume to getVolume in Trade 2021-11-03 14:10:34 +01:00
chimp1984
863a52077d
Rename getAmount to getAmountAsLong in Trade 2021-11-03 13:39:47 +01:00
chimp1984
d0cdf9fac6
Rename tradeVolumeProperty to volumeProperty in Trade 2021-11-03 13:35:58 +01:00
chimp1984
5bf02e944f
Rename getTradePrice to getPrice in Trade 2021-11-03 13:35:20 +01:00
chimp1984
bc4241cbe0
Rename tradeAmount to amount in Trade 2021-11-03 13:34:55 +01:00
chimp1984
c1e470d6f7
Add requestFocus call to createOfferView as well
Move method to base class
2021-11-03 12:34:49 +01:00
jmacxx
c916e9b749
Prevent NPE in case delayedPayoutTx is not present (failed trade) 2021-11-02 21:56:03 -05:00
chimp1984
addfadeffd
Cleanups 2021-11-02 16:18:50 +01:00
chimp1984
726307c1bb
Combine nested if statements 2021-11-02 16:18:50 +01:00
chimp1984
20e83b6afe
Reset address entry if BSQ swap offer is used for create offer
We create a new address entry when opening the create offer view.
But we close and replace that view with the BSQ swap create offer view if
BSQ swap is selected, therefore the address entry would be dangling and
later cleaned up at openOfferManager. To clean it up directly we call the
resetAddressEntriesForOpenOffer on btcWalletService.
2021-11-02 16:18:50 +01:00
chimp1984
6890b50722
Add default value if no filter is available 2021-11-02 16:18:50 +01:00
chimp1984
884fe09b25
Workaround for weird JFXComboBox bug
The currency list would show up the list overlay. That gets triggered by unclear reasons.
The bindings on the action and cancel buttons are causing that behaviour (maybe causes some
render cycle which then causes the issue...). By requesting focus on our view directly after
the onTakeOffer updates the bindable properties we can get rid of that UI glitch.
2021-11-02 16:18:50 +01:00
chimp1984
5eec562953
Update dev mode values for create offer 2021-11-02 16:18:50 +01:00
chimp1984
9b1720f4c1
Improve BSQ swap offer details window 2021-11-02 16:18:50 +01:00
chimp1984
06bba393b1
Remove missingFundsListener after successful take offer 2021-11-02 16:18:50 +01:00
chimp1984
1c1b2802cc
Apply codacy review suggestions 2021-11-02 16:18:50 +01:00
chimp1984
f7fcaa915e
Add BSQ swap code 2021-11-02 16:18:50 +01:00
chimp1984
d5dfdb4a35
Merge branch 'chimp-bsq-swap-1' into bsq-swap-low-risk-refactorings-2
# Conflicts:
#	core/src/main/java/bisq/core/account/witness/AccountAgeWitnessService.java
#	core/src/main/java/bisq/core/api/CoreOffersService.java
#	core/src/main/java/bisq/core/btc/listeners/TxConfidenceListener.java
#	core/src/main/java/bisq/core/notifications/alerts/market/MarketAlerts.java
#	core/src/main/java/bisq/core/offer/OpenOfferManager.java
#	core/src/main/java/bisq/core/offer/bisq_v1/CreateOfferService.java
#	core/src/main/java/bisq/core/offer/bisq_v1/OfferPayload.java
#	core/src/main/java/bisq/core/offer/bisq_v1/TakeOfferModel.java
#	core/src/main/java/bisq/core/offer/bisq_v1/TriggerPriceService.java
#	core/src/main/java/bisq/core/proto/ProtoDevUtil.java
#	core/src/main/java/bisq/core/trade/TradeManager.java
#	core/src/main/java/bisq/core/trade/bisq_v1/TradeResultHandler.java
#	core/src/main/java/bisq/core/trade/bisq_v1/TradeUtil.java
#	core/src/main/java/bisq/core/trade/model/bisq_v1/Trade.java
#	core/src/main/java/bisq/core/trade/protocol/FluentProtocol.java
#	core/src/main/java/bisq/core/trade/protocol/Provider.java
#	core/src/main/java/bisq/core/trade/protocol/TradeProtocol.java
#	core/src/main/java/bisq/core/trade/protocol/TradeProtocolFactory.java
#	core/src/main/java/bisq/core/trade/protocol/TradeTaskRunner.java
#	core/src/main/java/bisq/core/trade/protocol/bisq_v1/DisputeProtocol.java
#	core/src/main/java/bisq/core/trade/protocol/bisq_v1/model/ProcessModel.java
#	core/src/main/java/bisq/core/trade/protocol/bisq_v1/tasks/ApplyFilter.java
#	core/src/main/java/bisq/core/trade/protocol/bisq_v1/tasks/TradeTask.java
#	core/src/main/java/bisq/core/trade/protocol/bisq_v1/tasks/maker/MakerCreateAndSignContract.java
#	core/src/main/java/bisq/core/trade/protocol/bisq_v1/tasks/taker/TakerVerifyAndSignContract.java
#	core/src/main/java/bisq/core/trade/statistics/TradeStatistics2.java
#	core/src/main/java/bisq/core/trade/statistics/TradeStatisticsManager.java
#	core/src/main/java/bisq/core/trade/txproof/xmr/XmrTxProofService.java
#	desktop/src/main/java/bisq/desktop/components/paymentmethods/PaymentMethodForm.java
#	desktop/src/main/java/bisq/desktop/main/PriceUtil.java
#	desktop/src/main/java/bisq/desktop/main/funds/transactions/TransactionAwareTradableFactory.java
#	desktop/src/main/java/bisq/desktop/main/funds/transactions/TransactionAwareTrade.java
#	desktop/src/main/java/bisq/desktop/main/market/offerbook/OfferBookChartView.java
#	desktop/src/main/java/bisq/desktop/main/market/offerbook/OfferBookChartViewModel.java
#	desktop/src/main/java/bisq/desktop/main/market/spread/SpreadViewModel.java
#	desktop/src/main/java/bisq/desktop/main/offer/BuyOfferView.java
#	desktop/src/main/java/bisq/desktop/main/offer/OfferView.java
#	desktop/src/main/java/bisq/desktop/main/offer/SellOfferView.java
#	desktop/src/main/java/bisq/desktop/main/offer/bisq_v1/MutableOfferDataModel.java
#	desktop/src/main/java/bisq/desktop/main/offer/bisq_v1/MutableOfferView.java
#	desktop/src/main/java/bisq/desktop/main/offer/bisq_v1/MutableOfferViewModel.java
#	desktop/src/main/java/bisq/desktop/main/offer/bisq_v1/takeoffer/TakeOfferDataModel.java
#	desktop/src/main/java/bisq/desktop/main/offer/bisq_v1/takeoffer/TakeOfferView.java
#	desktop/src/main/java/bisq/desktop/main/offer/bisq_v1/takeoffer/TakeOfferViewModel.java
#	desktop/src/main/java/bisq/desktop/main/offer/offerbook/OfferBook.java
#	desktop/src/main/java/bisq/desktop/main/offer/offerbook/OfferBookView.java
#	desktop/src/main/java/bisq/desktop/main/offer/offerbook/OfferBookViewModel.java
#	desktop/src/main/java/bisq/desktop/main/overlays/windows/OfferDetailsWindow.java
#	desktop/src/main/java/bisq/desktop/main/portfolio/closedtrades/ClosedTradesDataModel.java
#	desktop/src/main/java/bisq/desktop/main/portfolio/editoffer/EditOfferDataModel.java
#	desktop/src/main/java/bisq/desktop/main/portfolio/failedtrades/FailedTradesDataModel.java
#	desktop/src/main/java/bisq/desktop/main/portfolio/openoffer/OpenOffersDataModel.java
#	desktop/src/main/java/bisq/desktop/main/portfolio/openoffer/OpenOffersView.java
#	desktop/src/main/java/bisq/desktop/main/portfolio/pendingtrades/PendingTradesDataModel.java
#	desktop/src/main/java/bisq/desktop/util/DisplayUtils.java
#	desktop/src/test/java/bisq/desktop/main/offer/bisq_v1/createoffer/CreateOfferDataModelTest.java
#	desktop/src/test/java/bisq/desktop/main/offer/bisq_v1/createoffer/CreateOfferViewModelTest.java
#	desktop/src/test/java/bisq/desktop/main/offer/offerbook/OfferBookListItemMaker.java
#	desktop/src/test/java/bisq/desktop/main/portfolio/editoffer/EditOfferDataModelTest.java
#	desktop/src/test/java/bisq/desktop/maker/OfferMaker.java
#	monitor/src/main/java/bisq/monitor/metric/P2PMarketStats.java
2021-11-02 16:04:12 +01:00
chimp1984
56759be40d
Move tests to package bisq.desktop.main.offer.bisq_v1.createoffer 2021-11-02 15:42:04 +01:00
chimp1984
7d48cdb941
Cleanups 2021-11-02 15:35:51 +01:00
chimp1984
6a8f612116
Cleanups, refromatting, add final qualifier 2021-11-02 15:35:51 +01:00
chimp1984
3b5b20d152
Move OfferViewModelUtil into bisq.desktop.main.offer.bisq_v1 package 2021-11-02 15:35:51 +01:00
chimp1984
fbfdaf4e31
Rename FeeUtil to OfferViewModelUtil 2021-11-02 15:35:51 +01:00
chimp1984
4ebbaa35a5
Move OfferDataModel, OfferViewUtil into bisq.desktop.main.offer.bisq_v1 package 2021-11-02 15:35:51 +01:00
chimp1984
cc4b0015e4
Move MutableOffer view classes into bisq.desktop.main.offer.bisq_v1 package 2021-11-02 15:35:51 +01:00
chimp1984
9a1306af1d
Move takeoffer package inside bisq.desktop.main.offer.bisq_v1 package 2021-11-02 15:35:51 +01:00
chimp1984
f25d0d1bab
Move createoffer package inside bisq.desktop.main.offer.bisq_v1 package 2021-11-02 15:35:51 +01:00
chimp1984
ac8dd031b3
Move TradeDataValidation, DumpDelayedPayoutTx, TradeDataValidation, TradeUtil, TradeTxException to package bisq.core.trade.bisq_v1 2021-11-02 15:35:51 +01:00