Skip to content

Commit

Permalink
fix: handle comment suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
allroundexperts committed Oct 22, 2023
1 parent 4d4ca6c commit cc298bd
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/libs/actions/Wallet.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ function acceptWalletTerms(parameters) {
onyxMethod: Onyx.METHOD.MERGE,
key: ONYXKEYS.WALLET_TERMS,
value: {
submitting: true,
isLoading: true,
},
},
];
Expand All @@ -227,7 +227,7 @@ function acceptWalletTerms(parameters) {
key: ONYXKEYS.WALLET_TERMS,
value: {
errors: null,
submitting: false,
isLoading: false,
},
},
];
Expand All @@ -245,7 +245,7 @@ function acceptWalletTerms(parameters) {
onyxMethod: Onyx.METHOD.MERGE,
key: ONYXKEYS.WALLET_TERMS,
value: {
submitting: false,
isLoading: false,
},
},
];
Expand Down
2 changes: 1 addition & 1 deletion src/pages/EnablePayments/TermsStep.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ function TermsStep(props) {
}}
message={errorMessage}
isAlertVisible={error || Boolean(errorMessage)}
isLoading={!!props.walletTerms.submitting}
isLoading={!!props.walletTerms.isLoading}
containerStyles={[styles.mh0, styles.mv4]}
/>
</ScrollView>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/EnablePayments/walletTermsPropTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ export default PropTypes.shape({
chatReportID: PropTypes.string,

/** Boolean to indicate whether the submission of wallet terms is being processed */
submitting: PropTypes.bool,
isLoading: PropTypes.bool,
});
3 changes: 2 additions & 1 deletion src/pages/settings/Wallet/WalletPage/WalletPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React, {useCallback, useEffect, useState, useRef} from 'react';
import {ActivityIndicator, View, InteractionManager, ScrollView} from 'react-native';
import {withOnyx} from 'react-native-onyx';
import _ from 'underscore';
import lodashGet from 'lodash/get';
import PaymentMethodList from '../PaymentMethodList';
import ROUTES from '../../../../ROUTES';
import HeaderWithBackButton from '../../../../components/HeaderWithBackButton';
Expand Down Expand Up @@ -68,7 +69,7 @@ function WalletPage({bankAccountList, betas, cardList, fundList, isLoadingPaymen
const hasAssignedCard = !_.isEmpty(cardList);
const shouldShowEmptyState = !hasBankAccount && !hasWallet && !hasAssignedCard;

const {isPendingOnfidoResult} = userWallet;
const isPendingOnfidoResult = lodashGet(userWallet, 'isPendingOnfidoResult', false);

const updateShouldShowLoadingSpinner = useCallback(() => {
// In order to prevent a loop, only update state of the spinner if there is a change
Expand Down
2 changes: 1 addition & 1 deletion src/types/onyx/UserWallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ type UserWallet = {
/** The user's wallet tier */
tier?: number;

/** Whether the kyc is pending and is yet to be confirmed */
/** Whether the Onfido result is pending. KYC is not complete and the wallet will not be activated until we have the Onfido verification result */
isPendingOnfidoResult?: boolean;

/** The ID of the linked account */
Expand Down

0 comments on commit cc298bd

Please sign in to comment.