Skip to content
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

[account-v2]/likhith/coj-707/Incorporated POO Form #14813

Conversation

likhith-deriv
Copy link
Contributor

@likhith-deriv likhith-deriv commented Apr 25, 2024

Changes:

Create a POO form component to accept Payment method verification details containing payment method identifier and supporting document
Screenshot 2024-04-25 at 8 40 59 AM

Copy link

vercel bot commented Apr 25, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
deriv-app ✅ Ready (Inspect) Visit Preview May 1, 2024 3:44am

@coveralls
Copy link

coveralls commented Apr 25, 2024

Coverage Status

coverage: 40.339% (-0.07%) from 40.412%
when pulling b39e517 on likhith-deriv:likhith/coj-707/Create-POOForm-component
into 4d0c851 on binary-com:master.

@coveralls
Copy link

Coverage Status

coverage: 40.457% (-0.02%) from 40.473%
when pulling d3225a8 on likhith-deriv:likhith/coj-707/Create-POOForm-component
into 71c6056 on binary-com:master.

Copy link
Contributor

github-actions bot commented Apr 25, 2024

A production App ID was automatically generated for this PR. (log)

Click here to copy & paste above information.
- **PR**: [https://github.com/binary-com/deriv-app/pull/14813](https://github.com/binary-com/deriv-app/pull/14813)
- **URLs**:
    - **w/ App ID + Server**: https://deriv-app-git-fork-likhith-deriv-likhith-coj-707create-p-4f4d98.binary.sx?qa_server=red.derivws.com&app_id=24165
    - **Original**: https://deriv-app-git-fork-likhith-deriv-likhith-coj-707create-p-4f4d98.binary.sx
- **App ID**: `24165`

Copy link
Contributor

github-actions bot commented Apr 25, 2024

🚨 Lighthouse report for the changes in this PR:

Category Score
🔺 Performance 26
🟢 Accessibility 90
🟢 Best practices 92
🟧 SEO 81
🟧 PWA 78

Lighthouse ran with https://deriv-app-git-fork-likhith-deriv-likhith-coj-707create-p-4f4d98.binary.sx/

amina-deriv
amina-deriv previously approved these changes Apr 29, 2024
import { Text } from '@deriv-com/ui';

export const LinkText = ({ children, ...rest }: ComponentProps<typeof Text>) => (
<Text as='a' color='red' rel='noreferrer' target='_blank' {...rest} size='sm'>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @likhith-deriv should we hardcode the color and size ?

Copy link
Contributor Author

@likhith-deriv likhith-deriv Apr 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The {...rest} should override the props if u need something specific. These are default prop values

@@ -30,3 +38,26 @@ export const generatePOOInitialValues = (paymentMethodData: TPaymentMethodData)
return acc;
}, {} as TProofOfOwnershipFormValue);
};

const maskCardNumber = (cardNumber: string) => {
if (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we move this condition out from if statement ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are u referring to making it ternary operator? The condition is huge, so I kept it in IF block

e.nativeEvent.stopPropagation();
e.nativeEvent.stopImmediatePropagation();

if (hiddenInputFieldRef.current && 'value' in hiddenInputFieldRef.current) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we move out this condition outside from if statement ?

Copy link
Contributor Author

@likhith-deriv likhith-deriv Apr 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't understand. Can u share, what do u mean?

Copy link

sonarqubecloud bot commented May 1, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
1 Security Hotspot

See analysis details on SonarCloud

@likhith-deriv likhith-deriv merged commit fbb91f3 into deriv-com:master May 1, 2024
7 of 8 checks passed
vinu-deriv pushed a commit to vinu-deriv/deriv-app that referenced this pull request May 28, 2024
* chore: updated Deriv-ui

* feat: incorporated File upload field

* fix: incorporated File upload component

* feat: added POO form

* feat: added POO form

* feat: added POO form

* fix: incorporated review comments

* fix: incorporated review comment

* fix: incorporated code reviews

* fix: incorporated review comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants