[bisq-network/bisq] Integrate new protection tools into api's offer & trade services (#5065)
Stan
notifications at github.com
Fri Jan 8 17:41:15 CET 2021
- Injected `OfferFilter` into `CoreOffersService` and `CoreTradesService`.
The filter constrains `getoffer(s)` results to offers an api user can take, as the first part of ongoing protection tools / api integration.
- Created a new `CoreContext` singleton.
Initially, lets `Core*Services` know if the user is using the api -- `isApiUser=true` if the current thread's name is "BisqDaemonMain", or the name contains "grpc". We cannot check `BisqDaemonMain.class.getSimpleName()` because `:core` cannot have a circular dependency on `:daemon`, but there is probably a better way to do this than depending on the thread name set in `BisqDaemonMain#configUserThread()`. We do this anticipating future `:desktop` dependencies on the core api, and we don't pass hardcoded `isApiUser=true` params to lower level domain objects.
- Added `@Singleton` annotation to all Core*Service classes.
Related to https://github.com/bisq-network/bisq/pull/5053.
PR https://github.com/bisq-network/bisq/pull/5063 should be reviewed and merged before this one.
You can view, comment on, or merge this pull request online at:
https://github.com/bisq-network/bisq/pull/5065
-- Commit Summary --
* Fix two CLI option parsing bugs
* Add @Singleton annotation
* Integrate new protection tools into api's offer & trade services
-- File Changes --
M cli/src/main/java/bisq/cli/CliMain.java (5)
M cli/src/main/java/bisq/cli/CurrencyFormat.java (11)
M cli/src/main/java/bisq/cli/NegativeNumberOptions.java (22)
A core/src/main/java/bisq/core/api/CoreContext.java (39)
M core/src/main/java/bisq/core/api/CoreDisputeAgentsService.java (2)
M core/src/main/java/bisq/core/api/CoreOffersService.java (13)
M core/src/main/java/bisq/core/api/CorePaymentAccountsService.java (2)
M core/src/main/java/bisq/core/api/CorePriceService.java (3)
M core/src/main/java/bisq/core/api/CoreTradesService.java (9)
M core/src/main/java/bisq/core/api/CoreWalletsService.java (2)
-- Patch Links --
https://github.com/bisq-network/bisq/pull/5065.patch
https://github.com/bisq-network/bisq/pull/5065.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/5065
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20210108/a0dcf9f9/attachment.htm>
More information about the bisq-github
mailing list