Skip to content

Commit

Permalink
chore: renamed NODE_ENV to PRODUCTION
Browse files Browse the repository at this point in the history
  • Loading branch information
jaybuidl committed Dec 6, 2022
1 parent a0a0632 commit a821d45
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 9 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
DEFAULT_CHAIN_ID=1
PRODUCTION=false
ETHERSCAN_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
IPFS_HOST_ADDRESS=https://ipfs.kleros.io
IPFS_GATEWAY_ADDRESS=https://ipfs.kleros.io
Expand Down
4 changes: 3 additions & 1 deletion netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@
IPFS_GATEWAY_ADDRESS='https://ipfs.kleros.io'
AVAILABLE_LANGUAGE_GROUP_PAIRS='["en|fr","en|es","en|pt","de|en","en|ru","en|tr","en|zh"]'
USER_SETTINGS_API_BASE_URLS='{"1":"https://iioeu1ljqf.execute-api.us-east-2.amazonaws.com/mainnet","77":"https://xa1qxy0wp6.execute-api.us-east-2.amazonaws.com/sokol","100":"https://wcj9vww4nf.execute-api.us-east-2.amazonaws.com/xdai"}'

LINGUO_CONTRACT_ADDRESSES='{"1":{"de|en":["0x54f1f7b58c1Dc646a6c639C5d909B62652129b33","0x950f5AB863075C685227EfEDb41Ef167Be0099ad"],"en|es":["0x460f688f655610de5e3d92beb7892fa200b9060d","0xD8F8019c025C2Ba6745543D9a3C338DE1b98C103"],"en|fr":["0xFEe86325d5C96AE9E20EaBe7B157813c67bBccFA","0xf1A9589880DbF393F32A5b2d5a0054Fa10385074"],"en|ja":["0x5Cd1ff55282db11e526Fe13fA0F7C014f74acF11","0xc3162705Af0e10108FF837E450A14669b2711129"],"en|ko":["0xf8D4c1436ACA89A5DEEf36F06f662bAdfEb5AE63","0xFE721DD8Ac8e47A4228A6147A25C65136f213EaA"],"en|pt":["0x48032Ad54DB49d8E0d4f135A687b98E5731961f9","0x1c839fd542563182BFD0C337c8AaD1Be412F0fd2"],"en|ru":["0x0Bc3B51673dCdF3b45c628066761dA7331E8fBA2","0x464c84c41f3C25Ba5a75B006D8B20600A8777306"],"en|tr":["0xa3E4348BDDc32AfcedC5e088e0E21FD6154A0180","0x44863f5b7AAb7ceE181C0d84E244540125eF7AF7"],"en|zh":["0xaB0D90943A58b1A64c0171Ee8e743d9998Be6AC3","0xD67C12734dC12240a6324Db63ccd426964B71Fe7"]},"42":{"de|en":["0x8A4290298D65717a3BaEd546e4Ef9Eb2fe0b187D","0x5Af02E0E04c2042345E15Ed6dc7CC0c220f2C2Fa"],"en|es":["0x082aA0BeBE8C32042F77d123B6a657Fe907D8C33","0x6eb2D062E808a67828d27aD3926912C9309E5417"],"en|fr":["0x963Df99387a2b350264B5847ff9AbFF674e7BdFA","0x152c7F0948Fd0B2741a934aA7bfceB41cd4b5bFD"],"en|ja":["0x8B819D13d90Fcf9F0a235fe85d860E3C9763D470","0x033B08AAC5A3a2E7C306dd5Ee360904eC8d45DF6"],"en|ko":["0xe026cA59Bc31960D3060390D8667ceBc5D42B46d","0x499aD7D07f6EF0bD17656559312D0DdCBA0e79Ce"],"en|pt":["0xaD9Dec9c66cEbAa7e8624a528f65A3FA1Df8027d","0xb9534aB9b71e26949F9bdF9C05897Ee4619d144F"],"en|ru":["0xF4E6294201Ef99f1E83586Ef5AC8bCBaA4DB45CF","0x243a0431DE8d0B6D9837B53d3A10088b53B52918"],"en|tr":["0x10Dde936662A674F35ab36641017342B75Bb1D58","0xB93b8c9FD90724C036Ac56c5D3306333A67cFbFB"],"en|zh":["0xffb2BB47F4CD36426134706A849590471622519C","0xBc19B6fBAEEC0a2b50f3AD6F53b670ac03Bd1C6F"]},"77":{"de|en":["0x8539cb2fB9186f3DcF8F9A0AeD3De395Fd6d9870"],"en|es":["0x5a9F70ED50e16010f0B9d5bb5a3EFdb42fEcaD23"],"en|fr":["0x9CA979a165EF741BF120A3FEbb4F5C083De40708"],"en|ja":["0x753d611eAdF324B1f23A3A417BceB08eeda80ec6"],"en|ko":["0xC578de969Dd2A2a08d6Bd5A4F7AaA9b1a2e6A395"],"en|pt":["0x457b2BAb823c772fA4457517C97E6BF13065c21D"],"en|ru":["0x6cD5BAb73135966008d969bE23Ff940e6fa3Bb87"],"en|tr":["0xa9426b235E12897A99B015CbcF4D064e86fde418"],"en|zh":["0x09CE835FaB6051a18b2FC11743c01DAAD3122f1F"]},"100":{"de|en":["0xc3162705Af0e10108FF837E450A14669b2711129"],"en|es":["0xA2BfFF0553DE7405781FE0C39C04A383F04b9C80"],"en|fr":["0x464c84c41f3C25Ba5a75B006D8B20600A8777306"],"en|ja":["0x852550982e0984F9CCeF18a7276D35AFDc30242c"],"en|ko":["0xD67C12734dC12240a6324Db63ccd426964B71Fe7"],"en|pt":["0xFE721DD8Ac8e47A4228A6147A25C65136f213EaA"],"en|ru":["0x44863f5b7AAb7ceE181C0d84E244540125eF7AF7"],"en|tr":["0x1D48a279966f37385b4AB963530C6dC813b3A8Df"],"en|zh":["0x0B928165A67df8254412483ae8C3b8cc7F2b4D36"]}}'

[context.production.environment]
PRODUCTION='true'

[[redirects]]
from = "/*"
to = "/index.html"
Expand Down
2 changes: 1 addition & 1 deletion src/features/notifications/notificationsSlice.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function createPersistedReducer(reducer) {
const persistConfig = {
key: PERSISTANCE_KEY,
storage,
migrate: createMigrate(migrations, { debug: process.env.NODE_ENV !== 'production' }),
migrate: createMigrate(migrations, { debug: process.env.PRODUCTION !== 'true' }),
version: 1,
};

Expand Down
2 changes: 1 addition & 1 deletion src/features/requester/requesterSlice.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ function createPersistedReducer(reducer) {
key: PERSISTANCE_KEY,
storage,
version: 1,
migrate: createMigrate(migrations, { debug: process.env.NODE_ENV !== 'production' }),
migrate: createMigrate(migrations, { debug: process.env.PRODUCTION !== 'true' }),
blacklist: [],
};

Expand Down
2 changes: 1 addition & 1 deletion src/features/tasks/tasksSlice.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ function createPersistedReducer(reducer) {
key: PERSISTANCE_KEY,
storage,
version: 3,
migrate: createMigrate(migrations, { debug: process.env.NODE_ENV !== 'production' }),
migrate: createMigrate(migrations, { debug: process.env.PRODUCTION !== 'true' }),
blacklist: [],
};

Expand Down
2 changes: 1 addition & 1 deletion src/features/translator/translatorSlice.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function createPersistedReducer(reducer) {
key: PERSISTANCE_KEY,
storage,
version: 2,
migrate: createMigrate(migrations, { debug: process.env.NODE_ENV !== 'production' }),
migrate: createMigrate(migrations, { debug: process.env.PRODUCTION !== 'true' }),
blacklist: [],
};

Expand Down
4 changes: 2 additions & 2 deletions src/features/web3/supportedChains.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { map, prop } from '~/shared/fp';
import { getBaseUrl } from './blockExplorer';

const env = process.env.NODE_ENV ?? 'development';
const env = process.env.PRODUCTION ?? 'development';

const defaultChainIdsPerEnv = {
production: Number(process.env.DEFAULT_CHAIN_ID) ?? 100,
true: Number(process.env.DEFAULT_CHAIN_ID) ?? 100,
development: Number(process.env.DEFAULT_CHAIN_ID) ?? 77,
};

Expand Down
2 changes: 1 addition & 1 deletion src/shared/useStateMachine.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const createReducer =

export default function useStateMachine(
machine,
{ warnOnError = process.env.NODE_ENV !== 'production', throwOnError = false } = {}
{ warnOnError = process.env.PRODUCTION !== 'true', throwOnError = false } = {}
) {
const [state, dispatch] = useReducer(createReducer(machine, { warnOnError, throwOnError }), machine.initial);

Expand Down
2 changes: 1 addition & 1 deletion src/store/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const persistor = persistStore(store);
let sagaTask = sagaMiddleware.run(rootSaga);

// HMR setup
if (process.env.NODE_ENV === 'development' && module.hot) {
if (process.env.PRODUCTION === 'development' && module.hot) {
module.hot.accept('./rootReducer', () => {
console.debug('HMR reducer');
const createRootReducer = require('./rootReducer').createRootReducer;
Expand Down

0 comments on commit a821d45

Please sign in to comment.