-
Notifications
You must be signed in to change notification settings - Fork 479
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* metadata helpers and values for txs pages * update titles to the rest of the pages * refactor getServerSideProps * dynamically update metadata for token and dapp page * test * 404 error page * make new config * make use of new config, delete old one * feature reporter: dev implementation * feature reporter: docker integration * resctructure ENVS.md * sentry feature * refinements * add spaces between sections * tweaks * switch to camelCase * clean up * remove NEXT_PUBLIC_NETWORK_TOKEN_ADDRESS * v
- Loading branch information
Showing
180 changed files
with
2,644 additions
and
1,012 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import stripTrailingSlash from 'lib/stripTrailingSlash'; | ||
|
||
import { getEnvValue } from './utils'; | ||
|
||
const apiHost = getEnvValue(process.env.NEXT_PUBLIC_API_HOST); | ||
const apiSchema = getEnvValue(process.env.NEXT_PUBLIC_API_PROTOCOL) || 'https'; | ||
const apiPort = getEnvValue(process.env.NEXT_PUBLIC_API_PORT); | ||
const apiEndpoint = [ | ||
apiSchema || 'https', | ||
'://', | ||
apiHost, | ||
apiPort && ':' + apiPort, | ||
].filter(Boolean).join(''); | ||
const socketSchema = getEnvValue(process.env.NEXT_PUBLIC_API_WEBSOCKET_PROTOCOL) || 'wss'; | ||
|
||
const api = Object.freeze({ | ||
host: apiHost, | ||
endpoint: apiEndpoint, | ||
socket: `${ socketSchema }://${ apiHost }`, | ||
basePath: stripTrailingSlash(getEnvValue(process.env.NEXT_PUBLIC_API_BASE_PATH) || ''), | ||
}); | ||
|
||
export default api; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { getEnvValue } from './utils'; | ||
|
||
const appPort = getEnvValue(process.env.NEXT_PUBLIC_APP_PORT); | ||
const appSchema = getEnvValue(process.env.NEXT_PUBLIC_APP_PROTOCOL); | ||
const appHost = getEnvValue(process.env.NEXT_PUBLIC_APP_HOST); | ||
const baseUrl = [ | ||
appSchema || 'https', | ||
'://', | ||
appHost, | ||
appPort && ':' + appPort, | ||
].filter(Boolean).join(''); | ||
const isDev = process.env.NODE_ENV === 'development'; | ||
|
||
const app = Object.freeze({ | ||
isDev, | ||
protocol: appSchema, | ||
host: appHost, | ||
port: appPort, | ||
baseUrl, | ||
useProxy: getEnvValue(process.env.NEXT_PUBLIC_USE_NEXT_JS_PROXY) === 'true', | ||
}); | ||
|
||
export default app; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { getEnvValue } from './utils'; | ||
|
||
const DEFAULT_CURRENCY_DECIMALS = 18; | ||
|
||
const chain = Object.freeze({ | ||
id: getEnvValue(process.env.NEXT_PUBLIC_NETWORK_ID), | ||
name: getEnvValue(process.env.NEXT_PUBLIC_NETWORK_NAME), | ||
shortName: getEnvValue(process.env.NEXT_PUBLIC_NETWORK_SHORT_NAME), | ||
currency: { | ||
name: getEnvValue(process.env.NEXT_PUBLIC_NETWORK_CURRENCY_NAME), | ||
symbol: getEnvValue(process.env.NEXT_PUBLIC_NETWORK_CURRENCY_SYMBOL), | ||
decimals: Number(getEnvValue(process.env.NEXT_PUBLIC_NETWORK_CURRENCY_DECIMALS)) || DEFAULT_CURRENCY_DECIMALS, | ||
}, | ||
rpcUrl: getEnvValue(process.env.NEXT_PUBLIC_NETWORK_RPC_URL), | ||
isTestnet: getEnvValue(process.env.NEXT_PUBLIC_IS_TESTNET) === 'true', | ||
verificationType: getEnvValue(process.env.NEXT_PUBLIC_NETWORK_VERIFICATION_TYPE) || 'mining', | ||
}); | ||
|
||
export default chain; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import stripTrailingSlash from 'lib/stripTrailingSlash'; | ||
|
||
import app from '../app'; | ||
import { getEnvValue } from '../utils'; | ||
|
||
const authUrl = stripTrailingSlash(getEnvValue(process.env.NEXT_PUBLIC_AUTH_URL) || app.baseUrl); | ||
|
||
const logoutUrl = (() => { | ||
try { | ||
const envUrl = getEnvValue(process.env.NEXT_PUBLIC_LOGOUT_URL); | ||
const auth0ClientId = getEnvValue(process.env.NEXT_PUBLIC_AUTH0_CLIENT_ID); | ||
const returnUrl = authUrl + '/auth/logout'; | ||
|
||
if (!envUrl || !auth0ClientId) { | ||
throw Error(); | ||
} | ||
|
||
const url = new URL(envUrl); | ||
url.searchParams.set('client_id', auth0ClientId); | ||
url.searchParams.set('returnTo', returnUrl); | ||
|
||
return url.toString(); | ||
} catch (error) { | ||
return; | ||
} | ||
})(); | ||
|
||
export default Object.freeze({ | ||
title: 'My account', | ||
isEnabled: getEnvValue(process.env.NEXT_PUBLIC_IS_ACCOUNT_SUPPORTED) === 'true', | ||
authUrl, | ||
logoutUrl, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { getEnvValue } from '../utils'; | ||
import account from './account'; | ||
import verifiedTokens from './verifiedTokens'; | ||
|
||
const adminServiceApiHost = getEnvValue(process.env.NEXT_PUBLIC_ADMIN_SERVICE_API_HOST); | ||
|
||
export default Object.freeze({ | ||
title: 'Address verification in "My account"', | ||
isEnabled: account.isEnabled && verifiedTokens.isEnabled && Boolean(adminServiceApiHost), | ||
api: { | ||
endpoint: adminServiceApiHost, | ||
basePath: '', | ||
}, | ||
}); |
Oops, something went wrong.