Skip to content

Commit

Permalink
Use nextStepValues and fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
nkuoch committed Mar 10, 2022
1 parent 27b5777 commit 9f74fc2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ function setupWithdrawalAccount(params) {
// Example 1: When forcing manual step after adding Chase bank account via Plaid, so we can ask for the real numbers instead of the plaid substitutes
// Example 2: When on the requestor step, showing Onfido view after submitting the identity and retrieving the sdkToken
if (_.has(responseACHData, 'nextStepValues')) {
navigation.goToWithdrawalAccountSetupStep(_.get(responseACHData.nextStepValues, 'currentStep') || nextStep, {
navigation.goToWithdrawalAccountSetupStep(lodashGet(responseACHData, 'nextStepValues.currentStep') || nextStep, {
...updatedACHData,
...(_.omit(responseACHData, 'nextStepValues')),
...responseACHData.nextStepValues,
Expand Down
4 changes: 2 additions & 2 deletions src/libs/actions/Wallet.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ function activateWallet(currentStep, parameters) {
return;
}

let qualifiers = _.get(response, ['data', 'requestorIdentityID', 'apiResult', 'qualifiers', 'qualifier'], []);
let qualifiers = lodashGet(response, 'data.requestorIdentityID.apiResult.qualifiers.qualifier', []);

// ExpectID sometimes returns qualifier as an object when there is only one, or as an array if there are several
if (qualifiers.key) {
Expand Down Expand Up @@ -268,7 +268,7 @@ function activateWallet(currentStep, parameters) {
}
}

if (_.get(response, ['data', 'requestorIdentityID', 'apiResult', 'results', 'key']) === 'result.no.match'
if (lodashGet(response, 'data.requestorIdentityID.apiResult.results.key') === 'result.no.match'
|| response.title === CONST.WALLET.ERROR.WRONG_ANSWERS) {
setAdditionalDetailsShouldShowFailedKYC(true);
return;
Expand Down
4 changes: 2 additions & 2 deletions src/pages/EnablePayments/IdologyQuestions.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ class IdologyQuestions extends React.Component {
render() {
const questionIndex = this.state.questionNumber;
const question = this.props.questions[questionIndex] || {};
const possibleAnwers = _.filter(_.map(question.answer, (answer) => {
const possibleAnswers = _.filter(_.map(question.answer, (answer) => {
if (this.state.hideSkip && answer === SKIP_QUESTION_TEXT) {
return;
}
Expand All @@ -149,7 +149,7 @@ class IdologyQuestions extends React.Component {
<View style={[styles.mh5, styles.mb5, styles.mt5]} key={question.type}>
<Text style={[styles.textStrong, styles.mb5]}>{question.prompt}</Text>
<RadioButtons
items={possibleAnwers}
items={possibleAnswers}
onPress={answer => this.chooseAnswer(questionIndex, answer)}
/>
</View>
Expand Down

0 comments on commit 9f74fc2

Please sign in to comment.