From fc039c5548368fb514527a4f42fe93d9d06818df Mon Sep 17 00:00:00 2001 From: thomasRalee Date: Thu, 28 Dec 2023 18:22:05 +0800 Subject: [PATCH] chore: layer add accordion component --- layer/Service.ts | 2 + layer/components/Accordion.vue | 71 ++++++++++++++++++++++++++++++++++ layer/icons/rotate-thin.vue | 20 ++++++++++ layer/utils/network.ts | 9 +++-- 4 files changed, 99 insertions(+), 3 deletions(-) create mode 100644 layer/components/Accordion.vue create mode 100644 layer/icons/rotate-thin.vue diff --git a/layer/Service.ts b/layer/Service.ts index cd7f3011..0730c03a 100644 --- a/layer/Service.ts +++ b/layer/Service.ts @@ -14,6 +14,7 @@ import { IndexerGrpcOracleApi, IndexerGrpcAccountApi, IndexerRestExplorerApi, + IndexerGrpcExplorerApi, IndexerRestSpotChronosApi, IndexerGrpcDerivativesApi, IndexerGrpcAccountPortfolioApi @@ -47,6 +48,7 @@ export const indexerAccountPortfolioApi = new IndexerGrpcAccountPortfolioApi( ENDPOINTS.indexer ) export const indexerOracleApi = new IndexerGrpcOracleApi(ENDPOINTS.indexer) +export const indexerExplorerApi = new IndexerGrpcExplorerApi(ENDPOINTS.indexer) export const indexerRestExplorerApi = new IndexerRestExplorerApi( `${ENDPOINTS.indexer}/api/explorer/v1` ) diff --git a/layer/components/Accordion.vue b/layer/components/Accordion.vue new file mode 100644 index 00000000..966b1cf5 --- /dev/null +++ b/layer/components/Accordion.vue @@ -0,0 +1,71 @@ + + + + + diff --git a/layer/icons/rotate-thin.vue b/layer/icons/rotate-thin.vue new file mode 100644 index 00000000..29762530 --- /dev/null +++ b/layer/icons/rotate-thin.vue @@ -0,0 +1,20 @@ + diff --git a/layer/utils/network.ts b/layer/utils/network.ts index 1560e9df..13b171ea 100644 --- a/layer/utils/network.ts +++ b/layer/utils/network.ts @@ -1,5 +1,4 @@ -import { getExplorerUrl as getExplorerUrlHelper } from '@injectivelabs/sdk-ui-ts' -import { IS_DEVNET, IS_TESTNET, NETWORK } from './../utils/constant' +import { IS_DEVNET, IS_TESTNET } from './../utils/constant' export const getHubUrl = (): string => { if (IS_DEVNET) { @@ -26,9 +25,13 @@ export const getExchangeUrl = (): string => { } export const getExplorerUrl = (): string => { + if (IS_DEVNET) { + return 'https://devnet.explorer.injective.dev' + } + if (IS_TESTNET) { return 'https://testnet.explorer.injective.network' } - return getExplorerUrlHelper(NETWORK) + return 'https://explorer.injective.network' }