From e572326db42838bdeec5a86048f72c1d9369f3a6 Mon Sep 17 00:00:00 2001
From: librelois <elois@ifee.fr>
Date: Thu, 20 Feb 2020 20:23:32 +0100
Subject: [PATCH] [fix] bma: bma endpoint should be autoset to BMAS whe
 remoteport is 443

---
 app/modules/bma/index.ts | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/app/modules/bma/index.ts b/app/modules/bma/index.ts
index b7056215c..8d088641e 100644
--- a/app/modules/bma/index.ts
+++ b/app/modules/bma/index.ts
@@ -269,6 +269,9 @@ export class BMAPI extends stream.Transform {
 
 function getEndpoint(theConf:NetworkConfDTO) {
   let endpoint = 'BASIC_MERKLED_API';
+  if (theConf.remoteport && theConf.remoteport == 443) {
+    endpoint = 'BMAS';
+  }
   if (theConf.remotehost) {
     if (theConf.remotehost.match(BMAConstants.HOST_ONION_REGEX)) {
       endpoint = 'BMATOR';
-- 
GitLab