Skip to content

Commit

Permalink
Merge in progress
Browse files Browse the repository at this point in the history
  • Loading branch information
ThibaultJRD committed Nov 21, 2023
2 parents 7d00815 + 0179d1b commit 2bd8377
Show file tree
Hide file tree
Showing 152 changed files with 14,201 additions and 1,617 deletions.
2 changes: 1 addition & 1 deletion .env.prod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ GENERATE_SOURCEMAP=false

#RPC
REACT_APP_RPC_LUM=https://node0.mainnet.lum.network/rpc
REACT_APP_RPC_ATOM=https://rpc.cosmoshub.strange.love/
REACT_APP_RPC_ATOM=https://rpc.cosmos.directory/cosmoshub

# Firebase
REACT_APP_FIREBASE_API_KEY=AIzaSyA49DTslUcJG2b5TUdI_EbPzugFFXOfO0o
Expand Down
66 changes: 37 additions & 29 deletions .github/workflows/merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,21 @@ jobs:
name: Deploy on testnet hosting
runs-on: ubuntu-latest
environment: testnet
env:
REACT_APP_API_URL: "https://explorer-testnet.infra.lum.network/"
REACT_APP_IMPERATOR_API_URL: "https://api-osmosis.imperator.co"
GENERATE_SOURCEMAP: "false"
REACT_APP_RPC_LUM: "https://testnet-rpc.cosmosmillions.com/lum/rpc"
REACT_APP_RPC_ATOM: "https://testnet-rpc.cosmosmillions.com/atom/rpc"
REACT_APP_FIREBASE_API_KEY: "AIzaSyA49DTslUcJG2b5TUdI_EbPzugFFXOfO0o"
REACT_APP_FIREBASE_AUTH_DOMAIN: "lum-network.firebaseapp.com"
REACT_APP_FIREBASE_DATABASE_URL: "https://lum-network-default-rtdb.firebaseio.com"
REACT_APP_FIREBASE_PROJECT_ID: "lum-network"
REACT_APP_FIREBASE_STORAGE_BUCKET: "lum-network.appspot.com"
REACT_APP_FIREBASE_MESSAGING_SENDER_ID: "904911254564"
REACT_APP_FIREBASE_APP_ID: "1:904911254564:web:a0297e7aa68664410394b1"
REACT_APP_FIREBASE_MEASUREMENT_ID: "G-FZ28RMP812"

steps:
- name: Set up Node version to 16
uses: actions/setup-node@v2
Expand All @@ -24,22 +39,11 @@ jobs:
- name: Install packages
run: yarn

- name: Test
run: yarn test

- name: Build the test net bundle
run: yarn build
env:
REACT_APP_API_URL: "https://explorer-testnet.infra.lum.network/"
REACT_APP_IMPERATOR_API_URL: "https://api-osmosis.imperator.co"
GENERATE_SOURCEMAP: "false"
REACT_APP_RPC_LUM: "https://testnet-rpc.cosmosmillions.com/lum/rpc"
REACT_APP_RPC_ATOM: "https://testnet-rpc.cosmosmillions.com/atom/rpc"
REACT_APP_FIREBASE_API_KEY: "AIzaSyA49DTslUcJG2b5TUdI_EbPzugFFXOfO0o"
REACT_APP_FIREBASE_AUTH_DOMAIN: "lum-network.firebaseapp.com"
REACT_APP_FIREBASE_DATABASE_URL: "https://lum-network-default-rtdb.firebaseio.com"
REACT_APP_FIREBASE_PROJECT_ID: "lum-network"
REACT_APP_FIREBASE_STORAGE_BUCKET: "lum-network.appspot.com"
REACT_APP_FIREBASE_MESSAGING_SENDER_ID: "904911254564"
REACT_APP_FIREBASE_APP_ID: "1:904911254564:web:a0297e7aa68664410394b1"
REACT_APP_FIREBASE_MEASUREMENT_ID: "G-FZ28RMP812"

- name: Deploy on firebase testnet project
uses: FirebaseExtended/action-hosting-deploy@v0
Expand All @@ -56,6 +60,22 @@ jobs:
name: Deploy on main net hosting
runs-on: ubuntu-latest
environment: mainnet
env:
REACT_APP_API_URL: "https://explorer-mainnet.infra.lum.network"
REACT_APP_IMPERATOR_API_URL: "https://api-osmosis.imperator.co"
GENERATE_SOURCEMAP: "false"
REACT_APP_RPC_LUM: "https://node0.mainnet.lum.network/rpc"
REACT_APP_RPC_ATOM: "https://rpc.cosmos.directory/cosmoshub"
REACT_APP_FIREBASE_API_KEY: "AIzaSyA49DTslUcJG2b5TUdI_EbPzugFFXOfO0o"
REACT_APP_FIREBASE_AUTH_DOMAIN: "lum-network.firebaseapp.com"
REACT_APP_FIREBASE_DATABASE_URL: "https://lum-network-default-rtdb.firebaseio.com"
REACT_APP_FIREBASE_PROJECT_ID: "lum-network"
REACT_APP_FIREBASE_STORAGE_BUCKET: "lum-network.appspot.com"
REACT_APP_FIREBASE_MESSAGING_SENDER_ID: "904911254564"
REACT_APP_FIREBASE_APP_ID: "1:904911254564:web:a0297e7aa68664410394b1"
REACT_APP_FIREBASE_MEASUREMENT_ID: "G-FZ28RMP812"
REACT_APP_SENTRY_DSN: "https://7421a4490ba149b888913bbd7af15b84@o1171159.ingest.sentry.io/4505589511815168"

steps:
- name: Set up Node version to 16
uses: actions/setup-node@v2
Expand All @@ -68,23 +88,11 @@ jobs:
- name: Install packages
run: yarn

- name: Test
run: yarn test

- name: Build the main net bundle
run: yarn build
env:
REACT_APP_API_URL: "https://explorer-mainnet.infra.lum.network"
REACT_APP_IMPERATOR_API_URL: "https://api-osmosis.imperator.co"
GENERATE_SOURCEMAP: "false"
REACT_APP_RPC_LUM: "https://node0.mainnet.lum.network/rpc"
REACT_APP_RPC_ATOM: "https://rpc.cosmoshub.strange.love"
REACT_APP_FIREBASE_API_KEY: "AIzaSyA49DTslUcJG2b5TUdI_EbPzugFFXOfO0o"
REACT_APP_FIREBASE_AUTH_DOMAIN: "lum-network.firebaseapp.com"
REACT_APP_FIREBASE_DATABASE_URL: "https://lum-network-default-rtdb.firebaseio.com"
REACT_APP_FIREBASE_PROJECT_ID: "lum-network"
REACT_APP_FIREBASE_STORAGE_BUCKET: "lum-network.appspot.com"
REACT_APP_FIREBASE_MESSAGING_SENDER_ID: "904911254564"
REACT_APP_FIREBASE_APP_ID: "1:904911254564:web:a0297e7aa68664410394b1"
REACT_APP_FIREBASE_MEASUREMENT_ID: "G-FZ28RMP812"
REACT_APP_SENTRY_DSN: "https://7421a4490ba149b888913bbd7af15b84@o1171159.ingest.sentry.io/4505589511815168"

- name: Deploy on firebase main net project
uses: FirebaseExtended/action-hosting-deploy@v0
Expand Down
54 changes: 48 additions & 6 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,31 @@ jobs:
- name: Install packages
run: yarn

- name: Build
- name: Test
run: yarn test
env:
REACT_APP_API_URL: "https://explorer-testnet.infra.lum.network"
REACT_APP_IMPERATOR_API_URL: "https://api-osmosis.imperator.co"
GENERATE_SOURCEMAP: "false"
REACT_APP_RPC_LUM: "https://testnet-rpc.cosmosmillions.com/lum/rpc"
REACT_APP_RPC_ATOM: "https://testnet-rpc.cosmosmillions.com/atom/rpc"
REACT_APP_FIREBASE_API_KEY: "AIzaSyA49DTslUcJG2b5TUdI_EbPzugFFXOfO0o"
REACT_APP_FIREBASE_AUTH_DOMAIN: "lum-network.firebaseapp.com"
REACT_APP_FIREBASE_DATABASE_URL: "https://lum-network-default-rtdb.firebaseio.com"
REACT_APP_FIREBASE_PROJECT_ID: "lum-network"
REACT_APP_FIREBASE_STORAGE_BUCKET: "lum-network.appspot.com"
REACT_APP_FIREBASE_MESSAGING_SENDER_ID: "904911254564"
REACT_APP_FIREBASE_APP_ID: "1:904911254564:web:a0297e7aa68664410394b1"
REACT_APP_FIREBASE_MEASUREMENT_ID: "G-FZ28RMP812"

- name: Build for Mainnet
run: yarn build
env:
REACT_APP_API_URL: "https://explorer-mainnet.infra.lum.network"
REACT_APP_IMPERATOR_API_URL: "https://api-osmosis.imperator.co"
GENERATE_SOURCEMAP: "false"
REACT_APP_RPC_LUM: "https://node0.mainnet.lum.network/rpc"
REACT_APP_RPC_ATOM: "https://rpc.cosmoshub.strange.love/"
REACT_APP_RPC_ATOM: "https://rpc.cosmos.directory/cosmoshub"
REACT_APP_FIREBASE_API_KEY: "AIzaSyA49DTslUcJG2b5TUdI_EbPzugFFXOfO0o"
REACT_APP_FIREBASE_AUTH_DOMAIN: "lum-network.firebaseapp.com"
REACT_APP_FIREBASE_DATABASE_URL: "https://lum-network-default-rtdb.firebaseio.com"
Expand All @@ -38,10 +55,7 @@ jobs:
REACT_APP_FIREBASE_APP_ID: "1:904911254564:web:a0297e7aa68664410394b1"
REACT_APP_FIREBASE_MEASUREMENT_ID: "G-FZ28RMP812"

- name: Test
run: yarn test

- name: Deploy
- name: Deploy Mainnet Preview
uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
Expand All @@ -51,3 +65,31 @@ jobs:
target: mainnet
env:
FIREBASE_CLI_PREVIEWS: hostingchannels

- name: Build for Testnet
run: yarn build
env:
REACT_APP_API_URL: "https://explorer-testnet.infra.lum.network"
REACT_APP_IMPERATOR_API_URL: "https://api-osmosis.imperator.co"
GENERATE_SOURCEMAP: "false"
REACT_APP_RPC_LUM: "https://testnet-rpc.cosmosmillions.com/lum/rpc"
REACT_APP_RPC_ATOM: "https://testnet-rpc.cosmosmillions.com/atom/rpc"
REACT_APP_FIREBASE_API_KEY: "AIzaSyA49DTslUcJG2b5TUdI_EbPzugFFXOfO0o"
REACT_APP_FIREBASE_AUTH_DOMAIN: "lum-network.firebaseapp.com"
REACT_APP_FIREBASE_DATABASE_URL: "https://lum-network-default-rtdb.firebaseio.com"
REACT_APP_FIREBASE_PROJECT_ID: "lum-network"
REACT_APP_FIREBASE_STORAGE_BUCKET: "lum-network.appspot.com"
REACT_APP_FIREBASE_MESSAGING_SENDER_ID: "904911254564"
REACT_APP_FIREBASE_APP_ID: "1:904911254564:web:a0297e7aa68664410394b1"
REACT_APP_FIREBASE_MEASUREMENT_ID: "G-FZ28RMP812"

- name: Deploy Testnet Preview
uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT }}'
expires: 7d
projectId: lum-network
target: testnet
env:
FIREBASE_CLI_PREVIEWS: hostingchannels
3 changes: 3 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: ['@babel/preset-typescript', ['@babel/preset-env', { targets: { node: 'current' } }], '@babel/preset-react'],
};
67 changes: 49 additions & 18 deletions config-overrides.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,53 @@
// eslint-disable-next-line @typescript-eslint/no-var-requires
/* eslint-disable @typescript-eslint/no-var-requires */
const webpack = require('webpack');

module.exports = function override(config) {
//do stuff with the webpack config...
config.resolve.fallback = {
...config.resolve.fallback,
path: require.resolve('path-browserify'),
stream: require.resolve('stream-browserify'),
crypto: require.resolve('crypto-browserify'),
querystring: require.resolve('querystring-es3'),
buffer: require.resolve('buffer'),
};
config.plugins = [
...config.plugins,
new webpack.ProvidePlugin({
Buffer: ['buffer', 'Buffer'],
}),
];
module.exports = {
webpack: function (config) {
//do stuff with the webpack config...
config.resolve.fallback = {
...config.resolve.fallback,
path: require.resolve('path-browserify'),
stream: require.resolve('stream-browserify'),
crypto: require.resolve('crypto-browserify'),
querystring: require.resolve('querystring-es3'),
buffer: require.resolve('buffer'),
assert: require.resolve('minimalistic-assert'),
http: require.resolve('stream-http'),
https: require.resolve('https-browserify'),
url: require.resolve('url'),
};

return config;
config.plugins = [
...config.plugins,
new webpack.ProvidePlugin({
Buffer: ['buffer', 'Buffer'],
}),
];

config.module.rules.push({
test: /\.m?js$/,
resolve: {
fullySpecified: false,
},
});
return config;
},
jest: function (config) {
config.transform = {
...config.transform,
'^.+\\.(ts|tsx)$': 'ts-jest',
};

config.transformIgnorePatterns = ['/node_modules/(?!(axios|gsap|wagmi|@wagmi|@adraffy/ens-normalize|@rainbow-me/rainbowkit))'];

config.moduleNameMapper = {
...config.moduleNameMapper,
'\\.(css|scss)$': 'identity-obj-proxy',
'@ledgerhq/devices': '@ledgerhq/devices/lib',
};

config.setupFiles = ['reflect-metadata', 'jest-canvas-mock'];

return config;
},
};
8 changes: 8 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
preset: 'ts-jest',
testEnvironment: 'jsdom',
moduleDirectories: ['node_modules'],
roots: ['<rootDir>'],
setupFilesAfterEnv: ['<rootDir>/src/setupTests.ts'],
};
41 changes: 33 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@cosmostation/cosmos-client": "^0.0.5",
"@cosmostation/extension-client": "^0.1.15",
"@firebase/analytics": "^0.9.3",
"@keplr-wallet/types": "^0.11.44",
"@lum-network/sdk-javascript": "^0.8.8",
"@keplr-wallet/types": "^0.12.6",
"@leapwallet/elements": "^0.6.6",
"@lum-network/sdk-javascript": "^0.8.9",
"@popperjs/core": "^2.11.6",
"@rematch/core": "^2.2.0",
"@rematch/loading": "^2.1.2",
Expand All @@ -19,6 +22,7 @@
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"axios": "^1.3.3",
"babel-loader": "^9.1.3",
"bootstrap": "^5.2.3",
"buffer": "^6.0.3",
"canvas-confetti": "^1.6.0",
Expand All @@ -29,6 +33,8 @@
"firebase": "^9.17.1",
"formik": "^2.2.9",
"gsap": "^3.11.4",
"gsap-trial": "^3.12.0",
"https-browserify": "^1.0.0",
"i18next": "^22.4.10",
"long": "^5.2.1",
"lottie-react": "^2.4.0",
Expand All @@ -45,27 +51,33 @@
"react-dom": "^18.2.0",
"react-dropzone": "^14.2.3",
"react-i18next": "^12.2.0",
"react-infinite-scroller": "^1.2.6",
"react-loading-skeleton": "^3.1.1",
"react-redux": "^8.0.5",
"react-responsive": "^9.0.2",
"react-router-dom": "^6.8.1",
"react-scripts": "5.0.1",
"react-select": "^5.7.0",
"react-spring": "9",
"react-switch": "^7.0.0",
"react-toastify": "^9.1.1",
"react-tooltip": "^5.8.3",
"redux": "^4.2.1",
"reflect-metadata": "^0.1.13",
"sass": "^1.58.1",
"stream-browserify": "^3.0.0",
"stream-http": "^3.2.0",
"typescript": "^4.4.2",
"url": "^0.11.3",
"use-persisted-state": "^0.3.3",
"web-vitals": "^2.1.0",
"yup": "^1.0.2"
},
"scripts": {
"start": "react-app-rewired start",
"build": "react-app-rewired build",
"test": "react-app-rewired test",
"eject": "react-app-rewired eject",
"test": "react-app-rewired test --coverage",
"eject": "react-scripts eject",
"lint": "eslint 'src/**/*.{js,jsx,ts,tsx,json}'",
"lint:fix": "eslint --fix 'src/**/*.{js,jsx,ts,tsx,json}'",
"format": "prettier --write 'src/**/*.{js,jsx,ts,tsx,css,md,json}' --config ./.prettierrc",
Expand All @@ -80,9 +92,11 @@
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
"chrome >= 67",
"edge >= 79",
"firefox >= 68",
"opera >= 54",
"safari >= 14"
],
"development": [
"last 1 chrome version",
Expand All @@ -91,20 +105,31 @@
]
},
"devDependencies": {
"@babel/core": "^7.22.1",
"@babel/preset-env": "^7.22.4",
"@babel/preset-react": "^7.22.3",
"@babel/preset-typescript": "^7.21.5",
"@types/bootstrap": "^5.2.6",
"@types/canvas-confetti": "^1.6.0",
"@types/numeral": "^2.0.2",
"@types/papaparse": "^5.3.7",
"@types/react-burger-menu": "^2.8.3",
"@types/react-infinite-scroller": "^1.2.3",
"@types/use-persisted-state": "^0.3.2",
"@typescript-eslint/eslint-plugin": "^5.52.0",
"@typescript-eslint/parser": "^5.52.0",
"babel-jest": "^29.7.0",
"eslint": "^8.34.0",
"eslint-config-prettier": "^8.6.0",
"eslint-import-resolver-typescript": "^3.5.3",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react-hooks": "^4.6.0",
"prettier": "^2.8.4"
"identity-obj-proxy": "^3.0.0",
"jest-canvas-mock": "^2.5.1",
"lokijs": "^1.5.12",
"prettier": "^2.8.4",
"ts-jest": "^27"
}
}
Loading

0 comments on commit 2bd8377

Please sign in to comment.