From dbb6f267f4945981dc3cef8a6d0e32333586dbe3 Mon Sep 17 00:00:00 2001
From: hunicus <93150691+hunicus@users.noreply.github.com>
Date: Sun, 30 Oct 2022 12:39:20 -0400
Subject: [PATCH] Add electrum rpc port numbers and update note
---
.../app/docs/api-docs/api-docs.component.html | 13 +++++++------
.../src/app/docs/api-docs/api-docs.component.ts | 16 ++++++++++++++++
frontend/src/app/docs/docs/docs.component.ts | 2 +-
3 files changed, 24 insertions(+), 7 deletions(-)
diff --git a/frontend/src/app/docs/api-docs/api-docs.component.html b/frontend/src/app/docs/api-docs/api-docs.component.html
index 90c35252a..e2524a27d 100644
--- a/frontend/src/app/docs/api-docs/api-docs.component.html
+++ b/frontend/src/app/docs/api-docs/api-docs.component.html
@@ -109,12 +109,13 @@
diff --git a/frontend/src/app/docs/api-docs/api-docs.component.ts b/frontend/src/app/docs/api-docs/api-docs.component.ts
index ed0ecb0a2..7b78d187b 100644
--- a/frontend/src/app/docs/api-docs/api-docs.component.ts
+++ b/frontend/src/app/docs/api-docs/api-docs.component.ts
@@ -12,6 +12,8 @@ import { FaqTemplateDirective } from '../faq-template/faq-template.component';
styleUrls: ['./api-docs.component.scss']
})
export class ApiDocsComponent implements OnInit, AfterViewInit {
+ plainHostname = document.location.hostname;
+ electrsPort = 0;
hostname = document.location.hostname;
network$: Observable;
active = 0;
@@ -82,6 +84,20 @@ export class ApiDocsComponent implements OnInit, AfterViewInit {
this.network$.subscribe((network) => {
this.active = (network === 'liquid' || network === 'liquidtestnet') ? 2 : 0;
+ switch( network ) {
+ case "":
+ this.electrsPort = 50002; break;
+ case "mainnet":
+ this.electrsPort = 50002; break;
+ case "testnet":
+ this.electrsPort = 60002; break;
+ case "signet":
+ this.electrsPort = 60602; break;
+ case "liquid":
+ this.electrsPort = 51002; break;
+ case "liquidtestnet":
+ this.electrsPort = 51302; break;
+ }
});
}
diff --git a/frontend/src/app/docs/docs/docs.component.ts b/frontend/src/app/docs/docs/docs.component.ts
index c129cd21e..3e74ba959 100644
--- a/frontend/src/app/docs/docs/docs.component.ts
+++ b/frontend/src/app/docs/docs/docs.component.ts
@@ -46,7 +46,7 @@ export class DocsComponent implements OnInit {
this.env = this.stateService.env;
this.showWebSocketTab = ( ! ( ( this.stateService.network === "bisq" ) || ( this.stateService.network === "liquidtestnet" ) ) );
this.showFaqTab = ( this.env.BASE_MODULE === 'mempool' ) ? true : false;
- this.showElectrsTab = this.stateService.env.OFFICIAL_MEMPOOL_SPACE && ( this.stateService.network === "" || this.stateService.network === "mainnet" || this.stateService.network === "testnet" || this.stateService.network === "signet" );
+ this.showElectrsTab = this.stateService.env.OFFICIAL_MEMPOOL_SPACE && ( this.stateService.network !== "bisq" );
document.querySelector( "html" ).style.scrollBehavior = "smooth";
}