Skip to content

Commit

Permalink
Merge pull request #1084 from sharetribe/fix-stripe-connected-check
Browse files Browse the repository at this point in the history
Fix stripe connected check
  • Loading branch information
Gnito authored May 8, 2019
2 parents 0a5d609 + 44958f8 commit 106b1c2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,12 @@ way to update this template, but currently, we follow a pattern:

## Upcoming version 2019-XX-XX

- [fix] Edit `updatedEntities` function in `util/data.js` so that it doesn't mutate the `oldEntities`
argument. [#1079](https://github.com/sharetribe/flex-template-web/pull/1079)
- [fix] Previous change from `currentUser.attributes.stripeConnected` to separately included
`stripeAccount` caused errors since updates to currentUser entity didn't include `stripeAccount`.
Including it every time sounds quite error-prone, so we reversed that change.
[#1084](https://github.com/sharetribe/flex-template-web/pull/1084)
- [fix] Edit `updatedEntities` function in `util/data.js` so that it doesn't mutate the
`oldEntities` argument. [#1079](https://github.com/sharetribe/flex-template-web/pull/1079)
- [change] Update sharetribe-scripts (CRA fork) to v3.0.0. There are a couple of changes that you
should check from [#1081](https://github.com/sharetribe/flex-template-web/pull/1081)
- Reserve use\* function naming pattern for React Hooks.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class ModalMissingInformation extends Component {
const emailUnverified = !!currentUser.id && !currentUser.attributes.emailVerified;
const emailVerificationNeeded = hasListingsOrOrders && emailUnverified;

const stripeAccountMissing = !!currentUser.id && !currentUser.stripeAccount;
const stripeAccountMissing = !!currentUser.id && !currentUser.attributes.stripeConnected;
const stripeAccountNeeded = currentUserHasListings && stripeAccountMissing;

// Show reminder
Expand Down
1 change: 1 addition & 0 deletions src/util/types.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ propTypes.currentUser = shape({
abbreviatedName: string.isRequired,
bio: string,
}).isRequired,
stripeConnected: bool,
}),
profileImage: propTypes.image,
});
Expand Down

0 comments on commit 106b1c2

Please sign in to comment.