Merge branch 'master' into simon/loading-indicator-ux
This commit is contained in:
commit
cac8c717ad
@ -4,7 +4,7 @@ import logger from '../logger';
|
|||||||
import { Common } from './common';
|
import { Common } from './common';
|
||||||
|
|
||||||
class DatabaseMigration {
|
class DatabaseMigration {
|
||||||
private static currentVersion = 17;
|
private static currentVersion = 18;
|
||||||
private queryTimeout = 120000;
|
private queryTimeout = 120000;
|
||||||
private statisticsAddedIndexed = false;
|
private statisticsAddedIndexed = false;
|
||||||
|
|
||||||
@ -180,6 +180,10 @@ class DatabaseMigration {
|
|||||||
if (databaseSchemaVersion < 17 && isBitcoin === true) {
|
if (databaseSchemaVersion < 17 && isBitcoin === true) {
|
||||||
await this.$executeQuery('ALTER TABLE `pools` ADD `slug` CHAR(50) NULL');
|
await this.$executeQuery('ALTER TABLE `pools` ADD `slug` CHAR(50) NULL');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (databaseSchemaVersion < 18 && isBitcoin === true) {
|
||||||
|
await this.$executeQuery('ALTER TABLE `blocks` ADD INDEX `hash` (`hash`);');
|
||||||
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
|
@ -703,6 +703,7 @@ class Routes {
|
|||||||
public async getBlock(req: Request, res: Response) {
|
public async getBlock(req: Request, res: Response) {
|
||||||
try {
|
try {
|
||||||
const block = await blocks.$getBlock(req.params.hash);
|
const block = await blocks.$getBlock(req.params.hash);
|
||||||
|
res.setHeader('Expires', new Date(Date.now() + 1000 * 600).toUTCString());
|
||||||
res.json(block);
|
res.json(block);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
res.status(500).send(e instanceof Error ? e.message : e);
|
res.status(500).send(e instanceof Error ? e.message : e);
|
||||||
@ -722,6 +723,7 @@ class Routes {
|
|||||||
public async getBlocksExtras(req: Request, res: Response) {
|
public async getBlocksExtras(req: Request, res: Response) {
|
||||||
try {
|
try {
|
||||||
const height = req.params.height === undefined ? undefined : parseInt(req.params.height, 10);
|
const height = req.params.height === undefined ? undefined : parseInt(req.params.height, 10);
|
||||||
|
res.setHeader('Expires', new Date(Date.now() + 1000 * 60).toUTCString());
|
||||||
res.json(await blocks.$getBlocksExtras(height, 15));
|
res.json(await blocks.$getBlocksExtras(height, 15));
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
res.status(500).send(e instanceof Error ? e.message : e);
|
res.status(500).send(e instanceof Error ? e.message : e);
|
||||||
@ -1001,6 +1003,7 @@ class Routes {
|
|||||||
public async $getRewardStats(req: Request, res: Response) {
|
public async $getRewardStats(req: Request, res: Response) {
|
||||||
try {
|
try {
|
||||||
const response = await mining.$getRewardStats(parseInt(req.params.blockCount, 10));
|
const response = await mining.$getRewardStats(parseInt(req.params.blockCount, 10));
|
||||||
|
res.setHeader('Expires', new Date(Date.now() + 1000 * 60).toUTCString());
|
||||||
res.json(response);
|
res.json(response);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
res.status(500).end();
|
res.status(500).end();
|
||||||
|
18
frontend/package-lock.json
generated
18
frontend/package-lock.json
generated
@ -70,7 +70,7 @@
|
|||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"@cypress/schematic": "^1.3.0",
|
"@cypress/schematic": "^1.3.0",
|
||||||
"cypress": "^9.5.2",
|
"cypress": "^9.6.1",
|
||||||
"cypress-fail-on-console-error": "^2.1.3",
|
"cypress-fail-on-console-error": "^2.1.3",
|
||||||
"cypress-wait-until": "^1.7.1",
|
"cypress-wait-until": "^1.7.1",
|
||||||
"mock-socket": "^9.0.3",
|
"mock-socket": "^9.0.3",
|
||||||
@ -6996,9 +6996,9 @@
|
|||||||
"devOptional": true
|
"devOptional": true
|
||||||
},
|
},
|
||||||
"node_modules/cypress": {
|
"node_modules/cypress": {
|
||||||
"version": "9.5.2",
|
"version": "9.6.1",
|
||||||
"resolved": "https://registry.npmjs.org/cypress/-/cypress-9.5.2.tgz",
|
"resolved": "https://registry.npmjs.org/cypress/-/cypress-9.6.1.tgz",
|
||||||
"integrity": "sha512-gYiQYvJozMzDOriUV1rCt6CeRM/pRK4nhwGJj3nJQyX2BoUdTCVwp30xDMKc771HiNVhBtgj5o5/iBdVDVXQUg==",
|
"integrity": "sha512-ECzmV7pJSkk+NuAhEw6C3D+RIRATkSb2VAHXDY6qGZbca/F9mv5pPsj2LO6Ty6oIFVBTrwCyL9agl28MtJMe2g==",
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@ -7034,7 +7034,7 @@
|
|||||||
"listr2": "^3.8.3",
|
"listr2": "^3.8.3",
|
||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"log-symbols": "^4.0.0",
|
"log-symbols": "^4.0.0",
|
||||||
"minimist": "^1.2.5",
|
"minimist": "^1.2.6",
|
||||||
"ospath": "^1.2.2",
|
"ospath": "^1.2.2",
|
||||||
"pretty-bytes": "^5.6.0",
|
"pretty-bytes": "^5.6.0",
|
||||||
"proxy-from-env": "1.0.0",
|
"proxy-from-env": "1.0.0",
|
||||||
@ -22641,9 +22641,9 @@
|
|||||||
"devOptional": true
|
"devOptional": true
|
||||||
},
|
},
|
||||||
"cypress": {
|
"cypress": {
|
||||||
"version": "9.5.2",
|
"version": "9.6.1",
|
||||||
"resolved": "https://registry.npmjs.org/cypress/-/cypress-9.5.2.tgz",
|
"resolved": "https://registry.npmjs.org/cypress/-/cypress-9.6.1.tgz",
|
||||||
"integrity": "sha512-gYiQYvJozMzDOriUV1rCt6CeRM/pRK4nhwGJj3nJQyX2BoUdTCVwp30xDMKc771HiNVhBtgj5o5/iBdVDVXQUg==",
|
"integrity": "sha512-ECzmV7pJSkk+NuAhEw6C3D+RIRATkSb2VAHXDY6qGZbca/F9mv5pPsj2LO6Ty6oIFVBTrwCyL9agl28MtJMe2g==",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@cypress/request": "^2.88.10",
|
"@cypress/request": "^2.88.10",
|
||||||
@ -22678,7 +22678,7 @@
|
|||||||
"listr2": "^3.8.3",
|
"listr2": "^3.8.3",
|
||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"log-symbols": "^4.0.0",
|
"log-symbols": "^4.0.0",
|
||||||
"minimist": "^1.2.5",
|
"minimist": "^1.2.6",
|
||||||
"ospath": "^1.2.2",
|
"ospath": "^1.2.2",
|
||||||
"pretty-bytes": "^5.6.0",
|
"pretty-bytes": "^5.6.0",
|
||||||
"proxy-from-env": "1.0.0",
|
"proxy-from-env": "1.0.0",
|
||||||
|
@ -122,7 +122,7 @@
|
|||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"@cypress/schematic": "^1.3.0",
|
"@cypress/schematic": "^1.3.0",
|
||||||
"cypress": "^9.5.2",
|
"cypress": "^9.6.1",
|
||||||
"cypress-fail-on-console-error": "^2.1.3",
|
"cypress-fail-on-console-error": "^2.1.3",
|
||||||
"cypress-wait-until": "^1.7.1",
|
"cypress-wait-until": "^1.7.1",
|
||||||
"mock-socket": "^9.0.3",
|
"mock-socket": "^9.0.3",
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -73,15 +73,15 @@
|
|||||||
</ng-template>
|
</ng-template>
|
||||||
</div>
|
</div>
|
||||||
<ng-container *ngIf="network.val === 'bisq' && item.codeExample.hasOwnProperty('bisq');else liquid_code_example" #bisq_code_example>
|
<ng-container *ngIf="network.val === 'bisq' && item.codeExample.hasOwnProperty('bisq');else liquid_code_example" #bisq_code_example>
|
||||||
<app-code-template [hostname]="hostname" [baseNetworkUrl]="baseNetworkUrl" [method]="item.httpRequestMethod" [code]="item.codeExample.bisq" [network]="network.val" ></app-code-template>
|
<app-code-template [hostname]="hostname" [baseNetworkUrl]="baseNetworkUrl" [method]="item.httpRequestMethod" [code]="item.codeExample.bisq" [network]="network.val" [showCodeExample]="item.showJsExamples"></app-code-template>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-template #liquid_code_example>
|
<ng-template #liquid_code_example>
|
||||||
<ng-container *ngIf="network.val === 'liquid' && item.codeExample.hasOwnProperty('liquid');else default_code_example">
|
<ng-container *ngIf="network.val === 'liquid' && item.codeExample.hasOwnProperty('liquid');else default_code_example">
|
||||||
<app-code-template [hostname]="hostname" [baseNetworkUrl]="baseNetworkUrl" [method]="item.httpRequestMethod" [code]="item.codeExample.liquid" [network]="network.val" ></app-code-template>
|
<app-code-template [hostname]="hostname" [baseNetworkUrl]="baseNetworkUrl" [method]="item.httpRequestMethod" [code]="item.codeExample.liquid" [network]="network.val" [showCodeExample]="item.showJsExamples"></app-code-template>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
<ng-template #default_code_example>
|
<ng-template #default_code_example>
|
||||||
<app-code-template [hostname]="hostname" [baseNetworkUrl]="baseNetworkUrl" [method]="item.httpRequestMethod" [code]="item.codeExample.default" [network]="network.val" ></app-code-template>
|
<app-code-template [hostname]="hostname" [baseNetworkUrl]="baseNetworkUrl" [method]="item.httpRequestMethod" [code]="item.codeExample.default" [network]="network.val" [showCodeExample]="item.showJsExamples"></app-code-template>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<pre><code [innerText]="wrapCurlTemplate(code)"></code></pre>
|
<pre><code [innerText]="wrapCurlTemplate(code)"></code></pre>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</li>
|
</li>
|
||||||
<li ngbNavItem *ngIf="network !== 'liquidtestnet'">
|
<li ngbNavItem *ngIf="showCodeExample[network]">
|
||||||
<a ngbNavLink (click)="adjustContainerHeight( $event )" >CommonJS</a>
|
<a ngbNavLink (click)="adjustContainerHeight( $event )" >CommonJS</a>
|
||||||
<ng-template ngbNavContent>
|
<ng-template ngbNavContent>
|
||||||
<div class="subtitle"><ng-container i18n="API Docs code example">Code Example</ng-container> <app-clipboard [text]="wrapCommonJS(code)"></app-clipboard></div>
|
<div class="subtitle"><ng-container i18n="API Docs code example">Code Example</ng-container> <app-clipboard [text]="wrapCommonJS(code)"></app-clipboard></div>
|
||||||
@ -17,8 +17,8 @@
|
|||||||
<pre><code [innerText]="wrapCommonJS(code)"></code></pre>
|
<pre><code [innerText]="wrapCommonJS(code)"></code></pre>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</li>
|
</li>
|
||||||
<li ngbNavItem>
|
<li ngbNavItem *ngIf="showCodeExample[network]">
|
||||||
<a ngbNavLink (click)="adjustContainerHeight( $event )" *ngIf="network !== 'liquidtestnet'">ES Module</a>
|
<a ngbNavLink (click)="adjustContainerHeight( $event )">ES Module</a>
|
||||||
<ng-template ngbNavContent>
|
<ng-template ngbNavContent>
|
||||||
<div class="subtitle"><ng-container i18n="API Docs install lib">Install Package</ng-container> <app-clipboard [text]="wrapImportTemplate()"></app-clipboard></div>
|
<div class="subtitle"><ng-container i18n="API Docs install lib">Install Package</ng-container> <app-clipboard [text]="wrapImportTemplate()"></app-clipboard></div>
|
||||||
<div class="links">
|
<div class="links">
|
||||||
|
@ -12,6 +12,7 @@ export class CodeTemplateComponent implements OnInit {
|
|||||||
@Input() hostname: string;
|
@Input() hostname: string;
|
||||||
@Input() baseNetworkUrl: string;
|
@Input() baseNetworkUrl: string;
|
||||||
@Input() method: 'GET' | 'POST' | 'websocket' = 'GET';
|
@Input() method: 'GET' | 'POST' | 'websocket' = 'GET';
|
||||||
|
@Input() showCodeExample: any;
|
||||||
env: Env;
|
env: Env;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
|
@ -78,23 +78,23 @@ export class ApiService {
|
|||||||
amount: amount,
|
amount: amount,
|
||||||
orderId: orderId,
|
orderId: orderId,
|
||||||
};
|
};
|
||||||
return this.httpClient.post<any>(this.apiBaseUrl + this.apiBasePath + '/api/v1/donations', params);
|
return this.httpClient.post<any>(this.apiBaseUrl + '/api/v1/donations', params);
|
||||||
}
|
}
|
||||||
|
|
||||||
getDonation$(): Observable<any[]> {
|
getDonation$(): Observable<any[]> {
|
||||||
return this.httpClient.get<any[]>(this.apiBaseUrl + this.apiBasePath + '/api/v1/donations');
|
return this.httpClient.get<any[]>(this.apiBaseUrl + '/api/v1/donations');
|
||||||
}
|
}
|
||||||
|
|
||||||
getTranslators$(): Observable<ITranslators> {
|
getTranslators$(): Observable<ITranslators> {
|
||||||
return this.httpClient.get<ITranslators>(this.apiBaseUrl + this.apiBasePath + '/api/v1/translators');
|
return this.httpClient.get<ITranslators>(this.apiBaseUrl + '/api/v1/translators');
|
||||||
}
|
}
|
||||||
|
|
||||||
getContributor$(): Observable<any[]> {
|
getContributor$(): Observable<any[]> {
|
||||||
return this.httpClient.get<any[]>(this.apiBaseUrl + this.apiBasePath + '/api/v1/contributors');
|
return this.httpClient.get<any[]>(this.apiBaseUrl + '/api/v1/contributors');
|
||||||
}
|
}
|
||||||
|
|
||||||
checkDonation$(orderId: string): Observable<any[]> {
|
checkDonation$(orderId: string): Observable<any[]> {
|
||||||
return this.httpClient.get<any[]>(this.apiBaseUrl + this.apiBasePath + '/api/v1/donations/check?order_id=' + orderId);
|
return this.httpClient.get<any[]>(this.apiBaseUrl + '/api/v1/donations/check?order_id=' + orderId);
|
||||||
}
|
}
|
||||||
|
|
||||||
getInitData$(): Observable<WebsocketResponse> {
|
getInitData$(): Observable<WebsocketResponse> {
|
||||||
|
@ -330,7 +330,7 @@ DEBIAN_PKG+=(nodejs npm mariadb-server nginx-core python-certbot-nginx rsync ufw
|
|||||||
# packages needed for mempool ecosystem
|
# packages needed for mempool ecosystem
|
||||||
FREEBSD_PKG=()
|
FREEBSD_PKG=()
|
||||||
FREEBSD_PKG+=(zsh sudo git screen curl wget calc neovim)
|
FREEBSD_PKG+=(zsh sudo git screen curl wget calc neovim)
|
||||||
FREEBSD_PKG+=(openssh-portable py38-pip rust llvm90 jq)
|
FREEBSD_PKG+=(openssh-portable py38-pip rust llvm90 jq base64)
|
||||||
FREEBSD_PKG+=(boost-libs autoconf automake gmake gcc libevent libtool pkgconf)
|
FREEBSD_PKG+=(boost-libs autoconf automake gmake gcc libevent libtool pkgconf)
|
||||||
FREEBSD_PKG+=(nginx rsync py38-certbot-nginx mariadb105-server keybase)
|
FREEBSD_PKG+=(nginx rsync py38-certbot-nginx mariadb105-server keybase)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user