-
Notifications
You must be signed in to change notification settings - Fork 299
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]Ahmad/ Hour Picker and Other fixes #17168
base: master
Are you sure you want to change the base?
[DTRA]Ahmad/ Hour Picker and Other fixes #17168
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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-ahmadtaimoor-deriv-fdurationfix.binary.sx/ |
packages/trader/src/AppV2/Components/TradeParameters/Duration/wheelpicker.tsx
Outdated
Show resolved
Hide resolved
packages/trader/src/AppV2/Components/TradeParameters/Duration/hourpicker.tsx
Outdated
Show resolved
Hide resolved
packages/trader/src/AppV2/Components/TradeParameters/Duration/day.tsx
Outdated
Show resolved
Hide resolved
new Date((response?.proposal?.date_expiry as number) * 1000) | ||
.toISOString() | ||
.split('T')[1] | ||
.substring(0, 8) |
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.
.split('T')[1].substring(0, 8
) doesn't seems to be super safe, but I can't suggest something
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.
I mean you can ignore my comment
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.
I think it won't be an unsafe unless the response?.proposal?.date_expiry is something invalid like undefined . And so I already added check to see if response?.proposal?.date_expiry is valid.
packages/trader/src/AppV2/Components/TradeParameters/Duration/wheelpicker.tsx
Outdated
Show resolved
Hide resolved
⏳ Generating Lighthouse report... |
Changes:
In this PR, an hour picker is created that is responsible for handling the hour and mins as per trade type and symbol. with previous implementation , an unusual behavior was found with wheelpicker. It is extracted out from other implementation .
With that the expiry time of the trade-type and symbol is also fixed . It was identified by QA . Now the expiry-time is as per the market and trade-type (same as V1)
Also it was noticed that the if there is an error in for eg Rise-Fall and we move to Higher-lower , it would show empty-wheelpicker. This is also fixed.
Also the possible error are shown on the datepicker when selecting date just so that we can cater some conditions there . A snackbar would be shown for that