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

Fix P2P Debit cards are being displayed twice on the Payments page #12178

Merged
merged 3 commits into from
Nov 2, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/libs/actions/PaymentMethods.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import _ from 'underscore';
import {createRef} from 'react';
import lodashGet from 'lodash/get';
import lodashMerge from 'lodash/merge';
import Onyx from 'react-native-onyx';
import ONYXKEYS from '../../ONYXKEYS';
import * as DeprecatedAPI from '../deprecatedAPI';
Expand Down Expand Up @@ -316,7 +315,7 @@ function dismissSuccessfulTransferBalancePage() {
* @returns {Boolean}
*/
function hasPaymentMethodError(bankList, cardList) {
const combinedPaymentMethods = lodashMerge(bankList, cardList);
const combinedPaymentMethods = {...bankList, ...cardList};
return _.some(combinedPaymentMethods, item => !_.isEmpty(item.errors));
}

Expand Down