Skip to content

Commit

Permalink
v1.10 (#327)
Browse files Browse the repository at this point in the history
  • Loading branch information
dan-ziv authored Nov 27, 2022
1 parent a61d784 commit 58b8e84
Show file tree
Hide file tree
Showing 87 changed files with 1,635 additions and 448 deletions.
3 changes: 3 additions & 0 deletions .env.development
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,7 @@ REACT_APP_SUPPORTED_CHAIN_ID=5
REACT_APP_STARKNET_CONTRACT_ADDRESS=0xde29d060D45901Fb19ED6C6e959EB22d8626708e
REACT_APP_ETHERSCAN_URL=https://goerli.etherscan.io
REACT_APP_VOYAGER_URL=https://goerli.voyager.online
REACT_APP_STARKSCAN_URL=https://testnet.starkscan.co
REACT_APP_SUPPORTED_TOKENS=ETH,WBTC,USDC,USDT,DAI,SLF
REACT_APP_API_ENDPOINT_URL=http://localhost:3010
REACT_APP_ENABLE_SCREENING=false
2 changes: 2 additions & 0 deletions .env.goerli
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ REACT_APP_SUPPORTED_CHAIN_ID=5
REACT_APP_STARKNET_CONTRACT_ADDRESS=0xde29d060D45901Fb19ED6C6e959EB22d8626708e
REACT_APP_ETHERSCAN_URL=https://goerli.etherscan.io
REACT_APP_VOYAGER_URL=https://goerli.voyager.online
REACT_APP_STARKSCAN_URL=https://testnet.starkscan.co
REACT_APP_SUPPORTED_TOKENS=ETH,WBTC,USDC,USDT,DAI
REACT_APP_API_ENDPOINT_URL=//goerli.starkgate.starknet.io/w
2 changes: 2 additions & 0 deletions .env.mainnet
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ REACT_APP_SUPPORTED_CHAIN_ID=1
REACT_APP_STARKNET_CONTRACT_ADDRESS=0xc662c410C0ECf747543f5bA90660f6ABeBD9C8c4
REACT_APP_ETHERSCAN_URL=https://etherscan.io
REACT_APP_VOYAGER_URL=https://voyager.online
REACT_APP_STARKSCAN_URL=https://starkscan.co
REACT_APP_SUPPORTED_TOKENS=ETH,DAI,WBTC,USDC,USDT
REACT_APP_API_ENDPOINT_URL=//starkgate.starknet.io/w
14 changes: 1 addition & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,18 +69,6 @@ The appropriate files are loading according to the `REACT_APP_ENV` value.\

> Note: each file can be overridden on a local environment using matching `.env.[ENV].local` file.
## Wallet Support

`WIP`

## Tokens Support

`WIP`

## Project Structure

`WIP`

## Contributing

Please read [CONTRIBUTING.md](./CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull
Expand All @@ -93,4 +81,4 @@ the [tags on this repository](https://github.com/starkware-libs/starkgate-fronte

## License

`WIP`
Apache License, Version 2.0
13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "starkgate-frontend",
"version": "1.9.0",
"version": "1.10.0",
"homepage": "./",
"scripts": {
"clean": "rm -rf ./dist",
"prebuild": "yarn run clean",
"build": "react-scripts build",
"build:mainnet": "env-cmd -f .env.mainnet yarn run build",
"build:goerli": "env-cmd -f .env.goerli yarn run build",
"build:mainnet": "GENERATE_SOURCEMAP=false env-cmd -f .env.mainnet yarn run build",
"build:goerli": "GENERATE_SOURCEMAP=false env-cmd -f .env.goerli yarn run build",
"start": "ESLINT_NO_DEV_ERRORS=true react-scripts start",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject",
Expand Down Expand Up @@ -58,9 +58,10 @@
"@mui/material": "^5.5.3",
"@mui/styles": "^5.5.0",
"@splitbee/web": "^0.3.0",
"@starkware-industries/commons-js-enums": "1.1.0-dev.3",
"@starkware-industries/commons-js-libs": "1.2.0-dev.4",
"@starkware-industries/commons-js-utils": "1.0.0-dev.5",
"@starkware-industries/commons-js-enums": "1.1.0",
"@starkware-industries/commons-js-hooks": "1.0.0",
"@starkware-industries/commons-js-libs": "1.2.1",
"@starkware-industries/commons-js-utils": "1.1.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-hot-toast": "^2.2.0",
Expand Down
26 changes: 13 additions & 13 deletions public/index.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<!DOCTYPE html>
<html lang='en'>
<head>
<title>StarkGate Alpha</title>
<meta charset='utf-8' />
<link rel='icon' href='%PUBLIC_URL%/favicon.svg' />
<meta name='viewport' content='width=device-width, initial-scale=1, user-scalable=no'>
<meta name='theme-color' content='#000000' />
<script type='text/javascript' src='/env-config.js'></script>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id='root'></div>
</body>
<html lang="en">
<head>
<title>StarkGate Alpha</title>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
<meta name="theme-color" content="#000000" />
<script type="text/javascript" src="/env-config.js"></script>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
</body>
</html>
19 changes: 19 additions & 0 deletions scripts/set-env.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/sh

content="window.__env__ = {"

# Each line represents key=value pairs
while read -r line || [[ -n "$line" ]];
do
# Split env variables by character `=`
if printf '%s\n' "$line" | grep -q -e '='; then
varname=$(printf '%s\n' "$line" | sed -e 's/=.*//')
varvalue=$(printf '%s\n' "$line" | sed -e 's/^[^=]*=//')

content="${content} $varname: \"$varvalue\","
echo $varname $varvalue
fi
done < <(printenv | grep REACT_APP)

content="${content} };"
echo $content > ./usr/share/nginx/html/env-config.js
7 changes: 7 additions & 0 deletions scripts/start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh

echo "setting env vars"
sh ./scripts/set-env.sh

echo "starting nginx"
nginx -g "daemon off;"
5 changes: 2 additions & 3 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,16 @@ import React from 'react';
import {Navigate, Route, Routes} from 'react-router-dom';

import styles from './App.module.scss';
import {TrackEvent} from './analytics';
import {ReactComponent as DiscordIcon} from './assets/svg/icons/discord.svg';
import {Footer, Header} from './components/Containers';
import {StyledBackground} from './components/UI';
import {SideButton} from './components/UI/SideButton/SideButton';
import {useConstants, useTracking} from './hooks';
import {useConstants, useDiscordTabTracking} from './hooks';
import {useApp} from './providers/AppProvider';
import {Bridge, Faq, ProtectedRoute, Terms} from './routes';

export const App = () => {
const [trackDiscordClick] = useTracking(TrackEvent.DISCORD_TAB_CLICK);
const [trackDiscordClick] = useDiscordTabTracking();
const {DISCORD_LINK_URL} = useConstants();
const {isAcceptTerms, isScrollActive} = useApp();

Expand Down
Loading

0 comments on commit 58b8e84

Please sign in to comment.