-
Notifications
You must be signed in to change notification settings - Fork 300
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DTRA / Kate / DTRA-1722 / Show error message on purchase button if index was turned off from BO #16705
DTRA / Kate / DTRA-1722 / Show error message on purchase button if index was turned off from BO #16705
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
…er info and added tests
A production App ID was automatically generated for this PR. (log)
Click here to copy & paste above information.
|
🚨 Lighthouse report for the changes in this PR:
Lighthouse ran with https://deriv-app-git-fork-kate-deriv-kate-dtra-1722showerrorfrombo.binary.sx/ |
|
||
const getAmount = () => { | ||
const { stake, obj_contract_basis } = info; | ||
|
||
if (is_multiplier) return stake; | ||
if (is_accumulator) return Number(current_stake); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed is_accumulator
from checks in this component as we do not render content for Accumulator purchase button anymore.
return payout; | ||
}; | ||
|
||
if (is_vanilla || is_vanilla_fx || is_turbos || is_high_low || is_touch) return null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All this checks are now inside of has_no_button_content
prop. I moved it to parent component as I don't want to pass extra props.
Quality Gate passedIssues Measures |
}: TPurchaseButtonContent) => { | ||
const { current_stake: localized_current_stake, payout, stake } = getLocalizedBasis(); | ||
if (has_no_button_content && !error) return null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can move this check to the parent (create conditional rendering) but only after Maryia's PR will be merged
⏳ Generating Lighthouse report... |
Changes:
Screenshots: