Skip to content

Commit 0be1578

Browse files
author
Aaron Imming
committed
Show correct # decimals for buy_price
1 parent c7c51d1 commit 0be1578

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/botPage/view/TradeInfoPanel/index.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import Summary from './Summary';
55
import TradeTable from './TradeTable';
66
import RunButton from './RunButton';
77
import ClearButton from './ClearButton';
8+
import { roundBalance } from '../../common/tools';
89

910
const resetAnimation = () => {
1011
$('.circle-wrapper')
@@ -71,7 +72,14 @@ class AnimateTrade extends Component {
7172
if (contractStatus.id === 'contract.purchase_sent') {
7273
resetAnimation();
7374
activateStage(0);
74-
this.setState({ buy_price: contractStatus.data, stopMessage: this.indicatorMessages.stopping });
75+
76+
this.setState({
77+
buy_price: roundBalance({
78+
balance : contractStatus.proposal.ask_price,
79+
currency: contractStatus.currency,
80+
}),
81+
stopMessage: this.indicatorMessages.stopping,
82+
});
7583
} else if (contractStatus.id === 'contract.purchase_recieved') {
7684
$('.line').addClass('active');
7785
activateStage(1);
@@ -81,6 +89,7 @@ class AnimateTrade extends Component {
8189
activateStage(2);
8290
this.setState({ sell_id: contractStatus.data, stopMessage: this.indicatorMessages.stopped });
8391
}
92+
8493
activateStage(contractStatus.id);
8594
}
8695
render() {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy