Skip to content

Commit

Permalink
Add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
yuwenmemon committed Oct 13, 2022
1 parent e1ade35 commit 56bb1d9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/components/AddPlaidBankAccount.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const propTypes = {
/** Contains plaid data */
plaidData: plaidDataPropTypes,

/** Selected account ID from the Picker associated with the end of the Plaid flow */
selectedPlaidAccountID: PropTypes.string,

/** Plaid SDK token to use to initialize the widget */
Expand Down
13 changes: 12 additions & 1 deletion src/pages/AddPersonalBankAccountPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,19 @@ import ROUTES from '../ROUTES';

const propTypes = {
...withLocalizePropTypes,

/** The details about the Personal bank account we are adding saved in Onyx */
personalBankAccount: PropTypes.shape({
/** An error message to display to the user */
error: PropTypes.string,

/** Whether we should show the view that the bank account was successfully added */
shouldShowSuccess: PropTypes.bool,

/** Whether the form is loading */
isLoading: PropTypes.bool,

/** The account ID of the selected bank account from Plaid */
plaidAccountID: PropTypes.string,
}),
};
Expand Down Expand Up @@ -62,7 +71,8 @@ class AddPersonalBankAccountPage extends React.Component {

/**
* @param {Object} values - form input values passed by the Form component
* @returns {Ojbect}
* @param {Object} values.password The password of the user adding the bank account, for security.
* @returns {Object}
*/
validate(values) {
const errors = {};
Expand All @@ -76,6 +86,7 @@ class AddPersonalBankAccountPage extends React.Component {

/**
* @param {Object} values - form input values passed by the Form component
* @param {Object} values.password The password of the user adding the bank account, for security.
*/
submit(values) {
const selectedPlaidBankAccount = _.findWhere(lodashGet(this.props.plaidData, 'bankAccounts', []), {
Expand Down

0 comments on commit 56bb1d9

Please sign in to comment.