Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ruslansalikhov committed Apr 10, 2017
2 parents 19a68b1 + b945faf commit e353521
Show file tree
Hide file tree
Showing 20 changed files with 124 additions and 66 deletions.
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,32 @@ Release 2.0.170327
---------------------------------------------------------------------
New features
--------
- Allow the mini depth chart to be hidden by the user
- Refactor the MyMarkets component, 'show star only' and revamped search
- Display up to 20 rows of the orderbook by default instead of 10
- Add Trade and Borrow links to the default assets in AccountOverview

Bug fixes
--------
- Fix an issue with blocktrades deposit addresses being set incorrectly
- Change positioning of some tooltips
- Fix password score checker freezing on very long passwords
- Hide 'something for nothing order history items
- Update bitsharesjs to fix proposals array undefined error
- Fix 'Cannot use 'in' operator to search for 'translate'' error in api dropdown
- Fix order rounding when modifying the 'Total' after clicking an order from the orderbook
- Improve first-time brainkey lookup to check at least 10 positions
- Log pub keys when creating a new account
- Fix some Account permissions css issues and add some loggin
- Also check if generated active key matches owner key and vice versa
- Fix account create with faucet not rejecting errors properly
- Fix password strength meter turning red for long passwords
- Fix gateway actions in progress return
---------------------------------------------------------------------
Release 2.0.170327
---------------------------------------------------------------------
New features
--------
- Add password based login using account+role+password as private key seed
- Add a Migration option to add password based keys to an existing account
- Add password strength checker to password input
Expand Down
2 changes: 1 addition & 1 deletion electron/build/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"productName": "RuDEX-light",
"identifier": "org.rudex.market",
"description": "RuDEX - cryptocurrency and decentralized exchange",
"version": "2.0.170328",
"version": "2.0.170410",
"author": "[email protected]",
"main": "electron.js",
"config": {
Expand Down
4 changes: 2 additions & 2 deletions web/app/assets/locales/locale-cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -896,8 +896,8 @@
"market_frozen": "%(asset)s 资产发行人已禁用该资产的市场交易",
"show_star_1": "Show",
"show_star_2": "only",
"base": "Base currency",
"search": "Search for markets here"
"base": "Base currency:",
"search": "Search for more markets here"
},
"markets": {
"title": "交易所",
Expand Down
4 changes: 2 additions & 2 deletions web/app/assets/locales/locale-de.json
Original file line number Diff line number Diff line change
Expand Up @@ -733,8 +733,8 @@
"market_frozen": "The owner of %(asset)s has disabled trading in this market.",
"show_star_1": "Show",
"show_star_2": "only",
"base": "Base currency",
"search": "Search for markets here"
"base": "Base currency:",
"search": "Search for more markets here"
},
"fees": {
"title": "Gebühren"
Expand Down
4 changes: 2 additions & 2 deletions web/app/assets/locales/locale-en.json
Original file line number Diff line number Diff line change
Expand Up @@ -895,8 +895,8 @@
"market_frozen": "The owner of %(asset)s has disabled trading in this market.",
"show_star_1": "Show",
"show_star_2": "only",
"base": "Base currency",
"search": "Search for markets here"
"base": "Base currency:",
"search": "Search for more markets here"
},
"fees": {
"title": "Fee Schedule"
Expand Down
4 changes: 2 additions & 2 deletions web/app/assets/locales/locale-es.json
Original file line number Diff line number Diff line change
Expand Up @@ -583,8 +583,8 @@
"market_frozen": "The owner of %(asset)s has disabled trading in this market.",
"show_star_1": "Show",
"show_star_2": "only",
"base": "Base currency",
"search": "Search for markets here"
"base": "Base currency:",
"search": "Search for more markets here"
},
"markets": {
"base": "Activo base",
Expand Down
4 changes: 2 additions & 2 deletions web/app/assets/locales/locale-fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -443,8 +443,8 @@
"market_frozen": "The owner of %(asset)s has disabled trading in this market.",
"show_star_1": "Show",
"show_star_2": "only",
"base": "Base currency",
"search": "Search for markets here"
"base": "Base currency:",
"search": "Search for more markets here"
},
"markets": {
"choose_base": "Selectionner l'actif de base",
Expand Down
4 changes: 2 additions & 2 deletions web/app/assets/locales/locale-ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -587,8 +587,8 @@
"market_frozen": "The owner of %(asset)s has disabled trading in this market.",
"show_star_1": "Show",
"show_star_2": "only",
"base": "Base currency",
"search": "Search for markets here"
"base": "Base currency:",
"search": "Search for more markets here"
},
"markets": {
"base": "기초 자산",
Expand Down
5 changes: 3 additions & 2 deletions web/app/assets/locales/locale-tr.json
Original file line number Diff line number Diff line change
Expand Up @@ -871,8 +871,8 @@
"market_frozen": "The owner of %(asset)s has disabled trading in this market.",
"show_star_1": "Show",
"show_star_2": "only",
"base": "Base currency",
"search": "Search for markets here"
"base": "Base currency:",
"search": "Search for more markets here"
},
"fees": {
"title": "Ücret Tarifesi"
Expand Down Expand Up @@ -909,6 +909,7 @@
"has_wallet": "Bitshares hesabı açtığınızda cüzdanınızın kontrolü tamamen size aittir. Bir başka kişi sizin cüzdanınızı kontrol edemez. Cüzdana erişim için gerekli olan TekAnahtar bilgisayarınızda şifreli olarak saklanır.",
"create_account_text": "Hesabınıza ait .bin dosyasını kaybetmeniz, veya TekAnahtarı ya da şifrenizi unutmanız durumunda hesabınıza erişmenin hiçbir yolu yoktur. Bu yüzden, bir sonraki adımda cüzdanınızı yedeklemeli ve .bin dosyanızı, şifrenizi ve TekAnahtarınızı kesinlikle kaybetmemelisiniz.",
"first_account_paid": "TekAnahtarınızı, şifrenizi veya .bin dosyasını güvende tutmazsanız, bilgisayarınızda oluşacak herhangi bir sorun ya da güncelleme nedeniyle cüzdanınıza erişimi kaybedebilirsiniz. Bu durumda cüzdanınızdaki dijital varlıkları geri getirmenin hiçbir yolu yoktur.",
"not_first_account": "Zaten bir Bitshares hesabı ile giriş yapılmış, bu yüzden yeni oluşturacağınız her hesap için ağ ücreti ödemeniz gerekmektedir.",
"import_backup_choose": "Lütfen yedekleme dosyasını seçin. Bu işlem esnasında dosya kendi bilgisayarınızdan dışarıya asla aktarılmaz, bütün işlem bilgisayarınızda gerçekleşir.",
"import_balance": "Bakiyeyi aktar.",
"import_key_success": "İşleminiz başarıyla tamamlandı!",
Expand Down
2 changes: 1 addition & 1 deletion web/app/components/Dashboard/MarketCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ class MarketCard extends React.Component {
</div>
</div>
<div className="grid-block vertical no-overflow">
<div className="fm-name"><AssetName name={base.get("symbol")} /> : <AssetName name={quote.get("symbol")} /></div>
<div className="fm-name"><AssetName dataPlace="top" name={base.get("symbol")} /> : <AssetName dataPlace="top" name={quote.get("symbol")} /></div>
{/* <div className="fm-volume">price: <div className="float-right">{(!marketStats || !marketStats.close) ? null : utils.format_price(
marketStats.close.quote.amount,
base,
Expand Down
39 changes: 27 additions & 12 deletions web/app/components/Dashboard/SimpleDepositBlocktradesBridge.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ class SimpleDepositBlocktradesBridge extends React.Component {
this._validateAddress(this.state.toAddress, props);

this.deposit_address_cache = new BlockTradesDepositAddressCache();
this.addDepositAddress = this.addDepositAddress.bind(this);
}

componentWillMount() {
Expand All @@ -64,6 +63,16 @@ class SimpleDepositBlocktradesBridge extends React.Component {
}
}

shouldComponentUpdate(np, ns) {
return (
np.inputCoinType !== this.props.inputCoinType ||
np.outputCoinType !== this.props.outputCoinType ||
np.sender !== this.props.sender ||
np.asset !== this.props.asset ||
!utils.are_equal_shallow(ns, this.state)
);
}

_getDepositLimit(props = this.props) {
this.setState({limitLoading: true});
getDepositLimit(props.inputCoinType, props.outputCoinType).then(res => {
Expand Down Expand Up @@ -104,31 +113,37 @@ class SimpleDepositBlocktradesBridge extends React.Component {
);
if (!receive_address) {
this.setState({receive_address: null});
requestDepositAddress(this._getDepositObject());
requestDepositAddress(this._getDepositObject(props));
} else {
this.setState({
receive_address
});
}
}

_getDepositObject() {
_getDepositObject(props = this.props) {
return {
inputCoinType: this.props.inputCoinType.toLowerCase(),
outputCoinType: this.props.outputCoinType.toLowerCase(),
outputAddress: this.props.sender.get("name"),
inputCoinType: props.inputCoinType.toLowerCase(),
outputCoinType: props.outputCoinType.toLowerCase(),
outputAddress: props.sender.get("name"),
url: blockTradesAPIs.BASE,
stateCallback: this.addDepositAddress
stateCallback: (receive_address) => {
this.addDepositAddress(
props.inputCoinType.toLowerCase(),
props.outputCoinType.toLowerCase(),
props.sender.get("name"),
receive_address
);
}
};
}

addDepositAddress( receive_address ) {
let account_name = this.props.sender.get("name");
addDepositAddress( input_coin_type, output_coin_type, account, receive_address ) {
this.deposit_address_cache.cacheInputAddress(
"blocktrades",
account_name,
this.props.inputCoinType.toLowerCase(),
this.props.outputCoinType.toLowerCase(),
account,
input_coin_type,
output_coin_type,
receive_address.address,
receive_address.memo
);
Expand Down
8 changes: 4 additions & 4 deletions web/app/components/Exchange/BuySell.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ class BuySell extends React.Component {
<div className={this.props.className}>
<div className="exchange-bordered buy-sell-container">
<div className={"exchange-content-header " + type}>
<span>{buttonText} <AssetName name={quote.get("symbol")} /></span>
<span>{buttonText} <AssetName dataPlace="top" name={quote.get("symbol")} /></span>
{this.props.onFlip ? <span onClick={this.props.onFlip} style={{cursor: "pointer", fontSize: "1rem"}}> &#8646;</span> : null}
{this.props.onTogglePosition ? <span onClick={this.props.onTogglePosition} style={{cursor: "pointer", fontSize: "1rem"}}> &#8645;</span> : null}
{<div onClick={this.props.onToggleOpen} className="float-right clickable hide-for-xlarge" style={{paddingLeft: 10}}>{caret}</div>}
Expand All @@ -150,7 +150,7 @@ class BuySell extends React.Component {
<input type="number" id="buyPrice" value={price} onChange={priceChange} autoComplete="off" placeholder="0.0"/>
</div>
<div className="grid-block small-3 no-margin no-overflow buy-sell-box">
<AssetName name={base.get("symbol")} />
<AssetName dataPlace="right" name={base.get("symbol")} />
</div>
</div>

Expand All @@ -162,7 +162,7 @@ class BuySell extends React.Component {
<input type="number" id="buyAmount" value={amount} onChange={amountChange} autoComplete="off" placeholder="0.0"/>
</div>
<div className="grid-block small-3 no-margin no-overflow buy-sell-box">
<AssetName name={quote.get("symbol")} />
<AssetName dataPlace="right" name={quote.get("symbol")} />
</div>
</div>

Expand All @@ -174,7 +174,7 @@ class BuySell extends React.Component {
<input type="number" id="buyAmount" value={total} onChange={totalChange} autoComplete="off" placeholder="0.0"/>
</div>
<div className="grid-block small-3 no-margin no-overflow buy-sell-box">
<AssetName name={base.get("symbol")} />
<AssetName dataPlace="right" name={base.get("symbol")} />
</div>
</div>

Expand Down
13 changes: 10 additions & 3 deletions web/app/components/Exchange/Exchange.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -826,6 +826,12 @@ class Exchange extends React.Component {
return {isFrozen: false};
}

_toggleMiniChart() {
SettingsActions.changeViewSetting({
miniDepthChart: !this.props.miniDepthChart
});
}

render() {
let { currentAccount, marketLimitOrders, marketCallOrders, marketData, activeMarketHistory,
invertedCalls, starredMarkets, quoteAsset, baseAsset, lowestCallPrice,
Expand Down Expand Up @@ -1272,8 +1278,9 @@ class Exchange extends React.Component {
current={`${quoteSymbol}_${baseSymbol}`}
/>
</div>
<div style={{padding: "0 0 40px 0"}} className="grid-block no-margin vertical shrink">
<DepthHighChart
<div style={{padding: !this.props.miniDepthChart ? 0 : "0 0 40px 0"}} className="grid-block no-margin vertical shrink">
<div onClick={this._toggleMiniChart.bind(this)} className="exchange-content-header clickable" style={{textAlign: "left", paddingRight: 10}}>{this.props.miniDepthChart ? <span>&#9660;</span> : <span>&#9650;</span>}</div>
{this.props.miniDepthChart ? <DepthHighChart
marketReady={marketReady}
orders={marketLimitOrders}
showCallLimit={showCallLimit}
Expand All @@ -1297,7 +1304,7 @@ class Exchange extends React.Component {
hasPrediction={hasPrediction}
noText={true}
theme={this.props.settings.get("themes")}
/>
/> : null}
</div>
</div>

Expand Down
3 changes: 3 additions & 0 deletions web/app/components/Exchange/ExchangeContainer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ class ExchangeContainer extends React.Component {
},
bridgeCoins: () => {
return GatewayStore.getState().bridgeCoins;
},
miniDepthChart: () => {
return SettingsStore.getState().viewSettings.get("miniDepthChart", true);
}
}}
>
Expand Down
4 changes: 2 additions & 2 deletions web/app/components/Exchange/MarketHistory.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,8 @@ class MarketHistory extends React.Component {
<thead>
<tr>
<th style={{width: "25%", textAlign: "center"}}><Translate className="header-sub-title" content="exchange.price" /></th>
<th style={{width: "25%", textAlign: "center"}}><span className="header-sub-title"><AssetName name={quoteSymbol} /></span></th>
<th style={{width: "25%", textAlign: "center"}}><span className="header-sub-title"><AssetName name={baseSymbol} /></span></th>
<th style={{width: "25%", textAlign: "center"}}><span className="header-sub-title"><AssetName dataPlace="top" name={quoteSymbol} /></span></th>
<th style={{width: "25%", textAlign: "center"}}><span className="header-sub-title"><AssetName dataPlace="top" name={baseSymbol} /></span></th>
<th style={{width: "25%", textAlign: "center"}}><Translate className="header-sub-title" content={activeTab === "history" ? "explorer.block.date" : "explorer.block.title"} /></th>
</tr>
</thead>
Expand Down
Loading

0 comments on commit e353521

Please sign in to comment.