Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion apps/provider-console/env/.env
Original file line number Diff line number Diff line change
@@ -1 +1,15 @@
NEXT_PUBLIC_SENTRY_DSN=https://[email protected]/2
NEXT_PUBLIC_SENTRY_DSN=https://[email protected]/2


# Network Configurations
NEXT_PUBLIC_SELECTED_NETWORK=mainnet
NEXT_PUBLIC_NETWORK_TITLE=Mainnet
NEXT_PUBLIC_CHAIN_ID=akashnet-2
NEXT_PUBLIC_CHAIN_REGISTRY_NAME=akash
NEXT_PUBLIC_NETWORK_TYPE=mainnet
NEXT_PUBLIC_RPC_ENDPOINT=https://rpc.cosmos.directory/akash
NEXT_PUBLIC_API_ENDPOINT=https://rest.cosmos.directory/akash
NEXT_PUBLIC_CONSOLE_API_URL=https://console-api.akash.network
NEXT_PUBLIC_SECURITY_URL=https://provider-console-security.akash.network
NEXT_PUBLIC_API_BASE_URL=https://provider-console-api.akash.network
NEXT_PUBLIC_URL=https://provider-console.akash.network
16 changes: 0 additions & 16 deletions apps/provider-console/env/.env.production
Original file line number Diff line number Diff line change
@@ -1,16 +0,0 @@


# Network Configurations
NEXT_PUBLIC_SELECTED_NETWORK=mainnet
NEXT_PUBLIC_NETWORK_TITLE=Mainnet
NEXT_PUBLIC_CHAIN_ID=akashnet-2
NEXT_PUBLIC_CHAIN_REGISTRY_NAME=akash
NEXT_PUBLIC_NETWORK_TYPE=mainnet
NEXT_PUBLIC_RPC_ENDPOINT=https://rpc.cosmos.directory/akash
NEXT_PUBLIC_API_ENDPOINT=https://rest.cosmos.directory/akash
NEXT_PUBLIC_NETWORK_VERSION=v1beta3
NEXT_PUBLIC_NETWORK_VERSION_MARKET=v1beta4
NEXT_PUBLIC_CONSOLE_API_URL=https://console-api.akash.network
NEXT_PUBLIC_SECURITY_URL=https://provider-console-security.akash.network
NEXT_PUBLIC_API_BASE_URL=https://provider-console-api.akash.network
NEXT_PUBLIC_URL=https://provider-console.akash.network
2 changes: 0 additions & 2 deletions apps/provider-console/env/.env.sandbox
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ NEXT_PUBLIC_CHAIN_REGISTRY_NAME=akash-sandbox
NEXT_PUBLIC_NETWORK_TYPE=devnet
NEXT_PUBLIC_RPC_ENDPOINT=https://rpc.sandbox-01.aksh.pw:443
NEXT_PUBLIC_API_ENDPOINT=https://api.sandbox-01.aksh.pw:443
NEXT_PUBLIC_NETWORK_VERSION=v1beta3
NEXT_PUBLIC_NETWORK_VERSION_MARKET=v1beta4


NEXT_PUBLIC_CONSOLE_API_URL=https://console-api.akash.network
Expand Down
2 changes: 0 additions & 2 deletions apps/provider-console/env/.env.staging
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ NEXT_PUBLIC_CHAIN_REGISTRY_NAME=akash
NEXT_PUBLIC_NETWORK_TYPE=mainnet
NEXT_PUBLIC_RPC_ENDPOINT=https://rpc.cosmos.directory/akash
NEXT_PUBLIC_API_ENDPOINT=https://rest.cosmos.directory/akash
NEXT_PUBLIC_NETWORK_VERSION=v1beta3
NEXT_PUBLIC_NETWORK_VERSION_MARKET=v1beta4
NEXT_PUBLIC_CONSOLE_API_URL=https://console-api.akash.network
NEXT_PUBLIC_SECURITY_URL=https://provider-console-security-beta.akash.network
NEXT_PUBLIC_API_BASE_URL=https://provider-console-api-beta.akash.network
Expand Down
1 change: 0 additions & 1 deletion apps/provider-console/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
},
"dependencies": {
"@akashnetwork/akash-api": "^1.3.0",
"@akashnetwork/akashjs": "^0.11.1",
"@akashnetwork/env-loader": "*",
"@akashnetwork/ui": "*",
"@chain-registry/types": "^0.50.1",
Expand Down
2 changes: 0 additions & 2 deletions apps/provider-console/src/config/browser-env.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ export const browserEnvConfig = validateStaticEnvVars({
NEXT_PUBLIC_NETWORK_TYPE: process.env.NEXT_PUBLIC_NETWORK_TYPE,
NEXT_PUBLIC_RPC_ENDPOINT: process.env.NEXT_PUBLIC_RPC_ENDPOINT,
NEXT_PUBLIC_API_ENDPOINT: process.env.NEXT_PUBLIC_API_ENDPOINT,
NEXT_PUBLIC_NETWORK_VERSION: process.env.NEXT_PUBLIC_NETWORK_VERSION,
NEXT_PUBLIC_NETWORK_VERSION_MARKET: process.env.NEXT_PUBLIC_NETWORK_VERSION_MARKET,
NEXT_PUBLIC_CONSOLE_API_URL: process.env.NEXT_PUBLIC_CONSOLE_API_URL,
NEXT_PUBLIC_SECURITY_URL: process.env.NEXT_PUBLIC_SECURITY_URL,
NEXT_PUBLIC_API_BASE_URL: process.env.NEXT_PUBLIC_API_BASE_URL,
Expand Down
2 changes: 0 additions & 2 deletions apps/provider-console/src/config/env-config.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ export const browserEnvSchema = z.object({
NEXT_PUBLIC_NETWORK_TYPE: z.string(),
NEXT_PUBLIC_RPC_ENDPOINT: z.string().url(),
NEXT_PUBLIC_API_ENDPOINT: z.string().url(),
NEXT_PUBLIC_NETWORK_VERSION: z.string().optional(),
NEXT_PUBLIC_NETWORK_VERSION_MARKET: z.string().optional(),
NEXT_PUBLIC_CONSOLE_API_URL: z.string().url(),
NEXT_PUBLIC_SECURITY_URL: z.string().url(),
NEXT_PUBLIC_API_BASE_URL: z.string().url(),
Expand Down
7 changes: 1 addition & 6 deletions apps/provider-console/src/config/network.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export function getCurrentNetworkConfig(): Network {
chainId: config.chainId,
chainRegistryName: config.chainRegistryName,
enabled: true,
version: config.version || null,
version: null,
rpcEndpoint: config.rpcEndpoint,
nodesUrl: config.apiEndpoint,
versionUrl: config.apiEndpoint
Expand All @@ -40,8 +40,6 @@ function getNetworkConfig() {
networkType: browserEnvConfig.NEXT_PUBLIC_NETWORK_TYPE,
rpcEndpoint: browserEnvConfig.NEXT_PUBLIC_RPC_ENDPOINT,
apiEndpoint: browserEnvConfig.NEXT_PUBLIC_API_ENDPOINT,
version: browserEnvConfig.NEXT_PUBLIC_NETWORK_VERSION,
versionMarket: browserEnvConfig.NEXT_PUBLIC_NETWORK_VERSION_MARKET,
consoleApiUrl: browserEnvConfig.NEXT_PUBLIC_CONSOLE_API_URL,
securityUrl: browserEnvConfig.NEXT_PUBLIC_SECURITY_URL,
apiBaseUrl: browserEnvConfig.NEXT_PUBLIC_API_BASE_URL
Expand Down Expand Up @@ -75,11 +73,8 @@ export function createDynamicChain(): Chain {
*/
export function getNetworkVersionInfo() {
const selectedNetwork = browserEnvConfig.NEXT_PUBLIC_SELECTED_NETWORK ?? "mainnet";
const config = getNetworkConfig();

return {
networkVersion: (config.version || "v1beta3") as "v1beta2" | "v1beta3" | "v1beta4",
networkVersionMarket: (config.versionMarket || "v1beta4") as "v1beta2" | "v1beta3" | "v1beta4",
selectedNetworkId: selectedNetwork
};
}
4 changes: 1 addition & 3 deletions apps/provider-console/src/types/network.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import type { NetworkId } from "@akashnetwork/akashjs/build/types/network";

export type Network = {
id: NetworkId;
id: string;
title: string;
description: string;
nodesUrl: string;
Expand Down
2 changes: 0 additions & 2 deletions apps/provider-console/src/utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ export const defaultInitialDeposit = 500000;
// Get network info based on selected network - no if/else conditions
const networkVersionInfo = getNetworkVersionInfo();
export const selectedNetworkId = networkVersionInfo.selectedNetworkId;
export const networkVersion = networkVersionInfo.networkVersion;
export const networkVersionMarket = networkVersionInfo.networkVersionMarket;

export function setNetworkVersion() {
// This function is kept for backward compatibility but now uses environment-driven config
Expand Down
2 changes: 0 additions & 2 deletions apps/provider-console/src/utils/init.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { setNetworkVersion } from "./constants";
import { initProtoTypes } from "./proto";

export const initAppTypes = () => {
setNetworkVersion();
initProtoTypes();
};
3 changes: 0 additions & 3 deletions apps/provider-console/src/utils/proto/grant.ts

This file was deleted.

30 changes: 0 additions & 30 deletions apps/provider-console/src/utils/proto/index.ts

This file was deleted.

1 change: 0 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading