add MKR, DAI, ZRX

This commit is contained in:
Hayden Adams 2018-03-25 11:29:25 -04:00
parent e6ad0c58af
commit 93ab10c95e
4 changed files with 25 additions and 19 deletions

@ -157,7 +157,7 @@ class Exchange extends Component {
<p></p>
</div>
<div className="value border pa2">
<input type="number" readOnly={true} value={(this.props.exchange.outputValue/10**18).toFixed(5)} placeholder="0"/>
<input type="number" readOnly={true} value={(this.props.exchange.outputValue/10**18).toFixed(6)} placeholder="0"/>
<SelectToken token={this.props.exchange.outputToken} onSelectToken={this.onSelectToken} type="output"/>
<p className="dropdown">{'<'}</p>
</div>

@ -107,7 +107,7 @@ class Purchase extends Component {
if (this.props.web3Store.interaction === 'input') {
return (
<a className="swap border pa2" role="button" onClick={() => {this.purchaseTokens()}}>
<b>{"I want to swap " + this.props.exchange.inputValue + " " + this.props.exchange.inputToken.value + " for " + this.props.exchange.outputValue/10**18 + " " + this.props.exchange.outputToken.value}</b>
<b>{"I want to swap " + this.props.exchange.inputValue + " " + this.props.exchange.inputToken.value + " for " + (this.props.exchange.outputValue/10**18).toFixed(6) + " " + this.props.exchange.outputToken.value}</b>
</a>
)
} else {

@ -5,11 +5,11 @@ function RateAndFee ({ exchangeRate, outputTokenValue, inputTokenValue, exchange
<section className="rate border pa2">
<span className="rate-info">
<p>Rate</p>
<p>{(exchangeRate).toFixed(5)} {outputTokenValue + "/" + inputTokenValue}</p>
<p>{(exchangeRate).toFixed(6)} {outputTokenValue + "/" + inputTokenValue}</p>
</span>
<span className="rate-info">
<p>Fee</p>
<p>{(exchangeFee/10**18).toFixed(5)} {inputTokenValue}</p>
<p>{(exchangeFee/10**18).toFixed(6)} {inputTokenValue}</p>
</span>
</section>
)

@ -14,13 +14,19 @@ export default {
exchangeAddresses: {
addresses: [
['BAT','0x80f5C1beA2Ea4a9C21E4c6D7831ae2Dbce45674d'],
['OMG','0x1033f09e293200de63AF16041e83000aFBBfF5c0']
['DAI','0x9eb0461bcc20229bE61319372cCA84d782823FCb'],
['MKR','0x4c86a3b3cf926de3644f60658071ca604949609f'],
['OMG','0x1033f09e293200de63AF16041e83000aFBBfF5c0'],
['ZRX','0x42E109452F4055c82a513A527690F2D73251367e']
]
},
tokenAddresses: {
addresses: [
['BAT','0xDA5B056Cfb861282B4b59d29c9B395bcC238D29B'],
['OMG','0x879884c3C46A24f56089f3bBbe4d5e38dB5788C0']
['DAI','0x2448eE2641d78CC42D7AD76498917359D961A783'],
['MKR','0xf9ba5210f91d0474bd1e1dcdaec4c58e359aad85'],
['OMG','0x879884c3C46A24f56089f3bBbe4d5e38dB5788C0'],
['ZRX','0xF22e3F33768354c9805d046af3C0926f27741B43']
]
}
},
@ -30,7 +36,7 @@ export default {
inputBalance: 0,
outputBalance: 0,
inputToken: { value: 'ETH', label: 'ETH', clearableValue: false },
outputToken: { value: 'OMG', label: 'OMG', clearableValue: false },
outputToken: { value: 'MKR', label: 'MKR', clearableValue: false },
invariant1: 0,
invariant2: 0,
marketEth1: 0,