[bisq-network/bisq] Integrate new protection tools into api's offer & trade services (#5065)
sqrrm
notifications at github.com
Wed Jan 13 23:28:14 CET 2021
@sqrrm commented on this pull request.
It hurts my soul somewhat with that thread parsing to figure out context. I think we should try to think a bit more before merging something like that.
> +
+import lombok.extern.slf4j.Slf4j;
+
+import static java.lang.Thread.currentThread;
+
+ at Singleton
+ at Slf4j
+class CoreContext {
+
+ @Inject
+ public CoreContext() {
+ }
+
+ public boolean isApiUser() {
+ String threadName = currentThread().getName();
+ return threadName.equals("BisqDaemonMain") || threadName.contains("grpc");
I find this ugly. There must be some easier and not quite as ugly way to do this.
--
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#pullrequestreview-567708569
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20210113/5217d118/attachment.htm>
More information about the bisq-github
mailing list