Skip to content
This repository has been archived by the owner on Feb 22, 2024. It is now read-only.

Maryia/84861/fix: prevent selling off accumulators same like multipliers #7325

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/javascript/app/pages/user/view_popup/view_popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const Utility = require('../../../../_common/utility');
const ViewPopup = (() => {
let contract_id,
contract,
is_accumulator_contract,
is_multiplier_contract,
is_sold,
is_sold_before_start,
Expand Down Expand Up @@ -75,6 +76,7 @@ const ViewPopup = (() => {
// Lookback multiplier value
multiplier = contract.multiplier;
is_multiplier_contract = /MULTDOWN|MULTUP/.test(contract.contract_type);
is_accumulator_contract = /ACCU/.test(contract.contract_type);

if (contract && document.getElementById(wrapper_id)) {
update();
Expand All @@ -88,6 +90,7 @@ const ViewPopup = (() => {
let contract_type_display;

const initContractTypeDisplay = () => ({
ACCU : localize('Accumulator'),
ASIANU : localize('Asian Up'),
ASIAND : localize('Asian Down'),
CALL : localize('Higher'),
Expand Down Expand Up @@ -254,7 +257,9 @@ const ViewPopup = (() => {
);
}

const is_unsupported_contract = is_multiplier_contract || Callputspread.isCallputspread(contract.contract_type);
const is_unsupported_contract = is_accumulator_contract
|| is_multiplier_contract
|| Callputspread.isCallputspread(contract.contract_type);
if (!is_started) {
containerSetText('trade_details_entry_spot > span', '-');
containerSetText('trade_details_message', localize('Contract has not started yet'));
Expand Down
1 change: 1 addition & 0 deletions src/sass/app/sell_popup.scss
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@
font-style: italic;
}
#trade_details_bottom {
padding-bottom: 20px;
@media screen and (max-width: 480px) {
padding-bottom: 25px;
}
Expand Down