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

Refactor OfferUtil into an injected service #4654

Closed
wants to merge 7 commits into from

Commits on Oct 15, 2020

  1. Refactor OfferUtil into an injected service

    This is a preliminary refactoring for a new core TakeOfferModel, which
    is going to need logic (for api 'takeoffer') currently located in the
    unaccessible desktop module's offer package.
    
    This change injects service dependencies into the OfferUtil instance and
    removes those service dependency arguments from formerly static method
    signatures.
    
    Other changes include:
    
    - Moving some Volume calc methods from OfferUtil to VolumeUtil.
    
    - Moving some Coin calc methods from OfferUtil to CoinUtil.
    
    - Injecting OfferUtil into CreateOfferService and relevant
      offer data & view models.
    
    - Minor changes to TradeStatistics2, Trade, Offer & Contract, to use
      static methods moved from OfferUtil to the new VolumeUtil class.
    
    - Deletion of bisq.desktop.main.offer.MakerFeeProvider,
      and bisq.core.offer.MakerFeeProvider.  They were unnecessary
      wrappers around a single OfferUtil method.
    
    - Renaming OfferUtilTest -> CoinUtilTest.
    
    - Moving tests in CoinCryptoUtilsTest to CoinUtilTest, and deleting
      CoinCryptoUtilsTest.
    
    - Adjusting affected offer data & view model tests.
    ghubstan committed Oct 15, 2020
    Configuration menu
    Copy the full SHA
    c354a69 View commit details
    Browse the repository at this point in the history
  2. Reformat, tidy up OfferUtil

    ghubstan committed Oct 15, 2020
    Configuration menu
    Copy the full SHA
    5fc5063 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    0d11417 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    baff9a9 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    b672f4a View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    149b228 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    2bf4b0a View commit details
    Browse the repository at this point in the history