Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
changeSelectedCrypto = (symbol) => {
const crypto = this.state.cryptoList.find(obj => obj.symbol === symbol);
if (crypto === null) return;
binance.prices((error, ticker) => {
const currentPrice = parseFloat(ticker[crypto.symbol]);
this.setState({
currentPrice,
sellEnabled: false,
highestPrice: currentPrice,
});
});
this.setState({
selectedCrypto: crypto,
}, () => this.rebindSocket());
};
tokenPrice: function(pairName, next) {
binance.prices(pairName, (error, ticker) => {
next(error, ticker[pairName])
});
},
createLimitOrder: function(pairName, sideBuy, price, quantity, next) {