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

Enable add payment method while payments load #8693

Merged
merged 1 commit into from
Apr 20, 2022
Merged
Show file tree
Hide file tree
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
5 changes: 0 additions & 5 deletions src/pages/settings/Payments/PaymentMethodList.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ const propTypes = {
/** What to do when a menu item is pressed */
onPress: PropTypes.func.isRequired,

/** Are we loading payments from the server? */
isLoadingPayments: PropTypes.bool,

/** Is the payment options menu open / active? */
isAddPaymentMenuActive: PropTypes.bool,

Expand Down Expand Up @@ -80,7 +77,6 @@ const defaultProps = {
walletLinkedAccountID: 0,
walletLinkedAccountType: '',
},
isLoadingPayments: false,
isAddPaymentMenuActive: false,
shouldShowAddPaymentMethodButton: true,
filterType: '',
Expand Down Expand Up @@ -164,7 +160,6 @@ class PaymentMethodList extends Component {
icon: Expensicons.Plus,
onPress: e => this.props.onPress(e),
key: 'addPaymentMethodButton',
disabled: this.props.isLoadingPayments,
iconFill: this.props.isAddPaymentMenuActive ? StyleUtils.getIconFillColor(CONST.BUTTON_STATES.PRESSED) : null,
wrapperStyle: this.props.isAddPaymentMenuActive ? [StyleUtils.getButtonBackgroundColorStyle(CONST.BUTTON_STATES.PRESSED)] : [],
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,6 @@ class BasePaymentsPage extends React.Component {
<PaymentMethodList
onPress={this.paymentMethodPressed}
style={[styles.flex4]}
isLoadingPayments={this.props.isLoadingPaymentMethods}
isAddPaymentMenuActive={this.state.shouldShowAddPaymentMenu}
actionPaymentMethodType={this.state.shouldShowDefaultDeleteMenu || this.state.shouldShowPasswordPrompt || this.state.shouldShowConfirmPopover
? this.state.selectedPaymentMethodType
Expand Down Expand Up @@ -440,10 +439,6 @@ export default compose(
walletTransfer: {
key: ONYXKEYS.WALLET_TRANSFER,
},
isLoadingPaymentMethods: {
key: ONYXKEYS.IS_LOADING_PAYMENT_METHODS,
initWithStoredValues: false,
},
userWallet: {
key: ONYXKEYS.USER_WALLET,
},
Expand Down