Skip to content

Commit 62fb602

Browse files
committed
hotfix - walletLayer1 balance
1 parent b2aeb87 commit 62fb602

File tree

11 files changed

+104
-172
lines changed

11 files changed

+104
-172
lines changed

packages/web-bridge/.env.development

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ REACT_APP_WALLET_CONNECT_BRIDGE=https://wcbridge.loopring.io
1414
REACT_APP_WALLET_CONNECT_PING=https://wcbridge.loopring.io/hello
1515

1616
REACT_APP_API_URL=api3.loopring.io
17+
#https://dev.loopring.io uat2.loopring.io dev.loopring.io
1718
REACT_APP_API_URL_UAT=uat2.loopring.io
1819
SKIP_PREFLIGHT_CHECK=true
19-
REACT_APP_WITH_PRO=true
20+
REACT_APP_WITH_PRO=true
21+
22+
#DEV 0x355E9941C5e301033ecfD37184E78443c5241035 UAT 0xfDDA90dbCc99B3a91e3fB1292991Ba1076d9E281
23+
REACT_APP_GOERLI_NFT_FACTORY_COLLECTION=0x355E9941C5e301033ecfD37184E78443c5241035

packages/web-bridge/.env.production

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,3 @@ REACT_APP_API_URL=api3.loopring.io
1515
REACT_APP_API_URL_UAT=uat2.loopring.io
1616
SKIP_PREFLIGHT_CHECK=true
1717
REACT_APP_WITH_PRO=true
18-
19-
#REACT_APP_FORTMATIC_API_KEY=pk_test_A6260FCBAA2EBDFB
20-
#REACT_APP_MAGIC_API_KEY=pk_test_398B82F5F0E88874
21-
#REACT_APP_PORTIS_DAPP_ID=e9be171c-2b7f-4ff0-8db9-327707511ee2
22-

packages/web-bridge/README.md

Lines changed: 72 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,77 @@
1-
scp -i ~/Documents/infos/kstore/1.pm -r build [email protected]:~/tradingroom/leochan/loopring-web/packages/webapp
1+
<p align="center">
2+
<a href="https://github.com/Loopring/loopring-web-v2" rel="noopener" target="_blank"><img width="150" src="https://loopring.org/images/logo.svg" alt="Loopring-website"></a>
3+
</p>
24

3-
# Generate CA private key
4-
openssl genrsa -out ca.key 2048
5-
# Generate CSR
6-
openssl req -new -key ca.key -out ca.csr
7-
# Generate Self Signed certificate(CA 根证书)
8-
openssl x509 -req -days 3650 -in ca.csr -signkey ca.key -out ca.crt
5+
<h1 align="center">Loopring Application</h1>
6+
<div align="center">
7+
<h2>Ethereum’s First zkRollup Layer2</h2>
8+
<p>Secure, Fast, and Cheap</p>
99

10-
-config
10+
[![license](https://img.shields.io/badge/license-MIT-blue)](https://github.com/Loopring/loopring-web-v2/master/LICENSE)
1111

12-
# private key
13-
openssl genrsa -des3 -out server.key 1024
14-
# generate csr
15-
openssl req -new -key server.key -out server.csr
16-
# generate certificate
17-
openssl ca -in server.csr -out server.crt -cert ca.crt -keyfile ca.key
12+
[![type-badge](https://img.shields.io/npm/types/react-data-grid)](https://www.npmjs.com/package/react-data-grid)
1813

19-
openssl genrsa -des3 -out client.key 1024
20-
openssl req -new -key client.key -out client.csr
21-
openssl ca -in client.csr -out client.crt -cert ca.crt -keyfile ca.key
14+
<!-- [![Materi-UI](https://img.shields.io/npm/types/react-data-grid)](https://www.npmjs.com/package/react-data-grid) -->
2215

23-
export OPENSSL_CONF=/usr/lib/ssl/openssl.cnf
16+
</div>
17+
18+
## 🚀 Quick Start
19+
20+
```bash
21+
// with yarn
22+
yarn install
23+
yarn up
24+
cd ./packages/webapp
25+
npm run dev
26+
27+
28+
```
29+
## 📚 Loopring UI component StoryBook
30+
```bash
31+
32+
cd ./packages/component-lib
33+
npm run storybook
34+
```
35+
36+
## 🏗 Framework Design
37+
38+
![](https://static.loopring.io/Loopring%20framwork.png)
39+
40+
## 👉 [What is Loopring?](https://loopring.org/#/)
41+
42+
## 🫂 Community
43+
- [Loopring Website](https://loopring.org/)
44+
- [Loopring Exchange](https://loopring.io/#/layer2)
45+
- [Loopring Reddit](https://www.reddit.com/r/loopringorg/)
46+
- [Loopring Medium](https://medium.com/loopring-protocol)
47+
- [Loopring Twitter](https://twitter.com/loopringorg)
48+
- [Loopring Telegram](https://t.me/loopring_en)
49+
50+
51+
## 👺 For Developer
52+
- We appreciate any improvements or initiatives for Loopring Layer2 website, please view the source code in `./packages/component-lib`.
53+
- The project contains a separate lib "web3-provider", which is a third-party ETH web3 wallet provider service (wallectConnect & metamask),
54+
- You are welcome to reuse it or integrate your provider service with our website.
55+
- Feel free to leave suggestions or ideas.
56+
57+
### 📒 API & Dependency
58+
- [Web3-Provider](https://www.npmjs.com/package/@loopring-web/web3-provider)
59+
- [Loopring-sdk](https://www.npmjs.com/package/@loopring-web/loopring-sdk)
60+
- [Python](https://github.com/Loopring/hello_loopring)
61+
- [APIs](https://docs.loopring.io/en/)
62+
63+
64+
## 🙋 Protocol & Architecture
65+
66+
- [Whitepaper](https://loopring.org/resources/en_whitepaper.pdf)
67+
- [Design Docs](https://github.com/LoopringSecondary/docs/wiki/Loopring3_Design)
68+
69+
## [Help](https://desk.zoho.com/portal/loopring/en/home)
70+
71+
## 🔑 Security
72+
73+
- [Wallet](https://security.loopring.io/)
74+
- [Protocol Audit](https://loopring.org/resources/loopring1.0_audit.pdf)
75+
76+
## Release Process
77+
alpha.loopring.io, beta.loopring.io, static.loopring.io, and loopring.io are now auto deployed using Vercel.

packages/web-bridge/config-overrides.js

Lines changed: 6 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,16 @@ const {
99
} = require("customize-cra");
1010

1111
const CopyWebpackPlugin = require("copy-webpack-plugin");
12+
const HtmlWebpackPlugin = require("html-webpack-plugin"); //installed via npm
1213

1314
// Try the environment variable, otherwise use root
1415
const ASSET_PATH = process.env.ASSET_PATH || "/";
1516
// const rewireLess = require('react-app-rewire-less')
17+
18+
const { alias } = require("react-app-rewire-alias");
19+
1620
const path = require("path");
21+
1722
const GitRevisionPlugin = require("git-revision-webpack-plugin");
1823
const gitRevisionPlugin = new GitRevisionPlugin();
1924

@@ -107,64 +112,19 @@ module.exports = override(
107112
console.log("-----> enter config!!!!!!!");
108113

109114
const setConfig = (index) => {
110-
let babelLoader = config.module.rules[1].oneOf[index];
111115
console.log("-----> enter setConfig!!!!!!! index:", index);
116+
let babelLoader = config.module.rules[1].oneOf[index];
112117
babelLoader.include = babelLoader.include.replace("/web-bridge/src", "");
113118
config.module.rules[1].oneOf[index] = babelLoader;
114119
};
115120

116121
setConfig(4);
117-
118-
// addCompression()
119-
120-
// addAnalyzer()
121-
122-
// setConfig(3);
123-
124-
/*
125-
const oneOf_loc = config.module.rules.findIndex((n) => n.oneOf) // 这里的config是全局的
126-
config.module.rules[oneOf_loc].oneOf = [
127-
{
128-
test: /\.module\.less$/,
129-
use: getStyleLoaders(
130-
{
131-
importLoaders: 2,
132-
modules: {
133-
getLocalIdent: getCSSModuleLocalIdent,
134-
},
135-
},
136-
'less-loader',
137-
),
138-
},
139-
...config.module.rules[oneOf_loc].oneOf,
140-
]
141-
142-
config.resolve.modules = [
143-
path.resolve(__dirname, "..", "src"),
144-
"node_modules",
145-
146-
]*/
147122
config.resolve.alias = {
148123
...config.resolve.alias,
149124
"@material-ui/core/Menu": "@mui/material/Menu",
150125
"@material-ui/core": "@mui/material",
151126
"@material-ui/core/Popover": "@mui/material/Popover",
152127
};
153-
// config.resolve = [
154-
// alias({
155-
//
156-
// })(config)
157-
// ]
158-
159128
return config;
160129
}
161-
/*
162-
function override(config, env) {
163-
config = rewireLess.withLoaderOptions({
164-
javascriptEnabled: true,
165-
})(config, env)
166-
167-
return config
168-
},
169-
*/
170130
);

packages/web-bridge/src/App.tsx

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// import { ModalProvider } from 'styled-react-modal'
2+
import RouterView from "./routers";
13
import { GlobalStyles } from "@mui/material";
24
import { css, Theme, useTheme } from "@emotion/react";
35
import { globalCss, SagaStatus } from "@loopring-web/common-resources";
@@ -8,7 +10,6 @@ import { useTranslation } from "react-i18next";
810

911
import { HashRouter as Router, useLocation } from "react-router-dom";
1012
import { store } from "@loopring-web/core";
11-
import RouterView from "./routers";
1213

1314
const ScrollToTop = () => {
1415
const { pathname } = useLocation();
@@ -30,11 +31,11 @@ const App = () => {
3031
if (storeLan !== language) {
3132
store.dispatch(setLanguage(language));
3233
}
33-
}, [language, storeLan]);
34+
}, [storeLan, language]);
3435

3536
React.useEffect(() => {
3637
if (window.location.protocol !== "https:") {
37-
console.log("Contract NFTMeta error::", window.location.protocol);
38+
console.log("Current PROTOCOL::", window.location.protocol);
3839
window.location.replace(
3940
`https:${window.location.href.substring(
4041
window.location.protocol.length
@@ -59,24 +60,25 @@ const App = () => {
5960
`
6061
: ``
6162
}
63+
64+
6265
}
6366
64-
body:before {
65-
${
66-
theme.mode === "dark"
67-
? `
67+
body:before {
68+
${
69+
theme.mode === "dark"
70+
? `
6871
background: var(--color-global-bg);
6972
`
70-
: ""
71-
}
73+
: ""
74+
}
7275
}
7376
}`}
7477
/>
7578

7679
<Router>
7780
<ScrollToTop />
7881
<RouterView state={state as SagaStatus} />
79-
{/*<RouterView state={state} />*/}
8082
</Router>
8183
</>
8284
);

packages/web-bridge/src/index.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ const ProviderThen = React.memo(({ children }: { children: JSX.Element }) => {
4444
const providers: Array<[TProvider<any>, any]> = [
4545
provider(MuThemeProvider as any, { theme: getTheme(themeMode, isMobile) }),
4646
provider(ThemeProvider as any, { theme: getTheme(themeMode, isMobile) }),
47-
provider(ReactReduxFirebaseProvider as any, { ...firebaseProps }),
4847
provider(PersistGate as any, { persistor, loading: null }),
4948
provider(TimeoutCheckProvider as any),
5049
] as any;
@@ -53,9 +52,11 @@ const ProviderThen = React.memo(({ children }: { children: JSX.Element }) => {
5352

5453
ReactDOM.render(
5554
<ProviderApp>
56-
<ProviderThen>
57-
<App />
58-
</ProviderThen>
55+
<ReactReduxFirebaseProvider {...firebaseProps}>
56+
<ProviderThen>
57+
<App />
58+
</ProviderThen>
59+
</ReactReduxFirebaseProvider>
5960
</ProviderApp>,
6061
document.getElementById("root")
6162
);

packages/webapp/Dockerfile

Lines changed: 0 additions & 3 deletions
This file was deleted.

packages/webapp/config-overrides.js

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -119,57 +119,12 @@ module.exports = override(
119119
};
120120

121121
setConfig(4);
122-
123-
// addCompression()
124-
125-
// addAnalyzer()
126-
127-
// setConfig(3);
128-
129-
/*
130-
const oneOf_loc = config.module.rules.findIndex((n) => n.oneOf) // 这里的config是全局的
131-
config.module.rules[oneOf_loc].oneOf = [
132-
{
133-
test: /\.module\.less$/,
134-
use: getStyleLoaders(
135-
{
136-
importLoaders: 2,
137-
modules: {
138-
getLocalIdent: getCSSModuleLocalIdent,
139-
},
140-
},
141-
'less-loader',
142-
),
143-
},
144-
...config.module.rules[oneOf_loc].oneOf,
145-
]
146-
147-
config.resolve.modules = [
148-
path.resolve(__dirname, "..", "src"),
149-
"node_modules",
150-
151-
]*/
152122
config.resolve.alias = {
153123
...config.resolve.alias,
154124
"@material-ui/core/Menu": "@mui/material/Menu",
155125
"@material-ui/core": "@mui/material",
156126
"@material-ui/core/Popover": "@mui/material/Popover",
157127
};
158-
// config.resolve = [
159-
// alias({
160-
//
161-
// })(config)
162-
// ]
163-
164128
return config;
165129
}
166-
/*
167-
function override(config, env) {
168-
config = rewireLess.withLoaderOptions({
169-
javascriptEnabled: true,
170-
})(config, env)
171-
172-
return config
173-
},
174-
*/
175130
);

packages/webapp/deploy.sh

Lines changed: 0 additions & 20 deletions
This file was deleted.

packages/webapp/docker-compose.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)