Commit 14232026 authored by Hayden Adams's avatar Hayden Adams

merge master into ha-dev

parents aa322076 4dbade52
...@@ -3,5 +3,26 @@ This is the repository for [uniswap.io](https://uniswap.io/). Uniswap is an inte ...@@ -3,5 +3,26 @@ This is the repository for [uniswap.io](https://uniswap.io/). Uniswap is an inte
* Read the docs: [https://docs.uniswap.io/](https://docs.uniswap.io/) * Read the docs: [https://docs.uniswap.io/](https://docs.uniswap.io/)
* Join the reddit: [https://www.reddit.com/r/Uniswap/](https://www.reddit.com/r/UniSwap/) * Join the reddit: [https://www.reddit.com/r/Uniswap/](https://www.reddit.com/r/UniSwap/)
* Email me: [hayden@uniswap.io](mailto:hayden@uniswap.io) * Email us: [contact@uniswap.io](mailto:contact@uniswap.io)
* Read the whitepaper: [Link](https://hackmd.io/C-DvwDSfSxuh-Gd4WKE_ig) * Read the whitepaper: [Link](https://hackmd.io/C-DvwDSfSxuh-Gd4WKE_ig)
### To Start Development
###### Installing dependency
```bash
yarn
```
###### Running locally on Rinkeby
```bash
yarn start:rinkeby
```
###### Running locally on other testnet
```bash
REACT_APP_NETWORK_ID=2 REACT_APP_NETWORK='Ropsten Test Network' react-scripts start
```
### Contributions
Please open all pull requests against `dev` branch.
uniswap.io uniswap.exchange
\ No newline at end of file
<svg width="9" height="10" viewBox="0 0 9 10" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M5.2981 -1.65714e-07L4.24041 -2.13061e-07L4.24041 7.91103L4.16486 7.91103L1.25623 4.9323L0.538514 5.66731L4.76926 10L9 5.66731L8.28228 4.9323L5.37365 7.91103L5.2981 7.91103L5.2981 -1.65714e-07Z" fill="#737373"/>
</svg>
<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M1 6H6M11 6L6 6M6 1V6M6 6L6 11" stroke="#737373" stroke-linecap="round"/>
</svg>
...@@ -342,18 +342,30 @@ export const sync = () => async (dispatch, getState) => { ...@@ -342,18 +342,30 @@ export const sync = () => async (dispatch, getState) => {
}); });
pending.forEach(async txId => { pending.forEach(async txId => {
const data = await web3.eth.getTransactionReceipt(txId) || {}; try {
if (data.status) { const data = await web3.eth.getTransactionReceipt(txId) || {};
dispatch({ dispatch({
type: REMOVE_PENDING_TX, type: REMOVE_PENDING_TX,
payload: txId, payload: txId,
}); });
if (data.status) {
dispatch({
type: ADD_CONFIRMED_TX,
payload: txId,
});
} else {
// TODO: dispatch ADD_REJECTED_TX
}
} catch (err) {
dispatch({ dispatch({
type: ADD_CONFIRMED_TX, type: REMOVE_PENDING_TX,
payload: txId, payload: txId,
}); });
// TODO: dispatch ADD_REJECTED_TX
} }
}); });
}; };
......
...@@ -8,7 +8,8 @@ import OversizedPanel from '../../components/OversizedPanel'; ...@@ -8,7 +8,8 @@ import OversizedPanel from '../../components/OversizedPanel';
import NavigationTabs from '../../components/NavigationTabs'; import NavigationTabs from '../../components/NavigationTabs';
import Modal from '../../components/Modal'; import Modal from '../../components/Modal';
import { selectors, addPendingTx } from '../../ducks/web3connect'; import { selectors, addPendingTx } from '../../ducks/web3connect';
import ArrowDown from '../../assets/images/plus-blue.svg'; import PlusBlue from '../../assets/images/plus-blue.svg';
import PlusGrey from '../../assets/images/plus-grey.svg';
import DropdownBlue from "../../assets/images/dropdown-blue.svg"; import DropdownBlue from "../../assets/images/dropdown-blue.svg";
import DropupBlue from "../../assets/images/dropup-blue.svg"; import DropupBlue from "../../assets/images/dropup-blue.svg";
import ModeSelector from './ModeSelector'; import ModeSelector from './ModeSelector';
...@@ -573,7 +574,7 @@ class AddLiquidity extends Component { ...@@ -573,7 +574,7 @@ class AddLiquidity extends Component {
/> />
<OversizedPanel> <OversizedPanel>
<div className="swap__down-arrow-background"> <div className="swap__down-arrow-background">
<img className="swap__down-arrow" src={ArrowDown} /> <img className="swap__down-arrow" src={isValid ? PlusBlue : PlusGrey} />
</div> </div>
</OversizedPanel> </OversizedPanel>
<CurrencyInputPanel <CurrencyInputPanel
......
...@@ -8,7 +8,8 @@ import ModeSelector from "./ModeSelector"; ...@@ -8,7 +8,8 @@ import ModeSelector from "./ModeSelector";
import CurrencyInputPanel from "../../components/CurrencyInputPanel"; import CurrencyInputPanel from "../../components/CurrencyInputPanel";
import { selectors, addPendingTx } from '../../ducks/web3connect'; import { selectors, addPendingTx } from '../../ducks/web3connect';
import OversizedPanel from "../../components/OversizedPanel"; import OversizedPanel from "../../components/OversizedPanel";
import ArrowPlus from "../../assets/images/arrow-down-blue.svg"; import ArrowDownBlue from "../../assets/images/arrow-down-blue.svg";
import ArrowDownGrey from "../../assets/images/arrow-down-grey.svg";
import EXCHANGE_ABI from "../../abi/exchange"; import EXCHANGE_ABI from "../../abi/exchange";
import promisify from "../../helpers/web3-promisfy"; import promisify from "../../helpers/web3-promisfy";
import ReactGA from "react-ga"; import ReactGA from "react-ga";
...@@ -277,7 +278,7 @@ class RemoveLiquidity extends Component { ...@@ -277,7 +278,7 @@ class RemoveLiquidity extends Component {
/> />
<OversizedPanel> <OversizedPanel>
<div className="swap__down-arrow-background"> <div className="swap__down-arrow-background">
<img className="swap__down-arrow" src={ArrowPlus} /> <img className="swap__down-arrow" src={isValid ? ArrowDownBlue : ArrowDownGrey} />
</div> </div>
</OversizedPanel> </OversizedPanel>
{ this.renderOutput() } { this.renderOutput() }
......
...@@ -13,7 +13,8 @@ import Modal from '../../components/Modal'; ...@@ -13,7 +13,8 @@ import Modal from '../../components/Modal';
import OversizedPanel from '../../components/OversizedPanel'; import OversizedPanel from '../../components/OversizedPanel';
import DropdownBlue from "../../assets/images/dropdown-blue.svg"; import DropdownBlue from "../../assets/images/dropdown-blue.svg";
import DropupBlue from "../../assets/images/dropup-blue.svg"; import DropupBlue from "../../assets/images/dropup-blue.svg";
import ArrowDown from '../../assets/images/arrow-down-blue.svg'; import ArrowDownBlue from '../../assets/images/arrow-down-blue.svg';
import ArrowDownGrey from '../../assets/images/arrow-down-grey.svg';
import EXCHANGE_ABI from '../../abi/exchange'; import EXCHANGE_ABI from '../../abi/exchange';
import "./send.scss"; import "./send.scss";
...@@ -769,7 +770,7 @@ class Send extends Component { ...@@ -769,7 +770,7 @@ class Send extends Component {
/> />
<OversizedPanel> <OversizedPanel>
<div className="swap__down-arrow-background"> <div className="swap__down-arrow-background">
<img className="swap__down-arrow" src={ArrowDown} /> <img className="swap__down-arrow" src={isValid ? ArrowDownBlue : ArrowDownGrey} />
</div> </div>
</OversizedPanel> </OversizedPanel>
<CurrencyInputPanel <CurrencyInputPanel
...@@ -789,7 +790,7 @@ class Send extends Component { ...@@ -789,7 +790,7 @@ class Send extends Component {
/> />
<OversizedPanel> <OversizedPanel>
<div className="swap__down-arrow-background"> <div className="swap__down-arrow-background">
<img className="swap__down-arrow" src={ArrowDown} /> <img className="swap__down-arrow" src={isValid ? ArrowDownBlue : ArrowDownGrey} />
</div> </div>
</OversizedPanel> </OversizedPanel>
<AddressInputPanel <AddressInputPanel
......
...@@ -14,7 +14,8 @@ import CurrencyInputPanel from '../../components/CurrencyInputPanel'; ...@@ -14,7 +14,8 @@ import CurrencyInputPanel from '../../components/CurrencyInputPanel';
import OversizedPanel from '../../components/OversizedPanel'; import OversizedPanel from '../../components/OversizedPanel';
import DropdownBlue from "../../assets/images/dropdown-blue.svg"; import DropdownBlue from "../../assets/images/dropdown-blue.svg";
import DropupBlue from "../../assets/images/dropup-blue.svg"; import DropupBlue from "../../assets/images/dropup-blue.svg";
import ArrowDown from '../../assets/images/arrow-down-blue.svg'; import ArrowDownBlue from '../../assets/images/arrow-down-blue.svg';
import ArrowDownGrey from '../../assets/images/arrow-down-grey.svg';
import EXCHANGE_ABI from '../../abi/exchange'; import EXCHANGE_ABI from '../../abi/exchange';
import "./swap.scss"; import "./swap.scss";
...@@ -748,7 +749,7 @@ class Swap extends Component { ...@@ -748,7 +749,7 @@ class Swap extends Component {
/> />
<OversizedPanel> <OversizedPanel>
<div className="swap__down-arrow-background"> <div className="swap__down-arrow-background">
<img className="swap__down-arrow" src={ArrowDown} /> <img className="swap__down-arrow" src={isValid ? ArrowDownBlue : ArrowDownGrey} />
</div> </div>
</OversizedPanel> </OversizedPanel>
<CurrencyInputPanel <CurrencyInputPanel
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment