Skip to content

Commit

Permalink
fix: fixed stake and payout
Browse files Browse the repository at this point in the history
  • Loading branch information
meenakshi-deriv committed Aug 30, 2024
1 parent 6288ba9 commit f1a6b3e
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/javascript/app/pages/trade/purchase/purchase.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ import { parseData, triggerClick } from '../../../common/helpers';

const Purchase = () => {
const has_purchase_change = usePurchaseChange();
const has_contract_change = useContractChange();
const has_contract_change = useContractChange();
const amount_type = Defaults.get(PARAM_NAMES.AMOUNT_TYPE);

const [data,setData] = useState({});
const [is_look_back, setIsLookBack] = useState(false);
Expand Down Expand Up @@ -269,8 +270,8 @@ const Purchase = () => {
>
<span className='label'>{data?.top_display_text}</span>
<div className='content'>
<span className='text'>{localize('Payout')}</span>
<span className='text'>{data?.top_payout_amount} {displayCurrency(data?.top_payout_amount)}</span>
<span className='text'>{amount_type === 'payout' ? localize('Stake') : localize('Payout')}</span>
<span className='text'>{amount_type === 'payout' ? data?.top_amount : data?.top_payout_amount } {displayCurrency(data?.top_payout_amount)}</span>
</div>
</div>
<div
Expand All @@ -284,8 +285,8 @@ const Purchase = () => {
>
<span className='label'>{data?.bottom_display_text}</span>
<div className='content'>
<span className='text'>{localize('Payout')}</span>
<span className='text'>{data?.bottom_payout_amount} {displayCurrency(data?.bottom_payout_amount)}</span>
<span className='text'>{amount_type === 'payout' ? localize('Stake') : localize('Payout')}</span>
<span className='text'>{amount_type === 'payout' ? data?.top_amount : data?.top_payout_amount } {displayCurrency(data?.top_payout_amount)}</span>
</div>
</div>
</>
Expand Down

0 comments on commit f1a6b3e

Please sign in to comment.