-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7566 from phivh/fix/add-payment-dynamic
Fix: Add payment dynamic
- Loading branch information
Showing
8 changed files
with
192 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import React from 'react'; | ||
import {propTypes, defaultProps} from './kycWallPropTypes'; | ||
import BaseKYCWall from './BaseKYCWall'; | ||
|
||
const KYCWall = props => ( | ||
// eslint-disable-next-line react/jsx-props-no-spreading | ||
<BaseKYCWall {...props} shouldListenForResize /> | ||
); | ||
|
||
KYCWall.propTypes = propTypes; | ||
KYCWall.defaultProps = defaultProps; | ||
KYCWall.displayName = 'KYCWall'; | ||
|
||
export default KYCWall; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import BaseKYCWall from './BaseKYCWall'; | ||
|
||
export default BaseKYCWall; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import PropTypes from 'prop-types'; | ||
import userWalletPropTypes from '../../pages/EnablePayments/userWalletPropTypes'; | ||
|
||
const propTypes = { | ||
/** Route for the Add Bank Account screen for a given navigation stack */ | ||
addBankAccountRoute: PropTypes.string.isRequired, | ||
|
||
/** Route for the Add Debit Card screen for a given navigation stack */ | ||
addDebitCardRoute: PropTypes.string.isRequired, | ||
|
||
/** Route for the KYC enable payments screen for a given navigation stack */ | ||
enablePaymentsRoute: PropTypes.string.isRequired, | ||
|
||
/** Where to place the popover */ | ||
popoverPlacement: PropTypes.string, | ||
|
||
/** Listen for window resize event on web and desktop */ | ||
shouldListenForResize: PropTypes.bool, | ||
|
||
...userWalletPropTypes, | ||
}; | ||
|
||
const defaultProps = { | ||
// eslint-disable-next-line react/default-props-match-prop-types | ||
userWallet: {}, | ||
popoverPlacement: 'top', | ||
shouldListenForResize: false, | ||
}; | ||
|
||
export {propTypes, defaultProps}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import React from 'react'; | ||
import BasePaymentsPage from './BasePaymentsPage'; | ||
|
||
const PaymentsPage = () => ( | ||
<BasePaymentsPage shouldListenForResize /> | ||
); | ||
|
||
PaymentsPage.displayName = 'PaymentsPage'; | ||
|
||
export default PaymentsPage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import BasePaymentsPage from './BasePaymentsPage'; | ||
|
||
export default BasePaymentsPage; |
33 changes: 33 additions & 0 deletions
33
src/pages/settings/Payments/PaymentsPage/paymentsPagePropTypes.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import PropTypes from 'prop-types'; | ||
import walletTransferPropTypes from '../walletTransferPropTypes'; | ||
import {withLocalizePropTypes} from '../../../../components/withLocalize'; | ||
import {windowDimensionsPropTypes} from '../../../../components/withWindowDimensions'; | ||
|
||
const propTypes = { | ||
/** Wallet balance transfer props */ | ||
walletTransfer: walletTransferPropTypes, | ||
|
||
/** List of betas available to current user */ | ||
betas: PropTypes.arrayOf(PropTypes.string), | ||
|
||
/** Are we loading payment methods? */ | ||
isLoadingPaymentMethods: PropTypes.bool, | ||
|
||
/** Listen for window resize event on web and desktop. */ | ||
shouldListenForResize: PropTypes.bool, | ||
|
||
...withLocalizePropTypes, | ||
|
||
...windowDimensionsPropTypes, | ||
}; | ||
|
||
const defaultProps = { | ||
walletTransfer: { | ||
shouldShowConfirmModal: false, | ||
}, | ||
betas: [], | ||
isLoadingPaymentMethods: true, | ||
shouldListenForResize: false, | ||
}; | ||
|
||
export {propTypes, defaultProps}; |