diff --git a/backend/src/config.ts b/backend/src/config.ts index 1b3db8142..b213d5edc 100644 --- a/backend/src/config.ts +++ b/backend/src/config.ts @@ -2,7 +2,7 @@ const configFile = require('../mempool-config.json'); interface IConfig { MEMPOOL: { - NETWORK: 'mainnet' | 'testnet' | 'liquid'; + NETWORK: 'mainnet' | 'testnet' | 'signet' | 'liquid'; BACKEND: 'esplora' | 'electrum' | 'none'; HTTP_PORT: number; SPAWN_CLUSTER_PROCS: number; diff --git a/frontend/mempool-frontend-config.sample.json b/frontend/mempool-frontend-config.sample.json index 6ffc50bc8..9a1c72282 100644 --- a/frontend/mempool-frontend-config.sample.json +++ b/frontend/mempool-frontend-config.sample.json @@ -1,5 +1,6 @@ { "TESTNET_ENABLED": false, + "SIGNET_ENABLED": false, "LIQUID_ENABLED": false, "BISQ_ENABLED": false, "BISQ_SEPARATE_BACKEND": false, diff --git a/frontend/proxy.conf.json b/frontend/proxy.conf.json index d109b50ec..bc184bc05 100644 --- a/frontend/proxy.conf.json +++ b/frontend/proxy.conf.json @@ -41,6 +41,28 @@ "^/testnet/api": "" } }, + "/signet/api/v1": { + "target": "http://localhost:8999/", + "secure": false, + "pathRewrite": { + "^/signet/api/v1": "/api/v1" + } + }, + "/signet/api/v1/ws": { + "target": "http://localhost:8999/", + "secure": false, + "ws": true, + "pathRewrite": { + "^/signet/api": "/api/v1/ws" + } + }, + "/signet/api/": { + "target": "http://localhost:50001/", + "secure": false, + "pathRewrite": { + "^/signet/api": "" + } + }, "/liquid/api/v1/ws": { "target": "http://localhost:8999/", "secure": false, diff --git a/frontend/server.ts b/frontend/server.ts index 4d07bc6ff..02f8cd8ab 100644 --- a/frontend/server.ts +++ b/frontend/server.ts @@ -91,6 +91,17 @@ export function app(locale: string): express.Express { server.get('/testnet/tv', getLocalizedSSR(indexHtml)); server.get('/testnet/status', getLocalizedSSR(indexHtml)); server.get('/testnet/about', getLocalizedSSR(indexHtml)); + server.get('/signet', getLocalizedSSR(indexHtml)); + server.get('/signet/tx/*', getLocalizedSSR(indexHtml)); + server.get('/signet/block/*', getLocalizedSSR(indexHtml)); + server.get('/signet/mempool-block/*', getLocalizedSSR(indexHtml)); + server.get('/signet/address/*', getLocalizedSSR(indexHtml)); + server.get('/signet/blocks', getLocalizedSSR(indexHtml)); + server.get('/signet/graphs', getLocalizedSSR(indexHtml)); + server.get('/signet/api', getLocalizedSSR(indexHtml)); + server.get('/signet/tv', getLocalizedSSR(indexHtml)); + server.get('/signet/status', getLocalizedSSR(indexHtml)); + server.get('/signet/about', getLocalizedSSR(indexHtml)); server.get('/bisq', getLocalizedSSR(indexHtml)); server.get('/bisq/tx/*', getLocalizedSSR(indexHtml)); server.get('/bisq/blocks', getLocalizedSSR(indexHtml)); diff --git a/frontend/src/app/app-routing.module.ts b/frontend/src/app/app-routing.module.ts index 4d7b6084c..b76526582 100644 --- a/frontend/src/app/app-routing.module.ts +++ b/frontend/src/app/app-routing.module.ts @@ -202,6 +202,68 @@ const routes: Routes = [ }, ] }, + { + path: 'signet', + children: [ + { + path: '', + component: MasterPageComponent, + children: [ + { + path: '', + component: StartComponent, + children: [ + { + path: '', + component: DashboardComponent + }, + { + path: 'tx/:id', + component: TransactionComponent + }, + { + path: 'block/:id', + component: BlockComponent + }, + { + path: 'mempool-block/:id', + component: MempoolBlockComponent + }, + ], + }, + { + path: 'blocks', + component: LatestBlocksComponent, + }, + { + path: 'graphs', + component: StatisticsComponent, + }, + { + path: 'address/:id', + children: [], + component: AddressComponent + }, + { + path: 'api', + component: ApiDocsComponent, + }, + ], + }, + { + path: 'tv', + component: TelevisionComponent + }, + { + path: 'status', + component: StatusViewComponent + }, + { + path: '**', + redirectTo: '' + }, + ] + }, { path: 'bisq', component: MasterPageComponent, diff --git a/frontend/src/app/components/amount/amount.component.html b/frontend/src/app/components/amount/amount.component.html index 713e7a940..e032b6224 100644 --- a/frontend/src/app/components/amount/amount.component.html +++ b/frontend/src/app/components/amount/amount.component.html @@ -8,6 +8,6 @@ ‎{{ satoshis / 100000000 | number : digitsInfo }} L- - tBTC + tBTC diff --git a/frontend/src/app/components/blockchain-blocks/blockchain-blocks.component.ts b/frontend/src/app/components/blockchain-blocks/blockchain-blocks.component.ts index 1196c8519..e0e8ec26e 100644 --- a/frontend/src/app/components/blockchain-blocks/blockchain-blocks.component.ts +++ b/frontend/src/app/components/blockchain-blocks/blockchain-blocks.component.ts @@ -32,6 +32,7 @@ export class BlockchainBlocksComponent implements OnInit, OnDestroy { bisq: ['#9339f4', '#105fb0'], liquid: ['#116761', '#183550'], testnet: ['#1d486f', '#183550'], + signet: ['#1d486f', '#183550'], }; constructor( diff --git a/frontend/src/app/components/master-page/master-page.component.html b/frontend/src/app/components/master-page/master-page.component.html index ffe810cc7..f7bd79fdb 100644 --- a/frontend/src/app/components/master-page/master-page.component.html +++ b/frontend/src/app/components/master-page/master-page.component.html @@ -11,12 +11,13 @@ -