Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unnecessary env #26

Merged
merged 4 commits into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
3 changes: 1 addition & 2 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ NEXT_PUBLIC_APP_PORT=3100
# blockchain parameters
NEXT_PUBLIC_NETWORK_NAME="Atleta Network"
NEXT_PUBLIC_NETWORK_SHORT_NAME=Atleta
NEXT_PUBLIC_NETWORK_RPC_URL=wss://testnet-rpc.atleta.network:9944
NEXT_PUBLIC_NETWORK_ID=2340
NEXT_PUBLIC_NETWORK_CURRENCY_NAME="Atleta Token"
NEXT_PUBLIC_NETWORK_CURRENCY_SYMBOL=ATLA
Expand All @@ -25,5 +26,3 @@ NEXT_PUBLIC_VISUALIZE_API_HOST=http://173.249.17.202
NEXT_PUBLIC_IS_TESTNET=true
NEXT_PUBLIC_API_WEBSOCKET_PROTOCOL=ws
NEXT_PUBLIC_API_SPEC_URL=https://raw.githubusercontent.com/blockscout/blockscout-api-v2-swagger/main/swagger.yaml

NEXT_PUBLIC_RPC_HOST=wss://testnet-rpc.atleta.network:9944
2 changes: 0 additions & 2 deletions configs/app/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,13 @@ const socketEndpoint = [
apiPort && ':' + apiPort,
].filter(Boolean).join('');

const rpcEndpoing = getEnvValue('NEXT_PUBLIC_RPC_HOST');
const api = Object.freeze({
host: apiHost,
protocol: apiSchema,
port: apiPort,
endpoint: apiEndpoint,
socket: socketEndpoint,
basePath: stripTrailingSlash(getEnvValue('NEXT_PUBLIC_API_BASE_PATH') || ''),
rpc: rpcEndpoing,
});

export default api;
2 changes: 1 addition & 1 deletion configs/envs/.env.localhost
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ NEXT_PUBLIC_APP_PORT=3100
# blockchain parameters
NEXT_PUBLIC_NETWORK_NAME="Atleta Network"
NEXT_PUBLIC_NETWORK_SHORT_NAME=Atleta
NEXT_PUBLIC_NETWORK_RPC_URL=wss://testnet-rpc.atleta.network:9944
NEXT_PUBLIC_NETWORK_ID=2340
NEXT_PUBLIC_NETWORK_CURRENCY_NAME="Atleta Token"
NEXT_PUBLIC_NETWORK_CURRENCY_SYMBOL=ATLA
Expand All @@ -25,6 +26,5 @@ NEXT_PUBLIC_STATS_API_HOST=http://173.249.17.202
NEXT_PUBLIC_VISUALIZE_API_HOST=http://173.249.17.202
NEXT_PUBLIC_IS_TESTNET=true
NEXT_PUBLIC_API_WEBSOCKET_PROTOCOL=ws
NEXT_PUBLIC_RPC_HOST=wss://testnet-rpc.atleta.network:9944

NEXT_PUBLIC_API_SPEC_URL=https://raw.githubusercontent.com/blockscout/blockscout-api-v2-swagger/main/swagger.yaml
2 changes: 1 addition & 1 deletion deploy/envs/common-frontend.env
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ NEXT_PUBLIC_HOMEPAGE_CHARTS=['daily_txs']
NEXT_PUBLIC_VISUALIZE_API_HOST=http://blockscout.atleta.network
NEXT_PUBLIC_IS_TESTNET=true
NEXT_PUBLIC_API_WEBSOCKET_PROTOCOL=ws
NEXT_PUBLIC_NETWORK_RPC_URL=wss://testnet-rpc.atleta.network:9944
NEXT_PUBLIC_API_SPEC_URL=https://raw.githubusercontent.com/blockscout/blockscout-api-v2-swagger/main/swagger.yaml
NEXT_PUBLIC_RPC_HOST=wss://testnet-rpc.atleta.network:9944
1 change: 0 additions & 1 deletion nextjs/csp/policies/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ export function app(): CspDev.DirectiveDescriptor {
// APIs
config.api.endpoint,
config.api.socket,
config.api.rpc,
getFeaturePayload(config.features.stats)?.api.endpoint,
getFeaturePayload(config.features.sol2uml)?.api.endpoint,
getFeaturePayload(config.features.verifiedTokens)?.api.endpoint,
Expand Down
2 changes: 1 addition & 1 deletion pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ function MyApp({ Component, pageProps }: AppPropsWithLayout) {
<GrowthBookProvider growthbook={ growthBook }>
<ScrollDirectionProvider>
<SocketProvider url={ `${ config.api.socket }${ config.api.basePath }/socket/v2` }>
<PolkadotApiProvider url={ config.api.rpc }>
<PolkadotApiProvider url={ config.chain.rpcUrl }>
{ getLayout(<Component { ...pageProps }/>) }
</PolkadotApiProvider>
</SocketProvider>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading