diff --git a/src/javascript/app/pages/trade/price.js b/src/javascript/app/pages/trade/price.js index c8d7447893c4f..894628c065620 100644 --- a/src/javascript/app/pages/trade/price.js +++ b/src/javascript/app/pages/trade/price.js @@ -197,7 +197,18 @@ const Price = (() => { const currency = CommonFunctions.getVisibleElement('currency'); if (!h4) return; - const display_text = type && contract_type ? contract_type[type] : ''; + + const form_name = Defaults.get('formname'); + let display_text = type && contract_type ? contract_type[type] : ''; + + if (form_name === 'risefall' || form_name === 'callputequal') { + if (type === 'CALL' || type === 'CALLE') { + display_text = localize('Rise'); + } else { + display_text = localize('Fall'); + } + } + if (display_text) { h4.setAttribute('class', `contract_heading ${type}`); CommonFunctions.elementTextContent(h4, display_text); diff --git a/src/javascript/app/pages/user/view_popup/view_popup.js b/src/javascript/app/pages/user/view_popup/view_popup.js index d27f905993bd8..1a3fb6c55074c 100644 --- a/src/javascript/app/pages/user/view_popup/view_popup.js +++ b/src/javascript/app/pages/user/view_popup/view_popup.js @@ -2,6 +2,7 @@ const moment = require('moment'); const ViewPopupUI = require('./view_popup.ui'); const Highchart = require('../../trade/charts/highchart'); const Callputspread = require('../../trade/callputspread'); +const Defaults = require('../../trade/defaults'); const DigitDisplay = require('../../trade/digit_trade'); const Lookback = require('../../trade/lookback'); const Reset = require('../../trade/reset'); @@ -86,17 +87,17 @@ const ViewPopup = (() => { showContract(); }; - const ContractTypeDisplay = (() => { - let contract_type_display; + const ContractTypeDisplay = () => { + const form_name = Defaults.get('formname'); - const initContractTypeDisplay = () => ({ + return { ACCU : localize('Accumulator'), ASIANU : localize('Asian Up'), ASIAND : localize('Asian Down'), - CALL : localize('Higher'), - CALLE : localize('Higher or equal'), - PUT : localize('Lower'), - PUTE : localize('Lower or equal'), + CALL : form_name === 'risefall' ? localize('Rise') : localize('Higher'), + CALLE : localize('Rise or equal'), + PUT : form_name === 'risefall' ? localize('Fall') : localize('Lower'), + PUTE : localize('Fall or equal'), DIGITMATCH : localize('Digit Matches'), DIGITDIFF : localize('Digit Differs'), DIGITODD : localize('Digit Odd'), @@ -123,24 +124,15 @@ const ViewPopup = (() => { RUNLOW : localize('Only Downs'), MULTUP : localize('Multiplier Up'), MULTDOWN : localize('Multiplier Down'), - }); - - return { - get: () => { - if (!contract_type_display) { - contract_type_display = initContractTypeDisplay(); - } - return contract_type_display; - }, }; - })(); + }; const showContract = () => { if (!$container) { $container = makeTemplate(); } - containerSetText('trade_details_contract_type', ContractTypeDisplay.get()[contract.contract_type]); + containerSetText('trade_details_contract_type', ContractTypeDisplay()[contract.contract_type]); containerSetText('trade_details_purchase_price', formatMoney(contract.currency, contract.buy_price)); containerSetText('trade_details_multiplier', formatMoney(contract.currency, multiplier, false, 3, 2)); if (Lookback.isLookback(contract.contract_type)) { diff --git a/src/templates/app/trade/explanation.jsx b/src/templates/app/trade/explanation.jsx index 169348bcbd190..7a336a3959ca4 100644 --- a/src/templates/app/trade/explanation.jsx +++ b/src/templates/app/trade/explanation.jsx @@ -59,9 +59,9 @@ const Explanation = () => (

{it.L('Winning the contract')}

-

{it.L('If you select "Higher", you win the payout if the exit spot is strictly higher than the entry spot.')}

-

{it.L('If you select "Lower", you win the payout if the exit spot is strictly lower than the entry spot.')}

-

{it.L('If you select "Allow equals", you win the payout if exit spot is higher than or equal to entry spot for "Higher". Similarly, you win the payout if exit spot is lower than or equal to entry spot for "Lower".')}

+

{it.L('If you select "Rise", you win the payout if the exit spot is strictly higher than the entry spot.')}

+

{it.L('If you select "Fall", you win the payout if the exit spot is strictly lower than the entry spot.')}

+

{it.L('If you select "Allow equals", you win the payout if exit spot is higher than or equal to entry spot for "Rise". Similarly, you win the payout if exit spot is lower than or equal to entry spot for "Fall".')}