From d0694e5de3ded0082c20daaf350ee4a120efcca1 Mon Sep 17 00:00:00 2001 From: "raja.blaze" Date: Mon, 19 Aug 2019 11:13:48 +0530 Subject: [PATCH] Default testnet updated --- server/middlewares/validator.middleware.ts | 2 +- src/app/shared/components/header/header.component.ts | 4 ++++ .../shared/components/siteheader/siteheader.component.ts | 8 ++++++-- src/app/shared/services/chart.service.ts | 2 +- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/server/middlewares/validator.middleware.ts b/server/middlewares/validator.middleware.ts index 7281455..4af6776 100644 --- a/server/middlewares/validator.middleware.ts +++ b/server/middlewares/validator.middleware.ts @@ -13,7 +13,7 @@ export function validationMiddleware( if(request.headers.network){ Global.network = request.headers.network; }else{ - Global.network = 'Floonet'; + Global.network = 'Testnet'; } validate( plainToClass(type, { diff --git a/src/app/shared/components/header/header.component.ts b/src/app/shared/components/header/header.component.ts index 5e13c9f..b31475b 100755 --- a/src/app/shared/components/header/header.component.ts +++ b/src/app/shared/components/header/header.component.ts @@ -27,7 +27,11 @@ export class HeaderComponent implements OnInit { } public getNetwork(){ + if(localStorage.getItem('network') == null){ + return "Testnet"; + }else{ return localStorage.getItem('network'); + } } public onChangeNetwork(networkValue){ diff --git a/src/app/shared/components/siteheader/siteheader.component.ts b/src/app/shared/components/siteheader/siteheader.component.ts index 63285e7..e205103 100644 --- a/src/app/shared/components/siteheader/siteheader.component.ts +++ b/src/app/shared/components/siteheader/siteheader.component.ts @@ -24,8 +24,12 @@ export class SiteheaderComponent implements OnInit { } public getNetwork(){ - return localStorage.getItem('network'); - } + if(localStorage.getItem('network') == null){ + return "Testnet"; + }else{ + return localStorage.getItem('network'); + } + } public onChangeNetwork(networkValue){ localStorage.setItem('network', networkValue); diff --git a/src/app/shared/services/chart.service.ts b/src/app/shared/services/chart.service.ts index b5bcb14..5d4e7e2 100644 --- a/src/app/shared/services/chart.service.ts +++ b/src/app/shared/services/chart.service.ts @@ -45,7 +45,7 @@ export class ChartService { public getHttpheader(){ var network; if(localStorage.getItem('network') == null){ - network = "Floonet" + network = "Testnet" }else{ network = localStorage.getItem('network') }