From baff4027203ea3785453a024f2f36a01537d170e Mon Sep 17 00:00:00 2001 From: Fuxing Loh <4266087+fuxingloh@users.noreply.github.com> Date: Wed, 26 May 2021 02:50:35 +0800 Subject: [PATCH] added new network playground (#122) --- package.json | 2 +- packages/whale-api-client/src/whale.api.client.ts | 5 +++-- src/module.api/guards/network.guard.ts | 3 ++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 019625a16..0a9e34a96 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "start:prod": "node dist/main", "test": "jest", "test:watch": "jest --watch", - "test:ci": "jest --ci --coverage", + "test:ci": "jest --ci --coverage --maxWorkers=4", "packages:build": "lerna run build", "packages:version": "lerna version $1 --yes --no-push --no-git-tag-version", "packages:publish:next": "lerna exec -- npm publish --tag next --access public", diff --git a/packages/whale-api-client/src/whale.api.client.ts b/packages/whale-api-client/src/whale.api.client.ts index b01f85d37..2c67f3862 100644 --- a/packages/whale-api-client/src/whale.api.client.ts +++ b/packages/whale-api-client/src/whale.api.client.ts @@ -28,15 +28,16 @@ export interface WhaleApiClientOptions { /** * Network that whale client is configured to + * Playground is a special network for testing, see https://github.com/DeFiCh/playground */ - network?: 'mainnet' | 'testnet' | 'regtest' + network?: 'mainnet' | 'testnet' | 'regtest' | 'playground' } /** * WhaleApiClient default options */ export const DefaultOptions: WhaleApiClientOptions = { - url: 'https://whale.ocean.defichain.com', + url: 'https://ocean.defichain.com', timeout: 60000, version: 'v1', network: 'mainnet' diff --git a/src/module.api/guards/network.guard.ts b/src/module.api/guards/network.guard.ts index af52267ca..91fc1428d 100644 --- a/src/module.api/guards/network.guard.ts +++ b/src/module.api/guards/network.guard.ts @@ -15,7 +15,8 @@ export class NetworkGuard implements CanActivate { static available: string[] = [ 'mainnet', 'testnet', - 'regtest' + 'regtest', + 'playground' ] private readonly network: string