Skip to content

Commit

Permalink
Merge branch 'dev' into handle-unknown-contracts
Browse files Browse the repository at this point in the history
  • Loading branch information
negarn committed May 21, 2019
2 parents 136a84e + cf3ccb1 commit 36124a2
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,11 @@ class ContractDrawer extends Component {
currency,
exit_tick,
is_sold,
payout,
profit,
sell_price,
} = this.props.contract_info;
const { contract_info } = this.props;
const exit_spot = isUserSold(contract_info) ? '-' : exit_tick;

return (
<ContractCard contract_info={contract_info}>
<ContractCardHeader>
Expand All @@ -64,7 +63,7 @@ class ContractDrawer extends Component {
<ContractCardBody>
<ProfitLossCardContent
pl_value={+profit}
payout={+payout}
payout={+sell_price}
currency={currency}
/>
</ContractCardBody>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ class PositionsDrawerCard extends React.PureComponent {
onClickRemove,
openContract,
result,
sell_price,
sell_time,
server_time,
status,
Expand Down Expand Up @@ -136,7 +137,7 @@ class PositionsDrawerCard extends React.PureComponent {
</div>
</div>
<div className='positions-drawer-card__indicative'>
<Money amount={indicative} currency={currency} />
<Money amount={sell_price || indicative} currency={currency} />
<div className={classNames(
'positions-drawer-card__indicative--movement', {
'positions-drawer-card__indicative--movement-complete': !!result,
Expand Down
14 changes: 8 additions & 6 deletions src/javascript/app/App/Components/Layout/Header/menu-links.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@ const MenuLinks = ({ is_logged_in, items }) => (
null
:
<BinaryLink key={idx} to={item.link_to} className='header__menu-link' active_class='header__menu-link--active'>
{item.text &&
<span title={item.text} className='header__menu-link-text'>{item.icon}{item.text}{item.logo}</span>
}
{item.image &&
<span className='header__menu-link-text'>{item.image}{item.logo}</span>
}
<React.Fragment>
{item.text &&
<span title={item.text} className='header__menu-link-text'>{item.icon}{item.text}{item.logo}</span>
}
{item.image &&
<span className='header__menu-link-text'>{item.image}{item.logo}</span>
}
</React.Fragment>
</BinaryLink>
))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ export default class PortfolioStore extends BaseStore {
this.positions[i].is_valid_to_sell = isValidToSell(contract_response);
this.positions[i].result = getDisplayStatus(contract_response);
this.positions[i].sell_time = getEndTime(contract_response) || contract_response.current_spot_time; // same as exit_spot, use latest spot time if no exit_tick_time
this.positions[i].sell_price = contract_response.sell_price;
this.positions[i].status = 'complete';
// fix for missing barrier and entry_spot
Expand Down

0 comments on commit 36124a2

Please sign in to comment.