From 56b02c4025f939ebfaa13325e3d6b332eb64da35 Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Sat, 9 May 2020 23:50:51 +0530 Subject: [PATCH] [Fixed bug, where estimation returns all available orders for NaN value] [#3] --- lisk-dex-electron/src/PlaceOrder.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisk-dex-electron/src/PlaceOrder.jsx b/lisk-dex-electron/src/PlaceOrder.jsx index 454c04e..6da49f4 100644 --- a/lisk-dex-electron/src/PlaceOrder.jsx +++ b/lisk-dex-electron/src/PlaceOrder.jsx @@ -37,7 +37,7 @@ export default class PlaceOrder extends React.Component { getEstimatedReturns = () => { const orderBook = getCleanOrderBook(this.context.orderBookData); - const amount = parseFloat(this.state.amount); + const amount = parseFloat(this.state.amount) || 0; const { asks } = orderBook; const { bids } = orderBook; let estimatedReturns = { };