From a402c5c8612779255b5a9d48721d9add9d52cbbb Mon Sep 17 00:00:00 2001
From: hunicus <93150691+hunicus@users.noreply.github.com>
Date: Thu, 19 May 2022 12:55:20 -0400
Subject: [PATCH 1/5] Remove smaller time periods for hashrate endpoints
And clarify real-time hashrate data in /mining/hashrate.
---
frontend/src/app/docs/api-docs/api-docs-data.ts | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/frontend/src/app/docs/api-docs/api-docs-data.ts b/frontend/src/app/docs/api-docs/api-docs-data.ts
index ff57aeb82..c018c572a 100644
--- a/frontend/src/app/docs/api-docs/api-docs-data.ts
+++ b/frontend/src/app/docs/api-docs/api-docs-data.ts
@@ -3196,7 +3196,7 @@ export const restApiDocsData = [
fragment: "get-mining-pool-hashrates",
title: "GET Mining Pool Hashrates",
description: {
- default: "
Returns average hashrates (and share of total hashrate) of mining pools active in the specified trailing :timePeriod
, in descending order of hashrate.
Leave :timePeriod
unspecified to get all available data, or specify any of the following time periods: " + miningTimeIntervals + ".
"
+ default: "Returns average hashrates (and share of total hashrate) of mining pools active in the specified trailing :timePeriod
, in descending order of hashrate.
Leave :timePeriod
unspecified to get all available data, or specify any of the following time periods: " + miningTimeIntervals.substr(52) + ".
"
},
urlString: "/v1/mining/hashrate/pools/[:timePeriod]",
showConditions: bitcoinNetworks,
@@ -3634,7 +3634,7 @@ export const restApiDocsData = [
fragment: "get-hashrate",
title: "GET Hashrate",
description: {
- default: "Returns network-wide hashrate and difficulty figures over the specified trailing :timePeriod
:
- Current hashrate
- Current difficulty
- Historical daily average hashrates
- Historical difficulty
Valid values for :timePeriod
are " + miningTimeIntervals + ". If no time interval is specified, all available data is returned.
Be sure that INDEXING_BLOCKS_AMOUNT
is set properly in your backend config so that enough blocks are indexed to properly serve your request.
"
+ default: "Returns network-wide hashrate and difficulty figures over the specified trailing :timePeriod
:
- Current (real-time) hashrate
- Current (real-time) difficulty
- Historical daily average hashrates
- Historical difficulty
Valid values for :timePeriod
are " + miningTimeIntervals.substr(52) + ". If no time interval is specified, all available data is returned.
Be sure that INDEXING_BLOCKS_AMOUNT
is set properly in your backend config so that enough blocks are indexed to properly serve your request.
"
},
urlString: "/v1/mining/hashrate/[:timePeriod]",
showConditions: bitcoinNetworks,
From e6c4b87b8bf25e31dfc45b9d1b33d464f4189e03 Mon Sep 17 00:00:00 2001
From: softsimon
Date: Thu, 19 May 2022 23:47:44 +0400
Subject: [PATCH 2/5] Moving graphs and mining dashboard to a lazy loaded
module
---
frontend/src/app/app-routing.module.ts | 1058 +++++++----------
frontend/src/app/app.module.ts | 164 +--
frontend/src/app/bisq/bisq.module.ts | 2 +
.../mining-start/mining-start.component.html | 1 -
.../mining-start/mining-start.component.ts | 14 -
frontend/src/app/graphs/graphs.module.ts | 58 +
.../src/app/graphs/graphs.routing.module.ts | 106 ++
frontend/src/app/shared/shared.module.ts | 161 ++-
8 files changed, 773 insertions(+), 791 deletions(-)
delete mode 100644 frontend/src/app/components/mining-start/mining-start.component.html
delete mode 100644 frontend/src/app/components/mining-start/mining-start.component.ts
create mode 100644 frontend/src/app/graphs/graphs.module.ts
create mode 100644 frontend/src/app/graphs/graphs.routing.module.ts
diff --git a/frontend/src/app/app-routing.module.ts b/frontend/src/app/app-routing.module.ts
index 2eaf7e277..f3d3e3144 100644
--- a/frontend/src/app/app-routing.module.ts
+++ b/frontend/src/app/app-routing.module.ts
@@ -6,38 +6,206 @@ import { BlockComponent } from './components/block/block.component';
import { AddressComponent } from './components/address/address.component';
import { MasterPageComponent } from './components/master-page/master-page.component';
import { AboutComponent } from './components/about/about.component';
-import { TelevisionComponent } from './components/television/television.component';
-import { StatisticsComponent } from './components/statistics/statistics.component';
-import { MempoolBlockComponent } from './components/mempool-block/mempool-block.component';
-import { AssetComponent } from './components/asset/asset.component';
-import { AssetsNavComponent } from './components/assets/assets-nav/assets-nav.component';
import { StatusViewComponent } from './components/status-view/status-view.component';
-import { DashboardComponent } from './dashboard/dashboard.component';
import { LatestBlocksComponent } from './components/latest-blocks/latest-blocks.component';
import { TermsOfServiceComponent } from './components/terms-of-service/terms-of-service.component';
import { PrivacyPolicyComponent } from './components/privacy-policy/privacy-policy.component';
import { TrademarkPolicyComponent } from './components/trademark-policy/trademark-policy.component';
import { BisqMasterPageComponent } from './components/bisq-master-page/bisq-master-page.component';
import { SponsorComponent } from './components/sponsor/sponsor.component';
-import { LiquidMasterPageComponent } from './components/liquid-master-page/liquid-master-page.component';
import { PushTransactionComponent } from './components/push-transaction/push-transaction.component';
-import { PoolRankingComponent } from './components/pool-ranking/pool-ranking.component';
+import { BlocksList } from './components/blocks-list/blocks-list.component';
+import { LiquidMasterPageComponent } from './components/liquid-master-page/liquid-master-page.component';
import { AssetGroupComponent } from './components/assets/asset-group/asset-group.component';
import { AssetsFeaturedComponent } from './components/assets/assets-featured/assets-featured.component';
import { AssetsComponent } from './components/assets/assets.component';
-import { PoolComponent } from './components/pool/pool.component';
-import { MiningDashboardComponent } from './components/mining-dashboard/mining-dashboard.component';
-import { HashrateChartComponent } from './components/hashrate-chart/hashrate-chart.component';
-import { HashrateChartPoolsComponent } from './components/hashrates-chart-pools/hashrate-chart-pools.component';
-import { MiningStartComponent } from './components/mining-start/mining-start.component';
-import { GraphsComponent } from './components/graphs/graphs.component';
-import { BlocksList } from './components/blocks-list/blocks-list.component';
-import { BlockFeesGraphComponent } from './components/block-fees-graph/block-fees-graph.component';
-import { BlockRewardsGraphComponent } from './components/block-rewards-graph/block-rewards-graph.component';
-import { BlockFeeRatesGraphComponent } from './components/block-fee-rates-graph/block-fee-rates-graph.component';
-import { BlockSizesWeightsGraphComponent } from './components/block-sizes-weights-graph/block-sizes-weights-graph.component';
+import { AssetComponent } from './components/asset/asset.component';
+import { AssetsNavComponent } from './components/assets/assets-nav/assets-nav.component';
let routes: Routes = [
+ {
+ path: 'testnet',
+ children: [
+ {
+ path: '',
+ pathMatch: 'full',
+ loadChildren: () => import('./graphs/graphs.module').then(m => m.GraphsModule)
+ },
+ {
+ path: '',
+ component: MasterPageComponent,
+ children: [
+ {
+ path: 'tx/push',
+ component: PushTransactionComponent,
+ },
+ {
+ path: 'blocks',
+ component: LatestBlocksComponent,
+ },
+ {
+ path: 'about',
+ component: AboutComponent,
+ },
+ {
+ path: 'mining/blocks',
+ component: BlocksList,
+ },
+ {
+ path: 'terms-of-service',
+ component: TermsOfServiceComponent
+ },
+ {
+ path: 'privacy-policy',
+ component: PrivacyPolicyComponent
+ },
+ {
+ path: 'trademark-policy',
+ component: TrademarkPolicyComponent
+ },
+ {
+ path: 'address/:id',
+ children: [],
+ component: AddressComponent
+ },
+ {
+ path: 'tx',
+ component: StartComponent,
+ children: [
+ {
+ path: ':id',
+ component: TransactionComponent
+ },
+ ],
+ },
+ {
+ path: 'block',
+ component: StartComponent,
+ children: [
+ {
+ path: ':id',
+ component: BlockComponent
+ },
+ ],
+ },
+ {
+ path: 'docs',
+ loadChildren: () => import('./docs/docs.module').then(m => m.DocsModule)
+ },
+ {
+ path: 'api',
+ loadChildren: () => import('./docs/docs.module').then(m => m.DocsModule)
+ },
+ ],
+ },
+ {
+ path: 'status',
+ component: StatusViewComponent
+ },
+ {
+ path: '',
+ loadChildren: () => import('./graphs/graphs.module').then(m => m.GraphsModule)
+ },
+ {
+ path: '**',
+ redirectTo: '/testnet'
+ },
+ ]
+ },
+ {
+ path: 'signet',
+ children: [
+ {
+ path: '',
+ pathMatch: 'full',
+ loadChildren: () => import('./graphs/graphs.module').then(m => m.GraphsModule)
+ },
+ {
+ path: '',
+ component: MasterPageComponent,
+ children: [
+ {
+ path: 'tx/push',
+ component: PushTransactionComponent,
+ },
+ {
+ path: 'blocks',
+ component: LatestBlocksComponent,
+ },
+ {
+ path: 'about',
+ component: AboutComponent,
+ },
+ {
+ path: 'mining/blocks',
+ component: BlocksList,
+ },
+ {
+ path: 'terms-of-service',
+ component: TermsOfServiceComponent
+ },
+ {
+ path: 'privacy-policy',
+ component: PrivacyPolicyComponent
+ },
+ {
+ path: 'trademark-policy',
+ component: TrademarkPolicyComponent
+ },
+ {
+ path: 'address/:id',
+ children: [],
+ component: AddressComponent
+ },
+ {
+ path: 'tx',
+ component: StartComponent,
+ children: [
+ {
+ path: ':id',
+ component: TransactionComponent
+ },
+ ],
+ },
+ {
+ path: 'block',
+ component: StartComponent,
+ children: [
+ {
+ path: ':id',
+ component: BlockComponent
+ },
+ ],
+ },
+ {
+ path: 'docs',
+ loadChildren: () => import('./docs/docs.module').then(m => m.DocsModule)
+ },
+ {
+ path: 'api',
+ loadChildren: () => import('./docs/docs.module').then(m => m.DocsModule)
+ },
+ ],
+ },
+ {
+ path: 'status',
+ component: StatusViewComponent
+ },
+ {
+ path: '',
+ loadChildren: () => import('./graphs/graphs.module').then(m => m.GraphsModule)
+ },
+ {
+ path: '**',
+ redirectTo: '/signet'
+ },
+ ]
+ },
+ {
+ path: '',
+ pathMatch: 'full',
+ loadChildren: () => import('./graphs/graphs.module').then(m => m.GraphsModule)
+ },
{
path: '',
component: MasterPageComponent,
@@ -46,109 +214,17 @@ let routes: Routes = [
path: 'tx/push',
component: PushTransactionComponent,
},
- {
- path: '',
- component: StartComponent,
- children: [
- {
- path: '',
- component: DashboardComponent,
- },
- {
- path: 'tx/:id',
- component: TransactionComponent
- },
- {
- path: 'block/:id',
- component: BlockComponent
- },
- {
- path: 'mempool-block/:id',
- component: MempoolBlockComponent
- },
- {
- path: 'mining',
- component: MiningDashboardComponent,
- },
- ],
- },
{
path: 'blocks',
component: LatestBlocksComponent,
},
- {
- path: 'mining',
- component: MiningStartComponent,
- children: [
- {
- path: 'blocks',
- component: BlocksList,
- },
- {
- path: 'pool',
- children: [
- {
- path: ':slug',
- component: PoolComponent,
- },
- ]
- },
- ]
- },
- {
- path: 'graphs',
- component: GraphsComponent,
- children: [
- {
- path: '',
- pathMatch: 'full',
- redirectTo: 'mempool',
- },
- {
- path: 'mempool',
- component: StatisticsComponent,
- },
- {
- path: 'mining/hashrate-difficulty',
- component: HashrateChartComponent,
- },
- {
- path: 'mining/pools-dominance',
- component: HashrateChartPoolsComponent,
- },
- {
- path: 'mining/pools',
- component: PoolRankingComponent,
- },
- {
- path: 'mining/block-fees',
- component: BlockFeesGraphComponent,
- },
- {
- path: 'mining/block-rewards',
- component: BlockRewardsGraphComponent,
- },
- {
- path: 'mining/block-fee-rates',
- component: BlockFeeRatesGraphComponent,
- },
- {
- path: 'mining/block-sizes-weights',
- component: BlockSizesWeightsGraphComponent,
- },
- ],
- },
{
path: 'about',
component: AboutComponent,
},
{
- path: 'docs',
- loadChildren: () => import('./docs/docs.module').then(m => m.DocsModule)
- },
- {
- path: 'api',
- loadChildren: () => import('./docs/docs.module').then(m => m.DocsModule)
+ path: 'mining/blocks',
+ component: BlocksList,
},
{
path: 'terms-of-service',
@@ -167,276 +243,36 @@ let routes: Routes = [
children: [],
component: AddressComponent
},
+ {
+ path: 'tx',
+ component: StartComponent,
+ children: [
+ {
+ path: ':id',
+ component: TransactionComponent
+ },
+ ],
+ },
+ {
+ path: 'block',
+ component: StartComponent,
+ children: [
+ {
+ path: ':id',
+ component: BlockComponent
+ },
+ ],
+ },
+ {
+ path: 'docs',
+ loadChildren: () => import('./docs/docs.module').then(m => m.DocsModule)
+ },
+ {
+ path: 'api',
+ loadChildren: () => import('./docs/docs.module').then(m => m.DocsModule)
+ },
],
},
- {
- path: 'testnet',
- children: [
- {
- path: '',
- component: MasterPageComponent,
- children: [
- {
- path: 'tx/push',
- component: PushTransactionComponent,
- },
- {
- path: '',
- component: StartComponent,
- children: [
- {
- path: '',
- component: DashboardComponent
- },
- {
- path: 'tx/:id',
- component: TransactionComponent
- },
- {
- path: 'block/:id',
- component: BlockComponent
- },
- {
- path: 'mempool-block/:id',
- component: MempoolBlockComponent
- },
- {
- path: 'mining',
- component: MiningDashboardComponent,
- },
- ],
- },
- {
- path: 'blocks',
- component: LatestBlocksComponent,
- },
- {
- path: 'mining',
- component: MiningStartComponent,
- children: [
- {
- path: 'blocks',
- component: BlocksList,
- },
- {
- path: 'pool',
- children: [
- {
- path: ':slug',
- component: PoolComponent,
- },
- ]
- },
- ]
- },
- {
- path: 'graphs',
- component: GraphsComponent,
- children: [
- {
- path: '',
- pathMatch: 'full',
- redirectTo: 'mempool',
- },
- {
- path: 'mempool',
- component: StatisticsComponent,
- },
- {
- path: 'mining/hashrate-difficulty',
- component: HashrateChartComponent,
- },
- {
- path: 'mining/pools-dominance',
- component: HashrateChartPoolsComponent,
- },
- {
- path: 'mining/pools',
- component: PoolRankingComponent,
- },
- {
- path: 'mining/block-fees',
- component: BlockFeesGraphComponent,
- },
- {
- path: 'mining/block-rewards',
- component: BlockRewardsGraphComponent,
- },
- {
- path: 'mining/block-fee-rates',
- component: BlockFeeRatesGraphComponent,
- },
- {
- path: 'mining/block-sizes-weights',
- component: BlockSizesWeightsGraphComponent,
- },
- ]
- },
- {
- path: 'address/:id',
- children: [],
- component: AddressComponent
- },
- {
- path: 'docs',
- loadChildren: () => import('./docs/docs.module').then(m => m.DocsModule)
- },
- {
- path: 'api',
- loadChildren: () => import('./docs/docs.module').then(m => m.DocsModule)
- },
- ],
- },
- {
- path: 'tv',
- component: TelevisionComponent
- },
- {
- path: 'status',
- component: StatusViewComponent
- },
- {
- path: '**',
- redirectTo: '/testnet'
- },
- ]
- },
- {
- path: 'signet',
- children: [
- {
- path: '',
- component: MasterPageComponent,
- children: [
- {
- path: 'tx/push',
- component: PushTransactionComponent,
- },
- {
- path: '',
- component: StartComponent,
- children: [
- {
- path: '',
- component: DashboardComponent
- },
- {
- path: 'tx/:id',
- component: TransactionComponent
- },
- {
- path: 'block/:id',
- component: BlockComponent
- },
- {
- path: 'mempool-block/:id',
- component: MempoolBlockComponent
- },
- {
- path: 'mining',
- component: MiningDashboardComponent,
- },
- ],
- },
- {
- path: 'blocks',
- component: LatestBlocksComponent,
- },
- {
- path: 'mining',
- component: MiningStartComponent,
- children: [
- {
- path: 'blocks',
- component: BlocksList,
- },
- {
- path: 'pool',
- children: [
- {
- path: ':slug',
- component: PoolComponent,
- },
- ]
- },
- ]
- },
- {
- path: 'graphs',
- component: GraphsComponent,
- children: [
- {
- path: '',
- pathMatch: 'full',
- redirectTo: 'mempool',
- },
- {
- path: 'mempool',
- component: StatisticsComponent,
- },
- {
- path: 'mining/hashrate-difficulty',
- component: HashrateChartComponent,
- },
- {
- path: 'mining/pools-dominance',
- component: HashrateChartPoolsComponent,
- },
- {
- path: 'mining/pools',
- component: PoolRankingComponent,
- },
- {
- path: 'mining/block-fees',
- component: BlockFeesGraphComponent,
- },
- {
- path: 'mining/block-rewards',
- component: BlockRewardsGraphComponent,
- },
- {
- path: 'mining/block-fee-rates',
- component: BlockFeeRatesGraphComponent,
- },
- {
- path: 'mining/block-sizes-weights',
- component: BlockSizesWeightsGraphComponent,
- },
- ]
- },
- {
- path: 'address/:id',
- children: [],
- component: AddressComponent
- },
- {
- path: 'docs',
- loadChildren: () => import('./docs/docs.module').then(m => m.DocsModule)
- },
- {
- path: 'api',
- loadChildren: () => import('./docs/docs.module').then(m => m.DocsModule)
- },
- ],
- },
- {
- path: 'tv',
- component: TelevisionComponent
- },
- {
- path: 'status',
- component: StatusViewComponent
- },
- {
- path: '**',
- redirectTo: '/signet'
- },
- ]
- },
- {
- path: 'tv',
- component: TelevisionComponent,
- },
{
path: 'status',
component: StatusViewComponent
@@ -445,6 +281,10 @@ let routes: Routes = [
path: 'sponsor',
component: SponsorComponent,
},
+ {
+ path: '',
+ loadChildren: () => import('./graphs/graphs.module').then(m => m.GraphsModule)
+ },
{
path: '**',
redirectTo: ''
@@ -464,237 +304,233 @@ if (browserWindowEnv && browserWindowEnv.BASE_MODULE === 'bisq') {
}
if (browserWindowEnv && browserWindowEnv.BASE_MODULE === 'liquid') {
- routes = [{
- path: '',
- component: LiquidMasterPageComponent,
- children: [
- {
- path: '',
- component: StartComponent,
- children: [
- {
- path: '',
- component: DashboardComponent
- },
- {
- path: 'tx/push',
- component: PushTransactionComponent,
- },
- {
- path: 'tx/:id',
- component: TransactionComponent
- },
- {
- path: 'block/:id',
- component: BlockComponent
- },
- {
- path: 'mempool-block/:id',
- component: MempoolBlockComponent
- },
- ],
- },
- {
- path: 'blocks',
- component: LatestBlocksComponent,
- },
- {
- path: 'graphs',
- component: GraphsComponent,
- children: [
- {
- path: '',
- pathMatch: 'full',
- redirectTo: 'mempool',
- },
- {
- path: 'mempool',
- component: StatisticsComponent,
- }
- ]
- },
- {
- path: 'address/:id',
- component: AddressComponent
- },
- {
- path: 'assets',
- component: AssetsNavComponent,
- children: [
- {
- path: 'featured',
- component: AssetsFeaturedComponent,
- },
- {
- path: 'all',
- component: AssetsComponent,
- },
- {
- path: 'asset/:id',
- component: AssetComponent
- },
- {
- path: 'group/:id',
- component: AssetGroupComponent
- },
- {
- path: '**',
- redirectTo: 'featured'
- }
- ]
- },
- {
- path: 'docs',
- loadChildren: () => import('./docs/docs.module').then(m => m.DocsModule)
- },
- {
- path: 'api',
- loadChildren: () => import('./docs/docs.module').then(m => m.DocsModule)
- },
- {
- path: 'about',
- component: AboutComponent,
- },
- {
- path: 'terms-of-service',
- component: TermsOfServiceComponent
- },
- {
- path: 'privacy-policy',
- component: PrivacyPolicyComponent
- },
- {
- path: 'trademark-policy',
- component: TrademarkPolicyComponent
- },
- ],
- },
- {
- path: 'testnet',
- children: [
- {
- path: '',
- component: LiquidMasterPageComponent,
- children: [
- {
- path: '',
- component: StartComponent,
+ routes = [
+ {
+ path: 'testnet',
+ children: [
+ {
+ path: '',
+ pathMatch: 'full',
+ loadChildren: () => import('./graphs/graphs.module').then(m => m.GraphsModule)
+ },
+ {
+ path: '',
+ component: LiquidMasterPageComponent,
+ children: [
+ {
+ path: 'tx/push',
+ component: PushTransactionComponent,
+ },
+ {
+ path: 'blocks',
+ component: LatestBlocksComponent,
+ },
+ {
+ path: 'about',
+ component: AboutComponent,
+ },
+ {
+ path: 'mining/blocks',
+ component: BlocksList,
+ },
+ {
+ path: 'terms-of-service',
+ component: TermsOfServiceComponent
+ },
+ {
+ path: 'privacy-policy',
+ component: PrivacyPolicyComponent
+ },
+ {
+ path: 'trademark-policy',
+ component: TrademarkPolicyComponent
+ },
+ {
+ path: 'address/:id',
+ children: [],
+ component: AddressComponent
+ },
+ {
+ path: 'tx',
+ component: StartComponent,
+ children: [
+ {
+ path: ':id',
+ component: TransactionComponent
+ },
+ ],
+ },
+ {
+ path: 'block',
+ component: StartComponent,
+ children: [
+ {
+ path: ':id',
+ component: BlockComponent
+ },
+ ],
+ },
+ {
+ path: 'assets',
+ component: AssetsNavComponent,
+ children: [
+ {
+ path: 'all',
+ component: AssetsComponent,
+ },
+ {
+ path: 'asset/:id',
+ component: AssetComponent
+ },
+ {
+ path: 'group/:id',
+ component: AssetGroupComponent
+ },
+ {
+ path: '**',
+ redirectTo: 'all'
+ }
+ ]
+ },
+ {
+ path: 'docs',
+ loadChildren: () => import('./docs/docs.module').then(m => m.DocsModule)
+ },
+ {
+ path: 'api',
+ loadChildren: () => import('./docs/docs.module').then(m => m.DocsModule)
+ },
+ ],
+ },
+ {
+ path: 'status',
+ component: StatusViewComponent
+ },
+ {
+ path: '',
+ loadChildren: () => import('./graphs/graphs.module').then(m => m.GraphsModule)
+ },
+ {
+ path: '**',
+ redirectTo: '/signet'
+ },
+ ]
+ },
+ {
+ path: '',
+ pathMatch: 'full',
+ loadChildren: () => import('./graphs/graphs.module').then(m => m.GraphsModule)
+ },
+ {
+ path: '',
+ component: LiquidMasterPageComponent,
+ children: [
+ {
+ path: 'tx/push',
+ component: PushTransactionComponent,
+ },
+ {
+ path: 'blocks',
+ component: LatestBlocksComponent,
+ },
+ {
+ path: 'about',
+ component: AboutComponent,
+ },
+ {
+ path: 'mining/blocks',
+ component: BlocksList,
+ },
+ {
+ path: 'terms-of-service',
+ component: TermsOfServiceComponent
+ },
+ {
+ path: 'privacy-policy',
+ component: PrivacyPolicyComponent
+ },
+ {
+ path: 'trademark-policy',
+ component: TrademarkPolicyComponent
+ },
+ {
+ path: 'address/:id',
+ children: [],
+ component: AddressComponent
+ },
+ {
+ path: 'tx',
+ component: StartComponent,
+ children: [
+ {
+ path: ':id',
+ component: TransactionComponent
+ },
+ ],
+ },
+ {
+ path: 'block',
+ component: StartComponent,
children: [
- {
- path: '',
- component: DashboardComponent
- },
- {
- path: 'tx/push',
- component: PushTransactionComponent,
- },
- {
- path: 'tx/:id',
- component: TransactionComponent
- },
- {
- path: 'block/:id',
- component: BlockComponent
- },
- {
- path: 'mempool-block/:id',
- component: MempoolBlockComponent
- },
- ],
- },
- {
- path: 'blocks',
- component: LatestBlocksComponent,
- },
- {
- path: 'graphs',
- component: GraphsComponent,
- children: [
- {
- path: '',
- pathMatch: 'full',
- redirectTo: 'mempool',
- },
- {
- path: 'mempool',
- component: StatisticsComponent,
- }
- ]
- },
- {
- path: 'address/:id',
- component: AddressComponent
- },
- {
- path: 'assets',
- component: AssetsNavComponent,
- children: [
- {
- path: 'all',
- component: AssetsComponent,
- },
- {
- path: 'asset/:id',
- component: AssetComponent
- },
- {
- path: 'group/:id',
- component: AssetGroupComponent
- },
- {
- path: '**',
- redirectTo: 'all'
- }
- ]
- },
- {
- path: 'docs',
- loadChildren: () => import('./docs/docs.module').then(m => m.DocsModule)
- },
- {
- path: 'api',
- loadChildren: () => import('./docs/docs.module').then(m => m.DocsModule)
- },
- {
- path: 'about',
- component: AboutComponent,
- },
- {
- path: 'terms-of-service',
- component: TermsOfServiceComponent
- },
- {
- path: 'privacy-policy',
- component: PrivacyPolicyComponent
- },
- {
- path: 'trademark-policy',
- component: TrademarkPolicyComponent
- },
- ],
- },
- {
- path: 'tv',
- component: TelevisionComponent
- },
- {
- path: 'status',
- component: StatusViewComponent
- },
- ]
- },
- {
- path: 'tv',
- component: TelevisionComponent
- },
- {
- path: 'status',
- component: StatusViewComponent
- },
- {
- path: '**',
- redirectTo: '/testnet'
- }];
+ {
+ path: ':id',
+ component: BlockComponent
+ },
+ ],
+ },
+ {
+ path: 'assets',
+ component: AssetsNavComponent,
+ children: [
+ {
+ path: 'featured',
+ component: AssetsFeaturedComponent,
+ },
+ {
+ path: 'all',
+ component: AssetsComponent,
+ },
+ {
+ path: 'asset/:id',
+ component: AssetComponent
+ },
+ {
+ path: 'group/:id',
+ component: AssetGroupComponent
+ },
+ {
+ path: '**',
+ redirectTo: 'all'
+ }
+ ]
+ },
+ {
+ path: 'docs',
+ loadChildren: () => import('./docs/docs.module').then(m => m.DocsModule)
+ },
+ {
+ path: 'api',
+ loadChildren: () => import('./docs/docs.module').then(m => m.DocsModule)
+ },
+ ],
+ },
+ {
+ path: 'status',
+ component: StatusViewComponent
+ },
+ {
+ path: 'sponsor',
+ component: SponsorComponent,
+ },
+ {
+ path: '',
+ loadChildren: () => import('./graphs/graphs.module').then(m => m.GraphsModule)
+ },
+ {
+ path: '**',
+ redirectTo: ''
+ },
+ ];
}
@NgModule({
diff --git a/frontend/src/app/app.module.ts b/frontend/src/app/app.module.ts
index 4b4e9eba9..8845f4255 100644
--- a/frontend/src/app/app.module.ts
+++ b/frontend/src/app/app.module.ts
@@ -2,141 +2,23 @@ import { BrowserModule, BrowserTransferStateModule } from '@angular/platform-bro
import { NgModule } from '@angular/core';
import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
-import { InfiniteScrollModule } from 'ngx-infinite-scroll';
-import { NgxEchartsModule } from 'ngx-echarts';
-
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './components/app/app.component';
-
-import { StartComponent } from './components/start/start.component';
import { ElectrsApiService } from './services/electrs-api.service';
-import { TransactionComponent } from './components/transaction/transaction.component';
-import { TransactionsListComponent } from './components/transactions-list/transactions-list.component';
import { StateService } from './services/state.service';
-import { BlockComponent } from './components/block/block.component';
-import { AddressComponent } from './components/address/address.component';
-import { SearchFormComponent } from './components/search-form/search-form.component';
-import { LatestBlocksComponent } from './components/latest-blocks/latest-blocks.component';
import { WebsocketService } from './services/websocket.service';
-import { AddressLabelsComponent } from './components/address-labels/address-labels.component';
-import { MasterPageComponent } from './components/master-page/master-page.component';
-import { BisqMasterPageComponent } from './components/bisq-master-page/bisq-master-page.component';
-import { LiquidMasterPageComponent } from './components/liquid-master-page/liquid-master-page.component';
-import { AboutComponent } from './components/about/about.component';
-import { TelevisionComponent } from './components/television/television.component';
-import { StatisticsComponent } from './components/statistics/statistics.component';
-import { FooterComponent } from './components/footer/footer.component';
import { AudioService } from './services/audio.service';
-import { MempoolBlockComponent } from './components/mempool-block/mempool-block.component';
-import { FeeDistributionGraphComponent } from './components/fee-distribution-graph/fee-distribution-graph.component';
-import { IncomingTransactionsGraphComponent } from './components/incoming-transactions-graph/incoming-transactions-graph.component';
-import { TimeSpanComponent } from './components/time-span/time-span.component';
import { SeoService } from './services/seo.service';
-import { MempoolGraphComponent } from './components/mempool-graph/mempool-graph.component';
-import { PoolRankingComponent } from './components/pool-ranking/pool-ranking.component';
-import { PoolComponent } from './components/pool/pool.component';
-import { LbtcPegsGraphComponent } from './components/lbtc-pegs-graph/lbtc-pegs-graph.component';
-import { AssetComponent } from './components/asset/asset.component';
-import { AssetsComponent } from './components/assets/assets.component';
-import { AssetsNavComponent } from './components/assets/assets-nav/assets-nav.component';
-import { StatusViewComponent } from './components/status-view/status-view.component';
import { SharedModule } from './shared/shared.module';
-import { NgbTypeaheadModule } from '@ng-bootstrap/ng-bootstrap';
-import { FeesBoxComponent } from './components/fees-box/fees-box.component';
-import { DashboardComponent } from './dashboard/dashboard.component';
-import { DifficultyComponent } from './components/difficulty/difficulty.component';
-import { FontAwesomeModule, FaIconLibrary } from '@fortawesome/angular-fontawesome';
-import { faFilter, faAngleDown, faAngleUp, faAngleRight, faAngleLeft, faBolt, faChartArea, faCogs, faCubes, faHammer, faDatabase, faExchangeAlt, faInfoCircle,
- faLink, faList, faSearch, faCaretUp, faCaretDown, faTachometerAlt, faThList, faTint, faTv, faAngleDoubleDown, faSortUp, faAngleDoubleUp, faChevronDown,
- faFileAlt, faRedoAlt, faArrowAltCircleRight, faExternalLinkAlt, faBook, faListUl, faDownload } from '@fortawesome/free-solid-svg-icons';
-import { TermsOfServiceComponent } from './components/terms-of-service/terms-of-service.component';
-import { PrivacyPolicyComponent } from './components/privacy-policy/privacy-policy.component';
-import { TrademarkPolicyComponent } from './components/trademark-policy/trademark-policy.component';
import { StorageService } from './services/storage.service';
import { HttpCacheInterceptor } from './services/http-cache.interceptor';
import { LanguageService } from './services/language.service';
-import { SponsorComponent } from './components/sponsor/sponsor.component';
-import { PushTransactionComponent } from './components/push-transaction/push-transaction.component';
-import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
-import { AssetsFeaturedComponent } from './components/assets/assets-featured/assets-featured.component';
-import { AssetGroupComponent } from './components/assets/asset-group/asset-group.component';
-import { AssetCirculationComponent } from './components/asset-circulation/asset-circulation.component';
-import { MiningDashboardComponent } from './components/mining-dashboard/mining-dashboard.component';
-import { HashrateChartComponent } from './components/hashrate-chart/hashrate-chart.component';
-import { HashrateChartPoolsComponent } from './components/hashrates-chart-pools/hashrate-chart-pools.component';
-import { MiningStartComponent } from './components/mining-start/mining-start.component';
-import { AmountShortenerPipe } from './shared/pipes/amount-shortener.pipe';
import { ShortenStringPipe } from './shared/pipes/shorten-string-pipe/shorten-string.pipe';
import { CapAddressPipe } from './shared/pipes/cap-address-pipe/cap-address-pipe';
-import { GraphsComponent } from './components/graphs/graphs.component';
-import { DifficultyAdjustmentsTable } from './components/difficulty-adjustments-table/difficulty-adjustments-table.components';
-import { BlocksList } from './components/blocks-list/blocks-list.component';
-import { RewardStatsComponent } from './components/reward-stats/reward-stats.component';
-import { DataCyDirective } from './data-cy.directive';
-import { BlockFeesGraphComponent } from './components/block-fees-graph/block-fees-graph.component';
-import { BlockRewardsGraphComponent } from './components/block-rewards-graph/block-rewards-graph.component';
-import { BlockFeeRatesGraphComponent } from './components/block-fee-rates-graph/block-fee-rates-graph.component';
-import { LoadingIndicatorComponent } from './components/loading-indicator/loading-indicator.component';
-import { IndexingProgressComponent } from './components/indexing-progress/indexing-progress.component';
-import { BlockSizesWeightsGraphComponent } from './components/block-sizes-weights-graph/block-sizes-weights-graph.component';
@NgModule({
declarations: [
AppComponent,
- AboutComponent,
- MasterPageComponent,
- BisqMasterPageComponent,
- LiquidMasterPageComponent,
- TelevisionComponent,
- StartComponent,
- StatisticsComponent,
- TransactionComponent,
- BlockComponent,
- TransactionsListComponent,
- AddressComponent,
- LatestBlocksComponent,
- SearchFormComponent,
- TimeSpanComponent,
- AddressLabelsComponent,
- FooterComponent,
- MempoolBlockComponent,
- FeeDistributionGraphComponent,
- IncomingTransactionsGraphComponent,
- MempoolGraphComponent,
- PoolRankingComponent,
- PoolComponent,
- LbtcPegsGraphComponent,
- AssetComponent,
- AssetsComponent,
- StatusViewComponent,
- FeesBoxComponent,
- DashboardComponent,
- DifficultyComponent,
- TermsOfServiceComponent,
- PrivacyPolicyComponent,
- TrademarkPolicyComponent,
- SponsorComponent,
- PushTransactionComponent,
- AssetsNavComponent,
- AssetsFeaturedComponent,
- AssetGroupComponent,
- AssetCirculationComponent,
- MiningDashboardComponent,
- HashrateChartComponent,
- HashrateChartPoolsComponent,
- MiningStartComponent,
- AmountShortenerPipe,
- GraphsComponent,
- DifficultyAdjustmentsTable,
- BlocksList,
- DataCyDirective,
- RewardStatsComponent,
- BlockFeesGraphComponent,
- BlockRewardsGraphComponent,
- BlockFeeRatesGraphComponent,
- LoadingIndicatorComponent,
- IndexingProgressComponent,
- BlockSizesWeightsGraphComponent
],
imports: [
BrowserModule.withServerTransition({ appId: 'serverApp' }),
@@ -144,14 +26,7 @@ import { BlockSizesWeightsGraphComponent } from './components/block-sizes-weight
AppRoutingModule,
HttpClientModule,
BrowserAnimationsModule,
- InfiniteScrollModule,
- NgbTypeaheadModule,
- NgbModule,
- FontAwesomeModule,
SharedModule,
- NgxEchartsModule.forRoot({
- echarts: () => import('echarts')
- })
],
providers: [
ElectrsApiService,
@@ -167,41 +42,4 @@ import { BlockSizesWeightsGraphComponent } from './components/block-sizes-weight
],
bootstrap: [AppComponent]
})
-export class AppModule {
- constructor(library: FaIconLibrary) {
- library.addIcons(faInfoCircle);
- library.addIcons(faChartArea);
- library.addIcons(faTv);
- library.addIcons(faTachometerAlt);
- library.addIcons(faCubes);
- library.addIcons(faHammer);
- library.addIcons(faCogs);
- library.addIcons(faThList);
- library.addIcons(faList);
- library.addIcons(faTachometerAlt);
- library.addIcons(faDatabase);
- library.addIcons(faSearch);
- library.addIcons(faLink);
- library.addIcons(faBolt);
- library.addIcons(faTint);
- library.addIcons(faFilter);
- library.addIcons(faAngleDown);
- library.addIcons(faAngleUp);
- library.addIcons(faExchangeAlt);
- library.addIcons(faAngleDoubleUp);
- library.addIcons(faAngleDoubleDown);
- library.addIcons(faChevronDown);
- library.addIcons(faFileAlt);
- library.addIcons(faRedoAlt);
- library.addIcons(faArrowAltCircleRight);
- library.addIcons(faExternalLinkAlt);
- library.addIcons(faSortUp);
- library.addIcons(faCaretUp);
- library.addIcons(faCaretDown);
- library.addIcons(faAngleRight);
- library.addIcons(faAngleLeft);
- library.addIcons(faBook);
- library.addIcons(faListUl);
- library.addIcons(faDownload);
- }
-}
+export class AppModule { }
diff --git a/frontend/src/app/bisq/bisq.module.ts b/frontend/src/app/bisq/bisq.module.ts
index 77b0a26e8..34c09f971 100644
--- a/frontend/src/app/bisq/bisq.module.ts
+++ b/frontend/src/app/bisq/bisq.module.ts
@@ -24,6 +24,7 @@ import { BisqAddressComponent } from './bisq-address/bisq-address.component';
import { BisqStatsComponent } from './bisq-stats/bisq-stats.component';
import { BsqAmountComponent } from './bsq-amount/bsq-amount.component';
import { BisqTradesComponent } from './bisq-trades/bisq-trades.component';
+import { CommonModule } from '@angular/common';
@NgModule({
declarations: [
@@ -46,6 +47,7 @@ import { BisqTradesComponent } from './bisq-trades/bisq-trades.component';
BisqMainDashboardComponent,
],
imports: [
+ CommonModule,
BisqRoutingModule,
SharedModule,
NgbPaginationModule,
diff --git a/frontend/src/app/components/mining-start/mining-start.component.html b/frontend/src/app/components/mining-start/mining-start.component.html
deleted file mode 100644
index 0680b43f9..000000000
--- a/frontend/src/app/components/mining-start/mining-start.component.html
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/frontend/src/app/components/mining-start/mining-start.component.ts b/frontend/src/app/components/mining-start/mining-start.component.ts
deleted file mode 100644
index 6850cfa54..000000000
--- a/frontend/src/app/components/mining-start/mining-start.component.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-import { Component, OnInit } from '@angular/core';
-
-@Component({
- selector: 'app-mining-start',
- templateUrl: './mining-start.component.html',
-})
-export class MiningStartComponent implements OnInit {
-
- constructor() { }
-
- ngOnInit(): void {
- }
-
-}
diff --git a/frontend/src/app/graphs/graphs.module.ts b/frontend/src/app/graphs/graphs.module.ts
new file mode 100644
index 000000000..a080f6df0
--- /dev/null
+++ b/frontend/src/app/graphs/graphs.module.ts
@@ -0,0 +1,58 @@
+import { NgModule } from '@angular/core';
+import { NgxEchartsModule } from 'ngx-echarts';
+import { GraphsRoutingModule } from './graphs.routing.module';
+import { SharedModule } from '../shared/shared.module';
+
+import { BlockFeesGraphComponent } from '../components/block-fees-graph/block-fees-graph.component';
+import { BlockRewardsGraphComponent } from '../components/block-rewards-graph/block-rewards-graph.component';
+import { BlockFeeRatesGraphComponent } from '../components/block-fee-rates-graph/block-fee-rates-graph.component';
+import { BlockSizesWeightsGraphComponent } from '../components/block-sizes-weights-graph/block-sizes-weights-graph.component';
+import { FeeDistributionGraphComponent } from '../components/fee-distribution-graph/fee-distribution-graph.component';
+import { IncomingTransactionsGraphComponent } from '../components/incoming-transactions-graph/incoming-transactions-graph.component';
+import { MempoolGraphComponent } from '../components/mempool-graph/mempool-graph.component';
+import { LbtcPegsGraphComponent } from '../components/lbtc-pegs-graph/lbtc-pegs-graph.component';
+import { GraphsComponent } from '../components/graphs/graphs.component';
+import { StatisticsComponent } from '../components/statistics/statistics.component';
+import { MempoolBlockComponent } from '../components/mempool-block/mempool-block.component';
+import { PoolRankingComponent } from '../components/pool-ranking/pool-ranking.component';
+import { PoolComponent } from '../components/pool/pool.component';
+import { TelevisionComponent } from '../components/television/television.component';
+import { DashboardComponent } from '../dashboard/dashboard.component';
+import { MiningDashboardComponent } from '../components/mining-dashboard/mining-dashboard.component';
+import { HashrateChartComponent } from '../components/hashrate-chart/hashrate-chart.component';
+import { HashrateChartPoolsComponent } from '../components/hashrates-chart-pools/hashrate-chart-pools.component';
+import { CommonModule } from '@angular/common';
+
+@NgModule({
+ declarations: [
+ DashboardComponent,
+ MempoolBlockComponent,
+
+ MiningDashboardComponent,
+ PoolComponent,
+ PoolRankingComponent,
+ TelevisionComponent,
+
+ StatisticsComponent,
+ GraphsComponent,
+ BlockFeesGraphComponent,
+ BlockRewardsGraphComponent,
+ BlockFeeRatesGraphComponent,
+ BlockSizesWeightsGraphComponent,
+ FeeDistributionGraphComponent,
+ IncomingTransactionsGraphComponent,
+ MempoolGraphComponent,
+ LbtcPegsGraphComponent,
+ HashrateChartComponent,
+ HashrateChartPoolsComponent,
+ ],
+ imports: [
+ CommonModule,
+ SharedModule,
+ GraphsRoutingModule,
+ NgxEchartsModule.forRoot({
+ echarts: () => import('echarts')
+ })
+ ]
+})
+export class GraphsModule { }
diff --git a/frontend/src/app/graphs/graphs.routing.module.ts b/frontend/src/app/graphs/graphs.routing.module.ts
new file mode 100644
index 000000000..c8546e876
--- /dev/null
+++ b/frontend/src/app/graphs/graphs.routing.module.ts
@@ -0,0 +1,106 @@
+import { NgModule } from '@angular/core';
+import { RouterModule, Routes } from '@angular/router';
+import { BlockFeeRatesGraphComponent } from '../components/block-fee-rates-graph/block-fee-rates-graph.component';
+import { BlockFeesGraphComponent } from '../components/block-fees-graph/block-fees-graph.component';
+import { BlockRewardsGraphComponent } from '../components/block-rewards-graph/block-rewards-graph.component';
+import { BlockSizesWeightsGraphComponent } from '../components/block-sizes-weights-graph/block-sizes-weights-graph.component';
+import { GraphsComponent } from '../components/graphs/graphs.component';
+import { HashrateChartComponent } from '../components/hashrate-chart/hashrate-chart.component';
+import { HashrateChartPoolsComponent } from '../components/hashrates-chart-pools/hashrate-chart-pools.component';
+import { MasterPageComponent } from '../components/master-page/master-page.component';
+import { MempoolBlockComponent } from '../components/mempool-block/mempool-block.component';
+import { MiningDashboardComponent } from '../components/mining-dashboard/mining-dashboard.component';
+import { PoolRankingComponent } from '../components/pool-ranking/pool-ranking.component';
+import { PoolComponent } from '../components/pool/pool.component';
+import { StartComponent } from '../components/start/start.component';
+import { StatisticsComponent } from '../components/statistics/statistics.component';
+import { TelevisionComponent } from '../components/television/television.component';
+import { DashboardComponent } from '../dashboard/dashboard.component';
+
+const routes: Routes = [
+ {
+ path: '',
+ component: MasterPageComponent,
+ children: [
+ {
+ path: 'mining/pool/:slug',
+ component: PoolComponent,
+ },
+ {
+ path: 'mining',
+ component: StartComponent,
+ children: [
+ {
+ path: '',
+ component: MiningDashboardComponent,
+ },
+ ]
+ },
+ {
+ path: 'mempool-block/:id',
+ component: StartComponent,
+ children: [
+ {
+ path: '',
+ component: MempoolBlockComponent,
+ },
+ ]
+ },
+ {
+ path: 'graphs',
+ component: GraphsComponent,
+ children: [
+ {
+ path: 'mempool',
+ component: StatisticsComponent,
+ },
+ {
+ path: 'mining/hashrate-difficulty',
+ component: HashrateChartComponent,
+ },
+ {
+ path: 'mining/pools-dominance',
+ component: HashrateChartPoolsComponent,
+ },
+ {
+ path: 'mining/pools',
+ component: PoolRankingComponent,
+ },
+ {
+ path: 'mining/block-fees',
+ component: BlockFeesGraphComponent,
+ },
+ {
+ path: 'mining/block-rewards',
+ component: BlockRewardsGraphComponent,
+ },
+ {
+ path: 'mining/block-fee-rates',
+ component: BlockFeeRatesGraphComponent,
+ },
+ {
+ path: 'mining/block-sizes-weights',
+ component: BlockSizesWeightsGraphComponent,
+ },
+ ]
+ },
+ {
+ path: '',
+ component: StartComponent,
+ children: [{
+ path: '',
+ component: DashboardComponent,
+ }]
+ },
+ ]
+ },
+ {
+ path: 'tv',
+ component: TelevisionComponent
+ },
+];
+
+@NgModule({
+ imports: [RouterModule.forChild(routes)],
+})
+export class GraphsRoutingModule { }
diff --git a/frontend/src/app/shared/shared.module.ts b/frontend/src/app/shared/shared.module.ts
index 8d57630c3..488131d84 100644
--- a/frontend/src/app/shared/shared.module.ts
+++ b/frontend/src/app/shared/shared.module.ts
@@ -1,5 +1,16 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
+import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
+import { NgbTypeaheadModule } from '@ng-bootstrap/ng-bootstrap';
+import { FontAwesomeModule, FaIconLibrary } from '@fortawesome/angular-fontawesome';
+import { faFilter, faAngleDown, faAngleUp, faAngleRight, faAngleLeft, faBolt, faChartArea, faCogs, faCubes, faHammer, faDatabase, faExchangeAlt, faInfoCircle,
+ faLink, faList, faSearch, faCaretUp, faCaretDown, faTachometerAlt, faThList, faTint, faTv, faAngleDoubleDown, faSortUp, faAngleDoubleUp, faChevronDown,
+ faFileAlt, faRedoAlt, faArrowAltCircleRight, faExternalLinkAlt, faBook, faListUl, faDownload } from '@fortawesome/free-solid-svg-icons';
+import { InfiniteScrollModule } from 'ngx-infinite-scroll';
+import { MasterPageComponent } from '../components/master-page/master-page.component';
+import { BisqMasterPageComponent } from '../components/bisq-master-page/bisq-master-page.component';
+import { LiquidMasterPageComponent } from '../components/liquid-master-page/liquid-master-page.component';
+import { AboutComponent } from '../components/about/about.component';
import { VbytesPipe } from './pipes/bytes-pipe/vbytes.pipe';
import { ShortenStringPipe } from './pipes/shorten-string-pipe/shorten-string.pipe';
import { CeilPipe } from './pipes/math-ceil/math-ceil.pipe';
@@ -31,6 +42,38 @@ import { AmountComponent } from '../components/amount/amount.component';
import { RouterModule } from '@angular/router';
import { CapAddressPipe } from './pipes/cap-address-pipe/cap-address-pipe';
+import { StartComponent } from '../components/start/start.component';
+import { TransactionComponent } from '../components/transaction/transaction.component';
+import { TransactionsListComponent } from '../components/transactions-list/transactions-list.component';
+import { BlockComponent } from '../components/block/block.component';
+import { AddressComponent } from '../components/address/address.component';
+import { SearchFormComponent } from '../components/search-form/search-form.component';
+import { LatestBlocksComponent } from '../components/latest-blocks/latest-blocks.component';
+import { AddressLabelsComponent } from '../components/address-labels/address-labels.component';
+import { FooterComponent } from '../components/footer/footer.component';
+import { TimeSpanComponent } from '../components/time-span/time-span.component';
+import { AssetComponent } from '../components/asset/asset.component';
+import { AssetsComponent } from '../components/assets/assets.component';
+import { AssetsNavComponent } from '../components/assets/assets-nav/assets-nav.component';
+import { StatusViewComponent } from '../components/status-view/status-view.component';
+import { FeesBoxComponent } from '../components/fees-box/fees-box.component';
+import { DifficultyComponent } from '../components/difficulty/difficulty.component';
+import { TermsOfServiceComponent } from '../components/terms-of-service/terms-of-service.component';
+import { PrivacyPolicyComponent } from '../components/privacy-policy/privacy-policy.component';
+import { TrademarkPolicyComponent } from '../components/trademark-policy/trademark-policy.component';
+import { SponsorComponent } from '../components/sponsor/sponsor.component';
+import { PushTransactionComponent } from '../components/push-transaction/push-transaction.component';
+import { AssetsFeaturedComponent } from '../components/assets/assets-featured/assets-featured.component';
+import { AssetGroupComponent } from '../components/assets/asset-group/asset-group.component';
+import { AssetCirculationComponent } from '../components/asset-circulation/asset-circulation.component';
+import { AmountShortenerPipe } from '../shared/pipes/amount-shortener.pipe';
+import { DifficultyAdjustmentsTable } from '../components/difficulty-adjustments-table/difficulty-adjustments-table.components';
+import { BlocksList } from '../components/blocks-list/blocks-list.component';
+import { RewardStatsComponent } from '../components/reward-stats/reward-stats.component';
+import { DataCyDirective } from '../data-cy.directive';
+import { LoadingIndicatorComponent } from '../components/loading-indicator/loading-indicator.component';
+import { IndexingProgressComponent } from '../components/indexing-progress/indexing-progress.component';
+
@NgModule({
declarations: [
ClipboardComponent,
@@ -60,6 +103,42 @@ import { CapAddressPipe } from './pipes/cap-address-pipe/cap-address-pipe';
MempoolBlocksComponent,
BlockchainBlocksComponent,
AmountComponent,
+
+ AboutComponent,
+ MasterPageComponent,
+ BisqMasterPageComponent,
+ LiquidMasterPageComponent,
+ StartComponent,
+ TransactionComponent,
+ BlockComponent,
+ TransactionsListComponent,
+ AddressComponent,
+ LatestBlocksComponent,
+ SearchFormComponent,
+ TimeSpanComponent,
+ AddressLabelsComponent,
+ FooterComponent,
+ AssetComponent,
+ AssetsComponent,
+ StatusViewComponent,
+ FeesBoxComponent,
+ DifficultyComponent,
+ TermsOfServiceComponent,
+ PrivacyPolicyComponent,
+ TrademarkPolicyComponent,
+ SponsorComponent,
+ PushTransactionComponent,
+ AssetsNavComponent,
+ AssetsFeaturedComponent,
+ AssetGroupComponent,
+ AssetCirculationComponent,
+ AmountShortenerPipe,
+ DifficultyAdjustmentsTable,
+ BlocksList,
+ DataCyDirective,
+ RewardStatsComponent,
+ LoadingIndicatorComponent,
+ IndexingProgressComponent,
],
imports: [
CommonModule,
@@ -71,17 +150,26 @@ import { CapAddressPipe } from './pipes/cap-address-pipe/cap-address-pipe';
NgbPaginationModule,
NgbDropdownModule,
NgbAccordionModule,
+ InfiniteScrollModule,
+ NgbTypeaheadModule,
+ NgbModule,
+ FontAwesomeModule,
],
providers: [
VbytesPipe,
RelativeUrlPipe,
NoSanitizePipe,
+ ShortenStringPipe,
+ CapAddressPipe,
],
exports: [
RouterModule,
+ InfiniteScrollModule,
+ NgbTypeaheadModule,
+ NgbModule,
+ FontAwesomeModule,
NgbAccordionModule,
NgbNavModule,
- CommonModule,
ReactiveFormsModule,
NgbTooltipModule,
NgbButtonsModule,
@@ -114,6 +202,75 @@ import { CapAddressPipe } from './pipes/cap-address-pipe/cap-address-pipe';
MempoolBlocksComponent,
BlockchainBlocksComponent,
AmountComponent,
+
+ StartComponent,
+ TransactionComponent,
+ BlockComponent,
+ TransactionsListComponent,
+ AddressComponent,
+ LatestBlocksComponent,
+ SearchFormComponent,
+ TimeSpanComponent,
+ AddressLabelsComponent,
+ FooterComponent,
+ AssetComponent,
+ AssetsComponent,
+ StatusViewComponent,
+ FeesBoxComponent,
+ DifficultyComponent,
+ TermsOfServiceComponent,
+ PrivacyPolicyComponent,
+ TrademarkPolicyComponent,
+ SponsorComponent,
+ PushTransactionComponent,
+ AssetsNavComponent,
+ AssetsFeaturedComponent,
+ AssetGroupComponent,
+ AssetCirculationComponent,
+ AmountShortenerPipe,
+ DifficultyAdjustmentsTable,
+ BlocksList,
+ DataCyDirective,
+ RewardStatsComponent,
+ LoadingIndicatorComponent,
+ IndexingProgressComponent,
]
})
-export class SharedModule {}
+export class SharedModule {
+ constructor(library: FaIconLibrary) {
+ library.addIcons(faInfoCircle);
+ library.addIcons(faChartArea);
+ library.addIcons(faTv);
+ library.addIcons(faTachometerAlt);
+ library.addIcons(faCubes);
+ library.addIcons(faHammer);
+ library.addIcons(faCogs);
+ library.addIcons(faThList);
+ library.addIcons(faList);
+ library.addIcons(faTachometerAlt);
+ library.addIcons(faDatabase);
+ library.addIcons(faSearch);
+ library.addIcons(faLink);
+ library.addIcons(faBolt);
+ library.addIcons(faTint);
+ library.addIcons(faFilter);
+ library.addIcons(faAngleDown);
+ library.addIcons(faAngleUp);
+ library.addIcons(faExchangeAlt);
+ library.addIcons(faAngleDoubleUp);
+ library.addIcons(faAngleDoubleDown);
+ library.addIcons(faChevronDown);
+ library.addIcons(faFileAlt);
+ library.addIcons(faRedoAlt);
+ library.addIcons(faArrowAltCircleRight);
+ library.addIcons(faExternalLinkAlt);
+ library.addIcons(faSortUp);
+ library.addIcons(faCaretUp);
+ library.addIcons(faCaretDown);
+ library.addIcons(faAngleRight);
+ library.addIcons(faAngleLeft);
+ library.addIcons(faBook);
+ library.addIcons(faListUl);
+ library.addIcons(faDownload);
+ }
+}
From 018914a4b64142efa38705fcb422610145372cdb Mon Sep 17 00:00:00 2001
From: nymkappa
Date: Fri, 20 May 2022 09:53:24 +0200
Subject: [PATCH 3/5] Set /mining/blocks/xxx APIs expiration to 60 seconds
instead of 5 minutes
---
backend/src/routes.ts | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/backend/src/routes.ts b/backend/src/routes.ts
index c39d3ec56..d65b4f836 100644
--- a/backend/src/routes.ts
+++ b/backend/src/routes.ts
@@ -645,7 +645,7 @@ class Routes {
res.header('Pragma', 'public');
res.header('Cache-control', 'public');
res.header('X-total-count', blockCount.toString());
- res.setHeader('Expires', new Date(Date.now() + 1000 * 300).toUTCString());
+ res.setHeader('Expires', new Date(Date.now() + 1000 * 60).toUTCString());
res.json(blockFees);
} catch (e) {
res.status(500).send(e instanceof Error ? e.message : e);
@@ -659,7 +659,7 @@ class Routes {
res.header('Pragma', 'public');
res.header('Cache-control', 'public');
res.header('X-total-count', blockCount.toString());
- res.setHeader('Expires', new Date(Date.now() + 1000 * 300).toUTCString());
+ res.setHeader('Expires', new Date(Date.now() + 1000 * 60).toUTCString());
res.json(blockRewards);
} catch (e) {
res.status(500).send(e instanceof Error ? e.message : e);
@@ -672,7 +672,7 @@ class Routes {
const oldestIndexedBlockTimestamp = await BlocksRepository.$oldestBlockTimestamp();
res.header('Pragma', 'public');
res.header('Cache-control', 'public');
- res.setHeader('Expires', new Date(Date.now() + 1000 * 300).toUTCString());
+ res.setHeader('Expires', new Date(Date.now() + 1000 * 60).toUTCString());
res.json({
oldestIndexedBlockTimestamp: oldestIndexedBlockTimestamp,
blockFeeRates: blockFeeRates,
@@ -690,7 +690,7 @@ class Routes {
res.header('Pragma', 'public');
res.header('Cache-control', 'public');
res.header('X-total-count', blockCount.toString());
- res.setHeader('Expires', new Date(Date.now() + 1000 * 300).toUTCString());
+ res.setHeader('Expires', new Date(Date.now() + 1000 * 60).toUTCString());
res.json({
sizes: blockSizes,
weights: blockWeights
From 5028df31ba99c17ac0373f59fa14c5d838a4e3b3 Mon Sep 17 00:00:00 2001
From: softsimon
Date: Fri, 20 May 2022 13:41:30 +0400
Subject: [PATCH 4/5] Fixes broken fee rate calculation for mempool
transactions
fixes #1684
---
backend/src/api/bitcoin/bitcoin-api.ts | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/backend/src/api/bitcoin/bitcoin-api.ts b/backend/src/api/bitcoin/bitcoin-api.ts
index 48368a128..e52aaffaf 100644
--- a/backend/src/api/bitcoin/bitcoin-api.ts
+++ b/backend/src/api/bitcoin/bitcoin-api.ts
@@ -192,12 +192,9 @@ class BitcoinApi implements AbstractBitcoinApi {
}
if (addPrevout) {
- if (transaction.confirmations) {
- esploraTransaction = await this.$calculateFeeFromInputs(esploraTransaction);
- } else {
- esploraTransaction = await this.$appendMempoolFeeData(esploraTransaction);
- esploraTransaction = await this.$calculateFeeFromInputs(esploraTransaction);
- }
+ esploraTransaction = await this.$calculateFeeFromInputs(esploraTransaction);
+ } else if (!transaction.confirmations) {
+ esploraTransaction = await this.$appendMempoolFeeData(esploraTransaction);
}
return esploraTransaction;
From 062a864a17793f68b98128bcaf6b719efe6aa531 Mon Sep 17 00:00:00 2001
From: softsimon
Date: Fri, 20 May 2022 15:08:45 +0400
Subject: [PATCH 5/5] Pre-load all lazy loaded modules
---
frontend/src/app/app-routing.module.ts | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/frontend/src/app/app-routing.module.ts b/frontend/src/app/app-routing.module.ts
index f3d3e3144..ae5860c78 100644
--- a/frontend/src/app/app-routing.module.ts
+++ b/frontend/src/app/app-routing.module.ts
@@ -1,5 +1,5 @@
import { NgModule } from '@angular/core';
-import { Routes, RouterModule } from '@angular/router';
+import { Routes, RouterModule, PreloadAllModules } from '@angular/router';
import { StartComponent } from './components/start/start.component';
import { TransactionComponent } from './components/transaction/transaction.component';
import { BlockComponent } from './components/block/block.component';
@@ -537,7 +537,8 @@ if (browserWindowEnv && browserWindowEnv.BASE_MODULE === 'liquid') {
imports: [RouterModule.forRoot(routes, {
initialNavigation: 'enabled',
scrollPositionRestoration: 'enabled',
- anchorScrolling: 'enabled'
+ anchorScrolling: 'enabled',
+ preloadingStrategy: PreloadAllModules
})],
})
export class AppRoutingModule { }