Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
32 changes: 0 additions & 32 deletions .env.example

This file was deleted.

118 changes: 66 additions & 52 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,115 +1,129 @@
# Gnosis Safe
# Harmony Safe Multisig

The most trusted platform to store digital assets on Ethereum. More info at [gnosis-safe.io](https://gnosis-safe.io/)

This repository contains the code for the frontend code hosted at [https://gnosis-safe.io/app/]

Besides the Ethereum Mainnet, the following networks are supported:

- [Rinkeby Testnet](https://rinkeby.gnosis-safe.io/app/)
- [xDai](https://xdai.gnosis-safe.io/app/)
- [Energy Web Chain](https://ewc.gnosis-safe.io/app/)
- [Volta Testnet](https://volta.gnosis-safe.io/app/)

For technical information please refer to the [Gnosis Developer Portal](https://docs.gnosis.io/safe/).

For support requests, please open up a [bug issue](https://github.com/gnosis/safe-react/issues/new?template=bug-report.md) or reach out via [Discord](https://discordapp.com/invite/FPMRAwK).
The most trusted platform to store digital assets on Harmony

## Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See [Deployment](#deployment) for notes on how to deploy the project on a live system.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

### Prerequisites

We use [yarn](https://yarnpkg.com) in our infrastructure, so we decided to go with yarn in the README.
Please install yarn globally if you haven't already.
What things you need to install the software and how to install them

### Environment variables
The app grabs environment variables from the `.env` file. Copy our template to your own local file:
```
cp .env.example .env
yarn add truffle // recommended usage of -g flag
yarn add ganache-cli // recommended usage of -g flag
yarn add flow-type // recommended usage of -g flag
```

To execute transactions, you'll need to create an [Infura](https://infura.io) project and set the project ID in the `.env` you've just created:
```
REACT_APP_INFURA_TOKEN=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
```
Once done, you'll need to restart the app if it's already running.
We use [yarn](https://yarnpkg.com) in our infrastacture, so we decided to go with yarn in the README

### Installing and running

A step by step series of examples that tell you have to get a development env running

Install dependencies for the project:

```
yarn install
```

To use the Rinkeby services:
For using the Testnet services:

```
yarn start
```

If you prefer using the Mainnet ones:
If you prefer using Mainnet ones:

```
yarn start-mainnet
```

### Building
For Rinkeby:

For Testnet:

```
yarn build
```

For Mainnet:

```
yarn build-mainnet
```

## Running the tests

To run the tests:
1. Run `transaction-history-service`

```
yarn test
git clone https://github.com/harmony-one/multisig-react.git
cd safe-transaction-service
git checkout develop
docker-compose build
# it comes enabled by default in docker-compose
sudo service postgresql stop
docker-compose up -d
```

### Lint
Check that the service is running at https://localhost:8000

ESLint will be run automatically before you commit. To run it manually:
2. Migrate Safe Contracts:

```
yarn lint:fix
git clone https://github.com/harmony-one/multisig-contracts.git
cd safe-contracts
yarn
npx truffle migrate
```

## Deployment
3. Migrate Token Contracts for the tests:
Inside `safe-react` directory

```
npx truffle migrate
```

### Dev & staging
The code is deployed to a testing website automatically on each push via a GitHub Action.
The GitHub Action will create a new subdomain and post the link as a comment in the PR.
4. Run the tests:

When pushing to the `master` branch, the code will be automatically deployed to [staging](https://safe-team-rinkeby.staging.gnosisdev.com/).
```
yarn test
```

### Production
Deployment to production is done manually. Please see the [release procedure](docs/release-procedure.md) notes for details.
### Break down into end to end tests

## Configuring the app for running on different networks
Explain what these tests test and why

[Please check the network configuration documentation](./docs/networks.md)
```
Give an example
```

## Built With
### And coding style tests

* [React](https://reactjs.org/) - A JS library for building user interfaces
* [Material UI 4.X](https://material-ui.com/) - React components that implement Google's Material Design
* [redux, immutable, reselect, final-form](https://redux.js.org/) - React ecosystem libraries
Explain what these tests test and why

![app diagram](https://user-images.githubusercontent.com/381895/121764528-e5e2e900-cb44-11eb-8643-483d41040349.png)
```
Give an example
```

## Contributing
## Deployment

Please read [CONTRIBUTING.md](https://gist.github.com/PurpleBooth/b24679402957c63ec426) for details on our code of conduct, and the process for submitting pull requests to us.
Add additional notes about how to deploy this on a live system

## Configuring the app for running on different networks

[Please check the network configuration documentation](./docs/networks.md)

## Versioning
## Contributing

We use [SemVer](https://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/gnosis/gnosis-team-safe/tags).
Please read [CONTRIBUTING.md](https://gist.github.com/PurpleBooth/b24679402957c63ec426) for details on our code of conduct, and the process for submitting pull requests to us.

## License

This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details

## Acknowledgments

- Thanks for Gnosis Team for providing the Safe contracts.
Binary file modified public/favicon.ico
Binary file not shown.
4 changes: 2 additions & 2 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" href="favicon.ico">
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<title>Gnosis Safe</title>
<title>Harmony Multisig Wallet</title>
</head>
<style>
.safe-preloader-animation {
Expand All @@ -32,6 +32,6 @@

</style>
<body>
<div id="root" style="overflow: hidden;"><img class="safe-preloader-animation" src="./resources/safe.png" /></div>
<div id="root" style="overflow: hidden;"><img class="safe-preloader-animation" src="./resources/harmony.png" /></div>
</body>
</html>
Binary file removed public/resources/background.png
Binary file not shown.
Binary file added public/resources/harmony.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed public/resources/icon.icns
Binary file not shown.
Binary file removed public/resources/icon.ico
Binary file not shown.
Binary file removed public/resources/safe.png
Binary file not shown.
14 changes: 7 additions & 7 deletions src/components/App/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,11 @@ import InfoIcon from 'src/assets/icons/info.svg'

import AppLayout from 'src/components/AppLayout'
import { SafeListSidebar, SafeListSidebarContext } from 'src/components/SafeListSidebar'
import CookiesBanner from 'src/components/CookiesBanner'
import Notifier from 'src/components/Notifier'
import Backdrop from 'src/components/layout/Backdrop'
import Img from 'src/components/layout/Img'
import { getNetworkId } from 'src/config'
import { ETHEREUM_NETWORK } from 'src/config/networks/network.d'
import { HARMONY_NETWORK } from 'src/config/networks/network.d'
import { networkSelector } from 'src/logic/wallets/store/selectors'
import { SAFELIST_ADDRESS, WELCOME_ADDRESS } from 'src/routes/routes'
import { currentSafeWithNames, safeAddressFromUrl } from 'src/logic/safe/store/selectors'
Expand Down Expand Up @@ -62,13 +61,15 @@ const useStyles = makeStyles(notificationStyles)
const App: React.FC = ({ children }) => {
const classes = useStyles()
const currentNetwork = useSelector(networkSelector)
const isWrongNetwork = currentNetwork !== ETHEREUM_NETWORK.UNKNOWN && currentNetwork !== desiredNetwork
const isWrongNetwork = currentNetwork !== HARMONY_NETWORK.UNKNOWN && currentNetwork !== desiredNetwork
const { toggleSidebar } = useContext(SafeListSidebarContext)
const matchSafe = useRouteMatch({ path: `${SAFELIST_ADDRESS}`, strict: false })
const history = useHistory()
const { address: safeAddress, name: safeName, totalFiatBalance: currentSafeBalance } = useSelector(
currentSafeWithNames,
)
const {
address: safeAddress,
name: safeName,
totalFiatBalance: currentSafeBalance,
} = useSelector(currentSafeWithNames)
const addressFromUrl = useSelector(safeAddressFromUrl)
const { safeActionsState, onShow, onHide, showSendFunds, hideSendFunds } = useSafeActions()
const currentCurrency = useSelector(currentCurrencySelector)
Expand Down Expand Up @@ -149,7 +150,6 @@ const App: React.FC = ({ children }) => {
)}
</>
</SnackbarProvider>
<CookiesBanner />
</Frame>
)
}
Expand Down
41 changes: 3 additions & 38 deletions src/components/AppLayout/Footer/index.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
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 +38,21 @@ 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({ cookieBannerOpen: true }))
}

return (
<footer className={classes.footer}>
<span className={classes.item}>©{date.getFullYear()} Gnosis</span>
<span className={classes.item}>©{date.getFullYear()} Harmony One</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://staking.harmony.one/terms">
Terms
</Link>
<span className={classes.sep}>|</span>
<Link className={cn(classes.item, classes.link)} target="_blank" to="https://gnosis-safe.io/privacy">
<Link className={cn(classes.item, classes.link)} target="_blank" to="https://www.harmony.one/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

This file was deleted.

Binary file added src/components/AppLayout/Header/assets/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading