-
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
likhith/chore: incorporated the API response to save the opt-out user data #9618
Changes from 5 commits
adb3704
91e74e8
0977c9c
9573580
b7da18f
17ca1cb
1fe8ad1
65af35c
02c414b
b9bae54
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -284,9 +284,16 @@ const AccountWizard = props => { | |
props.onFinishSuccess(response.new_account_real.currency.toLowerCase()); | ||
} | ||
const { document_type, document_number, document_additional } = { ...form_values() }; | ||
if (document_type && document_type.id !== IDV_NOT_APPLICABLE_OPTION.id && document_number) { | ||
/** | ||
* If user opted-out of IDV verification, we send the value "none" for document_number and document_type to the API. | ||
*/ | ||
const idv_doc_number = | ||
document_type.id === IDV_NOT_APPLICABLE_OPTION.id | ||
? IDV_NOT_APPLICABLE_OPTION.value | ||
: document_number; | ||
if (document_type && idv_doc_number) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can we do this formating in idv component itself and not in createRealAccount function? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nice suggestion. Will check on it |
||
const country_code = props.account_settings.citizen || props.residence; | ||
submitIDVData(document_type, document_number, document_additional, country_code); | ||
submitIDVData(document_type, idv_doc_number, document_additional, country_code); | ||
} | ||
}) | ||
.catch(error => { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
import { localize } from '@deriv/translations'; | ||
|
||
export const IDV_NOT_APPLICABLE_OPTION = { id: '#NA', text: localize('I don’t have any of these') }; | ||
/** | ||
* Configuration that allows user to opt-out of IDV | ||
*/ | ||
export const IDV_NOT_APPLICABLE_OPTION = { id: 'none', text: localize('I want to do this later'), value: 'none' }; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As we've a separate card just for this option renaming, we shouldn't rename in this card's scope There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I will remove this change from the other card as both text and the DB logging need to be sent on priority |
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.
is it expected to wrapp fireEvent with waitFor?
I think the expectation can be wrapped with waitFor.
Could you please try?
@likhith-deriv
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.
Assertion wrapped inside waitfor callback will pass for both +ve and -ve scenarios for the same assertion check