Skip to content

Commit f1379c5

Browse files
app migration, config update.
2 parents f7757a9 + dc99b57 commit f1379c5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+9772
-8379
lines changed

.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
SKIP_PREFLIGHT_CHECK = true

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ yarn
1818
1. clone repository and install packages
1919

2020
```sh
21-
git clone https://github.dev/OmniFlix/insync.git
21+
git clone https://github.com/OmniFlix/insync.git
2222
cd insync
2323
yarn
2424
```
@@ -33,7 +33,7 @@ yarn
3333
export const config = {
3434
RPC_URL: 'https://rpc.flixnet.omniflix.network',
3535
REST_URL: 'https://rest.flixnet.omniflix.network',
36-
EXPLORER_URL: 'https://explorer.omniflix.network',
36+
EXPLORER_URL: 'https://www.mintscan.io/omniflix',
3737
STAKING_URL: 'https://flix.omniflix.co/stake',
3838
NETWORK_NAME: 'OmniFlix',
3939
NETWORK_TYPE: 'testnet',

config-overrides.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
const webpack = require('webpack');
2+
3+
module.exports = function override (config, env) {
4+
config.resolve.fallback = {
5+
stream: require.resolve('stream-browserify'),
6+
crypto: require.resolve('crypto-browserify'),
7+
process: require.resolve('process/browser'),
8+
buffer: require.resolve('buffer'),
9+
levenary: false,
10+
vm: false,
11+
};
12+
config.resolve.extensions = [...config.resolve.extensions, '.ts', '.js'];
13+
config.plugins = [
14+
...config.plugins,
15+
new webpack.ProvidePlugin({
16+
Buffer: ['buffer', 'Buffer'],
17+
}),
18+
new webpack.ProvidePlugin({
19+
process: 'process/browser',
20+
}),
21+
];
22+
config.ignoreWarnings = [/Failed to parse source map/];
23+
24+
return config;
25+
};

package.json

Lines changed: 39 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,40 +6,53 @@
66
"license": "MIT",
77
"private": true,
88
"dependencies": {
9-
"@cosmjs/amino": "^0.26.5",
10-
"@cosmjs/proto-signing": "^0.26.5",
11-
"@cosmjs/stargate": "^0.26.5",
12-
"@cosmostation/cosmos-client": "^0.0.1",
9+
"@cosmjs/amino": "0.32.2",
10+
"@cosmjs/launchpad": "0.27.1",
11+
"@cosmjs/proto-signing": "0.32.2",
12+
"@cosmjs/stargate": "0.32.2",
13+
"@cosmostation/cosmos-client": "0.0.5",
1314
"@cosmostation/extension-client": "^0.1.7",
15+
"@emotion/react": "^11.11.3",
1416
"@material-ui/core": "^4.11.3",
1517
"@material-ui/icons": "^4.11.2",
1618
"@material-ui/lab": "^4.0.0-alpha.58",
17-
"classnames": "^2.2.6",
19+
"@redux-devtools/extension": "^3.3.0",
20+
"buffer": "^6.0.3",
21+
"classnames": "2.5.1",
22+
"crypto-browserify": "^3.12.0",
1823
"history": "^5.0.0",
1924
"js-base64": "^3.6.0",
2025
"latest": "^0.2.0",
2126
"long": "^5.2.0",
22-
"moment": "^2.29.1",
27+
"moment": "2.30.1",
2328
"mui-datatables": "^3.7.7",
29+
"process": "^0.11.10",
2430
"prop-types": "^15.7.2",
25-
"react": "^16.12.0",
26-
"react-dom": "^16.13.1",
27-
"react-redux": "^7.2.0",
28-
"react-router": "^5.2.0",
29-
"react-router-dom": "^5.2.0",
30-
"react-scripts": "3.4.0",
31-
"redux": "^4.0.5",
32-
"redux-devtools-extension": "^2.13.8",
33-
"redux-thunk": "^2.3.0"
31+
"react": "18.2.0",
32+
"react-app-rewired": "^2.2.1",
33+
"react-dom": "18.2.0",
34+
"react-redux": "9.1.0",
35+
"react-router": "6.22.0",
36+
"react-router-dom": "6.22.0",
37+
"react-scripts": "5.0.1",
38+
"redux": "5.0.1",
39+
"redux-thunk": "^2.3.0",
40+
"stream-browserify": "^3.0.0",
41+
"typescript": "^5.3.3",
42+
"web-vitals": "^3.5.2",
43+
"webpack": "^5.89.0"
3444
},
3545
"scripts": {
36-
"start": "react-scripts start",
37-
"build": "react-scripts build",
38-
"test": "react-scripts test",
39-
"eject": "react-scripts eject"
46+
"start": "react-app-rewired start",
47+
"build": "react-app-rewired build",
48+
"test": "react-app-rewired test",
49+
"eject": "react-app-rewired eject"
4050
},
4151
"devDependencies": {
42-
"@cosmjs/launchpad": "^0.26.5",
52+
"@babel/core": "7.23.2",
53+
"@babel/eslint-parser": "7.22.15",
54+
"@babel/plugin-proposal-private-property-in-object": "7.21.11",
55+
"@babel/preset-env": "7.23.2",
4356
"axios": "^0.21.1",
4457
"env-cmd": "^10.1.0",
4558
"eslint": "^6.8.0",
@@ -50,6 +63,12 @@
5063
"eslint-plugin-react": "^7.18.3",
5164
"eslint-plugin-standard": "^4.0.1"
5265
},
66+
"eslintConfig": {
67+
"extends": [
68+
"react-app",
69+
"react-app/jest"
70+
]
71+
},
5372
"browserslist": {
5473
"production": [
5574
">0.2%",

public/favicon.ico

0 Bytes
Binary file not shown.

src/Router.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import { Route, Switch } from 'react-router-dom';
2+
import { Route, Routes } from 'react-router-dom';
33
import Home from './containers/Home';
44
import Stake from './containers/Stake';
55
import Proposals from './containers/Proposals';
@@ -23,19 +23,19 @@ const Router = () => {
2323
return (
2424
<div className="main_content">
2525
<div className="content_div scroll_bar">
26-
<Switch>
26+
<Routes>
2727
{routes.map((route) =>
2828
<Route
2929
key={route.path}
3030
exact
31-
component={route.component}
31+
element={<route.component/>}
3232
path={route.path}/>,
3333
)}
3434
<Route
3535
exact
36-
component={Home}
36+
element={<Home/>}
3737
path="*"/>
38-
</Switch>
38+
</Routes>
3939
</div>
4040
</div>
4141
);

src/actions/accounts/index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export const getDelegations = (address) => (dispatch) => {
6565
},
6666
})
6767
.then((res) => {
68-
dispatch(fetchDelegationsSuccess(res.data && res.data.result));
68+
dispatch(fetchDelegationsSuccess(res.data && res.data.delegation_responses));
6969
})
7070
.catch((error) => {
7171
dispatch(fetchDelegationsError(
@@ -107,7 +107,7 @@ export const getBalance = (address) => (dispatch) => {
107107
},
108108
})
109109
.then((res) => {
110-
dispatch(fetchBalanceSuccess(res.data && res.data.result));
110+
dispatch(fetchBalanceSuccess(res.data && res.data.balances));
111111
})
112112
.catch((error) => {
113113
dispatch(fetchBalanceError(
@@ -149,7 +149,7 @@ export const fetchVestingBalance = (address) => (dispatch) => {
149149
},
150150
})
151151
.then((res) => {
152-
dispatch(fetchVestingBalanceSuccess(res.data && res.data.result));
152+
dispatch(fetchVestingBalanceSuccess(res.data && res.data.balances));
153153
})
154154
.catch((error) => {
155155
dispatch(fetchVestingBalanceError(
@@ -203,7 +203,7 @@ export const getUnBondingDelegations = (address) => (dispatch) => {
203203
},
204204
})
205205
.then((res) => {
206-
dispatch(fetchUnBondingDelegationsSuccess(res.data && res.data.result));
206+
dispatch(fetchUnBondingDelegationsSuccess(res.data && res.data.unbonding_responses));
207207
})
208208
.catch((error) => {
209209
dispatch(fetchUnBondingDelegationsError(
@@ -252,7 +252,7 @@ export const fetchRewards = (address) => (dispatch) => {
252252
},
253253
})
254254
.then((res) => {
255-
dispatch(fetchRewardsSuccess(res.data && res.data.result));
255+
dispatch(fetchRewardsSuccess(res.data));
256256
})
257257
.catch((error) => {
258258
dispatch(fetchRewardsError(

src/actions/proposals.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ export const fetchVoteDetails = (id, address) => (dispatch) => {
156156
},
157157
})
158158
.then((res) => {
159-
dispatch(fetchVoteDetailsSuccess(res.data && res.data.result));
159+
dispatch(fetchVoteDetailsSuccess(res.data && res.data.vote));
160160
})
161161
.catch((error) => {
162162
dispatch(fetchVoteDetailsError(
@@ -200,7 +200,7 @@ export const fetchProposalTally = (id) => (dispatch) => {
200200
},
201201
})
202202
.then((res) => {
203-
dispatch(fetchProposalTallySuccess(res.data && res.data.result, id));
203+
dispatch(fetchProposalTallySuccess(res.data && res.data.tally, id));
204204
})
205205
.catch((error) => {
206206
dispatch(fetchProposalTallyError(

0 commit comments

Comments
 (0)