Connection config and proxy updates.

This commit is contained in:
Simon Lindh authored and wiz committed 2020-02-26 03:35:08 +09:00
1 parent d690511a08
commit 32fdb32792
3 files changed
+14 -2

No files matched your search

@@ -3,7 +3,7 @@ import { HttpClient } from '@angular/common/http';
import { Observable } from 'rxjs';
import { Block, Transaction, Address, Outspend, Recent } from '../interfaces/electrs.interface';
const API_BASE_URL = 'https://www.blockstream.info/testnet/api';
const API_BASE_URL = document.location.protocol + '//' + document.location.hostname + ':' + document.location.port + '/electrs';
@Injectable({
providedIn: 'root'
@@ -6,7 +6,7 @@ import { StateService } from './state.service';
import { Block, Transaction } from '../interfaces/electrs.interface';
const WEB_SOCKET_PROTOCOL = (document.location.protocol === 'https:') ? 'wss:' : 'ws:';
const WEB_SOCKET_URL = WEB_SOCKET_PROTOCOL + '//' + document.location.hostname + ':8999';
const WEB_SOCKET_URL = WEB_SOCKET_PROTOCOL + '//' + document.location.hostname + ':' + document.location.port + '/ws';
@Injectable({
providedIn: 'root'