-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor offer/trade related classes in core and desktop
These refactoring changes are for reducing existing and potential duplication coming with the addition of new trading protocol support in the gRPC API. Some minor styling and logic simplification changes are also include. - Convert OfferUtil to injected singleton, and move various offer related utility methods into it. - Delete both MakerFeeProvider classes, which were wrappers around the same static old OfferUtil method. - Inject OfferUtil into CreateOfferDataModel, CreateOfferViewModel, TakeOfferDataModel, TakeOfferViewModel, MutableOfferDataModel, MutableOfferViewModel, OfferDataModel, EditOfferDataModel, EditOfferViewModel - Refactor TakeOfferViewModel Use OfferUtil, remove unused fields & methods. Made minor logic simplification, style and formatting changes. - MutableOfferDataModel Made minor logic simplification, style and formatting changes. - MutableOfferView uses new paymentAccount.isHalCashAccount(). - MutableOfferViewModel Refactored to use new VolumeUtil, CoinUtil, OfferUtil. Removed unused fields & accessors. Made minor style change. - Refactored OfferDataModel to use new OfferUtil - Refactor CreateOfferService Inject and use OfferUtil Move some utility methods to OfferUtil Remove unused fields - Offer Refactored to use new VolumeUtil for volume calculations. Made stateProperty and errorMessageProperty fields private. - PaymentAccount Moved isHalCashAccount type check to this class. Moved getTradeCurrency logic to this class. - Contract, radeStatistics2, TradeStatistics3 Refactored to use new VolumeUtil for volume calculations. - Trade Refactored to use new VolumeUtil for volume calculations. Made minor logic simplification, style and formatting changes. - CoinUtil Moved some coin utility methods into this class - CoinUtilTest Moved (coin related) tests from CoinCryptoUtilsTest and OfferUtilTest into CoinUtilTest, and deleted OfferUtilTest, CoinCryptoUtilsTest. - Adjust create and edit offer tests to model refactoring
- Loading branch information
Showing
27 changed files
with
656 additions
and
645 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.