Skip to content
This repository was archived by the owner on Jul 5, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
1a50b59
Bug: Use link tag instead of javascript navigation in apps list (#1770)
mmv08 Jan 13, 2021
188dc80
Fix asset value column alignment (#1778)
alongoni Jan 15, 2021
dfc650d
Merge branch 'development' into release/v2.18.0
Jan 19, 2021
46274b0
fix ids (#1755)
francovenica Jan 19, 2021
d36e447
Merge branch 'development' into release/v2.18.0
Jan 19, 2021
8747095
Merge pull request #1796 from gnosis/release/v2.18.0
Jan 19, 2021
3748245
Merge branch 'development' into hotfix/refund-displayed-as-rejection
Jan 22, 2021
5e57368
Merge pull request #1807 from gnosis/hotfix/refund-displayed-as-rejec…
Jan 25, 2021
19be231
(Fix) - #1804 Tx gas estimation fail for threshold >= 3 (#1808)
Agupane Jan 26, 2021
a020e8e
(Fix) - Gas estimation for transaction creation (#1772)
Agupane Jan 26, 2021
fef88b0
Update 1 Inch app to v1.2.3 (#1816)
Jan 27, 2021
04be856
change to bsc network
unclezoro Jan 27, 2021
86b8968
add Dockerfile
yalin-du-20230331 Jan 28, 2021
6d0efba
change Dockerfile
yalin-du-20230331 Jan 28, 2021
6603f35
add support for bnb icon
yutianwu Feb 7, 2021
facc068
delete compound
yutianwu Feb 7, 2021
fd1b370
update log and remove intercom
yutianwu Feb 20, 2021
0e95f61
rename erc20 to bep20
yutianwu Feb 24, 2021
de88b8e
fix bscscan
yutianwu Feb 24, 2021
8073adf
replace logo
yutianwu Feb 26, 2021
29c7b00
add gzip nginx config
unclezoro Feb 26, 2021
ab23abe
fix(package): uses source-map-explorer & clean-webpack-plugin
cchungmin Mar 11, 2021
a7861c8
fix(src): avoid using render in Route
cchungmin Mar 11, 2021
499c9b4
Merge pull request #1 from cchungmin/performance-testing
Mar 12, 2021
3466e93
feat(ga): updates Google analytics
cchungmin Mar 16, 2021
7d1bf57
Merge pull request #2 from cchungmin/update-ga
unclezoro Mar 16, 2021
b2ac9ad
add bsc multisender contract
unclezoro Mar 31, 2021
8f67d0c
Merge pull request #4 from binance-chain/multisender
unclezoro Mar 31, 2021
b2c14f5
fix wrong url
unclezoro Apr 6, 2021
341a6e0
add daily spend module
unclezoro Apr 20, 2021
b25c64d
Merge pull request #5 from binance-chain/dailyspend
unclezoro Apr 20, 2021
cd1a0a1
fix estimate gas fail
unclezoro May 25, 2021
829dad2
Merge pull request #6 from binance-chain/fix_estimate
unclezoro May 25, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM node:14-slim as builder
WORKDIR /app
COPY . .
RUN apt update && apt install git -y
RUN yarn
RUN yarn build-mainnet


FROM nginx:stable-alpine-perl
COPY --from=builder /app/build /usr/share/nginx/html
COPY nginx.conf /etc/nginx/
EXPOSE 80
31 changes: 31 additions & 0 deletions nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
user nginx;
worker_processes auto;

error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;


events {
worker_connections 1024;
}


http {
include /etc/nginx/mime.types;
default_type application/octet-stream;

log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';

access_log /var/log/nginx/access.log main;

sendfile on;
#tcp_nopush on;

keepalive_timeout 65;

gzip on;

include /etc/nginx/conf.d/*.conf;
}
11 changes: 7 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
"main": "public/electron.js",
"scripts": {
"analyze": "source-map-explorer 'build/static/js/*.js'",
"build-desktop": "cross-env REACT_APP_BUILD_FOR_DESKTOP=true REACT_APP_ENV=production yarn build-mainnet",
"build-mainnet": "cross-env REACT_APP_NETWORK=mainnet yarn build",
"build": "cross-env REACT_APP_APP_VERSION=$npm_package_version rescripts --max-old-space-size=8192 build",
"build-desktop": "cross-env GENERATE_SOURCEMAP=false REACT_APP_BUILD_FOR_DESKTOP=true REACT_APP_ENV=production yarn build-mainnet",
"build-mainnet": "cross-env GENERATE_SOURCEMAP=false REACT_APP_GOOGLE_ANALYTICS=UA-192269037-1 REACT_APP_NETWORK=mainnet yarn build",
"build": "cross-env GENERATE_SOURCEMAP=false REACT_APP_APP_VERSION=$npm_package_version rescripts --max-old-space-size=8192 build",
"eject": "rescripts eject",
"electron-build": "electron-builder --mac --windows --linux",
"electron-dev": "concurrently \"BROWSER=none yarn start\" \"wait-on http://localhost:3000 && electron .\"",
Expand Down Expand Up @@ -94,7 +94,7 @@
}
]
},
"files": [
"files": [
"build",
"patches",
"public",
Expand Down Expand Up @@ -193,6 +193,7 @@
"express": "^4.17.1",
"final-form": "^4.20.1",
"final-form-calculate": "^1.3.2",
"flow-type": "^1.0.1",
"history": "4.10.1",
"immortal-db": "^1.1.0",
"immutable": "^4.0.0-rc.12",
Expand Down Expand Up @@ -220,6 +221,7 @@
"redux-thunk": "^2.3.0",
"reselect": "^4.0.0",
"semver": "^7.3.2",
"source-map-explorer": "^2.5.2",
"styled-components": "^5.2.1",
"web3": "1.2.11",
"web3-core": "^1.2.11",
Expand Down Expand Up @@ -248,6 +250,7 @@
"@types/styled-components": "^5.1.4",
"@typescript-eslint/eslint-plugin": "^4.6.0",
"@typescript-eslint/parser": "^4.6.0",
"clean-webpack-plugin": "^3.0.0",
"cross-env": "^7.0.3",
"dotenv": "^8.2.0",
"dotenv-expand": "^5.1.0",
Expand Down
8 changes: 6 additions & 2 deletions scripts/rescripts/webpack.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
const { removeWebpackPlugin } = require('@rescripts/utilities')
const { removeWebpackPlugin, appendWebpackPlugin } = require('@rescripts/utilities')
const { CleanWebpackPlugin } = require('clean-webpack-plugin');

module.exports = config => {
const webpackWithoutEsLint = removeWebpackPlugin('ESLintWebpackPlugin', config)
return webpackWithoutEsLint
return appendWebpackPlugin(
new CleanWebpackPlugin(),
webpackWithoutEsLint,
)
}
2 changes: 1 addition & 1 deletion src/components/App/ReceiveModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ const ReceiveModal = ({ onClose, safeAddress, safeName }: Props): ReactElement =
</Paragraph>
<Paragraph className={classes.annotation} noMargin size="lg">
This is the address of your Safe. Deposit funds by scanning the QR code or copying the address below. Only send{' '}
{networkInfo.nativeCoin.name} and ERC-20 tokens to this address!
{networkInfo.nativeCoin.name} and BEP-20 tokens to this address!
</Paragraph>
<Col layout="column" middle="xs">
<Paragraph className={classes.safeName} noMargin size="lg" weight="bold">
Expand Down
42 changes: 2 additions & 40 deletions src/components/AppLayout/Footer/index.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
import { makeStyles } from '@material-ui/core/styles'
import cn from 'classnames'
import * as React from 'react'
import { useDispatch } from 'react-redux'

import GnoButtonLink from 'src/components/layout/ButtonLink'
import Link from 'src/components/layout/Link'
import { openCookieBanner } from 'src/logic/cookies/store/actions/openCookieBanner'
import { screenSm, secondary, sm } from 'src/theme/variables'

const useStyles = makeStyles({
Expand Down Expand Up @@ -42,52 +39,17 @@ const useStyles = makeStyles({
},
} as any)

const appVersion = process.env.REACT_APP_APP_VERSION ? `v${process.env.REACT_APP_APP_VERSION} ` : 'Versions'

const Footer = (): React.ReactElement => {
const date = new Date()
const classes = useStyles()
const dispatch = useDispatch()

const openCookiesHandler = () => {
dispatch(openCookieBanner(true))
}

return (
<footer className={classes.footer}>
<span className={classes.item}>©{date.getFullYear()} Gnosis</span>
<span className={classes.item}>©{date.getFullYear()} Hosted by Binance</span>
<span className={classes.sep}>|</span>
<Link className={cn(classes.item, classes.link)} target="_blank" to="https://gnosis-safe.io/terms">
<Link className={cn(classes.item, classes.link)} target="_blank" to="https://www.binance.org/en/terms">
Terms
</Link>
<span className={classes.sep}>|</span>
<Link className={cn(classes.item, classes.link)} target="_blank" to="https://gnosis-safe.io/privacy">
Privacy
</Link>
<span className={classes.sep}>|</span>
<Link className={cn(classes.item, classes.link)} target="_blank" to="https://gnosis-safe.io/licenses">
Licenses
</Link>
<span className={classes.sep}>|</span>
<Link className={cn(classes.item, classes.link)} target="_blank" to="https://gnosis-safe.io/imprint">
Imprint
</Link>
<span className={classes.sep}>|</span>
<Link className={cn(classes.item, classes.link)} target="_blank" to="https://gnosis-safe.io/cookie">
Cookie Policy
</Link>
<span className={classes.sep}>-</span>
<GnoButtonLink className={cn(classes.item, classes.link, classes.buttonLink)} onClick={openCookiesHandler}>
Preferences
</GnoButtonLink>
<span className={classes.sep}>|</span>
<Link
className={cn(classes.item, classes.link)}
target="_blank"
to="https://github.com/gnosis/safe-react/releases"
>
{appVersion}
</Link>
</footer>
)
}
Expand Down
4 changes: 4 additions & 0 deletions src/components/AppLayout/Header/assets/binance_dex.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/components/AppLayout/Header/components/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import Row from 'src/components/layout/Row'
import { border, headerHeight, md, screenSm, sm } from 'src/theme/variables'
import { useStateHandler } from 'src/logic/hooks/useStateHandler'

import SafeLogo from '../assets/gnosis-safe-multisig-logo.svg'
import SafeLogo from '../assets/binance_dex.svg'

const styles = () => ({
root: {
Expand Down
2 changes: 1 addition & 1 deletion src/components/AppLayout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ const Layout: React.FC<Props> = ({
<Header />
</HeaderWrapper>
<BodyWrapper>
<SidebarWrapper>
<SidebarWrapper data-testid="sidebar">
<Sidebar
items={sidebarItems}
safeAddress={safeAddress}
Expand Down
3 changes: 0 additions & 3 deletions src/components/CookiesBanner/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { cookieBannerOpen } from 'src/logic/cookies/store/selectors'
import { loadFromCookie, saveCookie } from 'src/logic/cookies/utils'
import { mainFontFamily, md, primary, screenSm } from 'src/theme/variables'
import { loadGoogleAnalytics } from 'src/utils/googleAnalytics'
import { loadIntercom } from 'src/utils/intercom'

const isDesktop = process.env.REACT_APP_BUILD_FOR_DESKTOP

Expand Down Expand Up @@ -195,10 +194,8 @@ const CookiesBanner = () => {
)

if (showAnalytics) {
loadIntercom()
loadGoogleAnalytics()
}
if (isDesktop) loadIntercom()

return showBanner && !isDesktop ? cookieBannerContent : null
}
Expand Down
1 change: 1 addition & 0 deletions src/config/assets/token_bnb.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 10 additions & 10 deletions src/config/networks/mainnet.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import EtherLogo from 'src/config/assets/token_eth.svg'
import BnbLogo from 'src/config/assets/token_bnb.svg'
import { EnvironmentSettings, ETHEREUM_NETWORK, NetworkConfig } from 'src/config/networks/network.d'

const baseConfig: EnvironmentSettings = {
txServiceUrl: 'https://safe-transaction.mainnet.staging.gnosisdev.com/api/v1',
txServiceUrl: 'https://gnosis-safe-transaction.binance.org/api/v1',
safeAppsUrl: 'https://safe-apps.dev.gnosisdev.com',
gasPriceOracle: {
url: 'https://ethgasstation.info/json/ethgasAPI.json',
gasParameter: 'average',
},
rpcServiceUrl: 'https://mainnet.infura.io:443/v3',
networkExplorerName: 'Etherscan',
networkExplorerUrl: 'https://etherscan.io',
networkExplorerApiUrl: 'https://api.etherscan.io/api',
rpcServiceUrl: 'https://bsc-dataseed.binance.org',
networkExplorerName: 'BscScan',
networkExplorerUrl: 'https://bscscan.com',
networkExplorerApiUrl: 'https://api.bscscan.com/api',
}

const mainnet: NetworkConfig = {
Expand All @@ -25,7 +25,7 @@ const mainnet: NetworkConfig = {
},
production: {
...baseConfig,
txServiceUrl: 'https://safe-transaction.mainnet.gnosis.io/api/v1',
txServiceUrl: 'https://gnosis-safe-transaction.binance.org/api/v1',
safeAppsUrl: 'https://apps.gnosis-safe.io',
},
},
Expand All @@ -37,10 +37,10 @@ const mainnet: NetworkConfig = {
isTestNet: false,
nativeCoin: {
address: '0x000',
name: 'Ether',
symbol: 'ETH',
name: 'BNB',
symbol: 'BNB',
decimals: 18,
logoUri: EtherLogo,
logoUri: BnbLogo,
},
},
}
Expand Down
2 changes: 1 addition & 1 deletion src/config/networks/network.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ type Token = {
}

export enum ETHEREUM_NETWORK {
MAINNET = 1,
MAINNET = 56,
MORDEN = 2,
ROPSTEN = 3,
RINKEBY = 4,
Expand Down
6 changes: 3 additions & 3 deletions src/logic/contracts/safeContracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { SPENDING_LIMIT_MODULE_ADDRESS } from 'src/utils/constants'
import SpendingLimitModule from './artifacts/AllowanceModule.json'

export const SENTINEL_ADDRESS = '0x0000000000000000000000000000000000000001'
export const MULTI_SEND_ADDRESS = '0x8d29be29923b68abfdd21e541b9374737b49cdad'
export const MULTI_SEND_ADDRESS = '0x663a65a0523103846a1761ab90a1a4731156c453'
export const SAFE_MASTER_COPY_ADDRESS = '0x34CfAC646f301356fAa8B21e94227e3583Fe3F5F'
export const DEFAULT_FALLBACK_HANDLER_ADDRESS = '0xd5D82B6aDDc9027B22dCA772Aa68D5d74cdBdF44'
export const SAFE_MASTER_COPY_ADDRESS_V10 = '0xb6029EA3B2c51D09a50B53CA8012FeEB05bDa35A'
Expand All @@ -34,7 +34,7 @@ export const getGnosisSafeContract = (web3: Web3, networkId: ETHEREUM_NETWORK) =
// TODO: this may not be the most scalable approach,
// but up until v1.2.0 the address is the same for all the networks.
// So, if we can't find the network in the Contract artifact, we fallback to MAINNET.
const contractAddress = networks[networkId]?.address ?? networks[ETHEREUM_NETWORK.MAINNET].address
const contractAddress = '0x2bb001433cf04c1f7d71e3c40fed66b2b563065e'
return (new web3.eth.Contract(GnosisSafeSol.abi as AbiItem[], contractAddress) as unknown) as GnosisSafe
}

Expand All @@ -48,7 +48,7 @@ const getProxyFactoryContract = (web3: Web3, networkId: ETHEREUM_NETWORK): Gnosi
// TODO: this may not be the most scalable approach,
// but up until v1.2.0 the address is the same for all the networks.
// So, if we can't find the network in the Contract artifact, we fallback to MAINNET.
const contractAddress = networks[networkId]?.address ?? networks[ETHEREUM_NETWORK.MAINNET].address
const contractAddress = '0x7a32d4df6d7aff9b3b975452518b4be38d8f6d6f'
return (new web3.eth.Contract(ProxyFactorySol.abi as AbiItem[], contractAddress) as unknown) as GnosisSafeProxyFactory
}

Expand Down
Loading