Skip to content

Commit 6e858e2

Browse files
startailcoonsvk31
authored andcommitted
Issue 1555 - Market Picker fixes for improvements (bitshares#1561)
* Market picker fixes for improvements - 1.5s delay on input keystroke - AssetActions wrapped inside the component instead relying on parent - Underline on asset pairs - Various cleanups * bitshares#1555: Sort MarketPicker results with known gateways at the top
1 parent e9831d0 commit 6e858e2

File tree

9 files changed

+267
-163
lines changed

9 files changed

+267
-163
lines changed

app/actions/AssetActions.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ class AssetActions {
396396
// });
397397
// }
398398

399-
getAssetList(start, count, gateAssets = false) {
399+
getAssetList(start, count, includeGateways = false) {
400400
let id = start + "_" + count;
401401
return dispatch => {
402402
if (!inProgress[id]) {
@@ -427,8 +427,8 @@ class AssetActions {
427427
let bitAssetPromise =
428428
bitAssetIDS.length > 0
429429
? Apis.instance()
430-
.db_api()
431-
.exec("get_objects", [bitAssetIDS])
430+
.db_api()
431+
.exec("get_objects", [bitAssetIDS])
432432
: null;
433433

434434
Promise.all([dynamicPromise, bitAssetPromise]).then(
@@ -454,15 +454,15 @@ class AssetActions {
454454
});
455455

456456
// Fetch next 10 assets for each gateAsset on request
457-
if (!!gateAssets) {
458-
let gatewayPrefies = [
457+
if (includeGateways) {
458+
let gatewayPrefixes = [
459459
"BRIDGE",
460460
"GDEX",
461461
"RUDEX",
462462
"OPEN",
463463
"WIN"
464464
];
465-
gatewayPrefies.forEach(a => {
465+
gatewayPrefixes.forEach(a => {
466466
this.getAssetList(a + "." + start, 10);
467467
});
468468
}

app/assets/stylesheets/components/_exchange.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,10 @@ form.order-form {
208208
}
209209
}
210210

211+
.underline {
212+
border-bottom: 1px dotted;
213+
}
214+
211215
.final-row > td {
212216
border-bottom: none !important;
213217
}

app/components/Exchange/ExchangeContainer.jsx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import React from "react";
22
import MarketsStore from "stores/MarketsStore";
33
import AccountStore from "stores/AccountStore";
4-
import AssetStore from "stores/AssetStore";
54
import SettingsStore from "stores/SettingsStore";
65
import GatewayStore from "stores/GatewayStore";
76
import IntlStore from "stores/IntlStore";
@@ -110,12 +109,6 @@ class ExchangeContainer extends React.Component {
110109
bridgeCoins: () => {
111110
return GatewayStore.getState().bridgeCoins;
112111
},
113-
searchAssets: () => {
114-
return AssetStore.getState().assets;
115-
},
116-
assetsLoading: () => {
117-
return AssetStore.getState().assetsLoading;
118-
},
119112
miniDepthChart: () => {
120113
return SettingsStore.getState().viewSettings.get(
121114
"miniDepthChart",

app/components/Exchange/ExchangeHeader.jsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ export default class ExchangeHeader extends React.Component {
185185
this,
186186
quoteSymbol
187187
)}
188+
className="underline"
188189
style={{
189190
cursor: "pointer",
190191
color: isQuoteSelected
@@ -204,6 +205,7 @@ export default class ExchangeHeader extends React.Component {
204205
this,
205206
baseSymbol
206207
)}
208+
className="underline"
207209
style={{
208210
cursor: "pointer",
209211
color: isBaseSelected

0 commit comments

Comments
 (0)