diff --git a/CHANGELOG.md b/CHANGELOG.md index e408305d..7d808fcd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,11 @@ way to update this template, but currently, we follow a pattern: ## Upcoming version 2019-XX-XX +- [add] Complete rewrite to `PayoutDetailsForm` due to breaking changes in Stripe API. + [#1049](https://github.com/sharetribe/flex-template-web/pull/1049) + - You should track all your customizations to `PayoutDetailsForm` and related changes in + `user.duck.js` and elsewhere before merging this upstream-update. + - You should update Stripe API to "2019-02-19" or later - [add] Booking: use attributes `displayStart` and `displayEnd`, instead of reading booking period directly from `start` and `end` attributes. [#1050](https://github.com/sharetribe/flex-template-web/pull/1050) diff --git a/README.md b/README.md index 00e26b9c..ea3d8f0a 100644 --- a/README.md +++ b/README.md @@ -20,12 +20,6 @@ yarn run config # add the mandato yarn run dev # start the dev server, this will open a browser in localhost:3000 ``` -### If you are using Stripe account created after 19th of February 2019 creating compan accounts is temporalily unavailable. - -This is due the changes in Stripe API (https://stripe.com/docs/upgrades#api-changelog). Issues with -individual accounts were fixed in release -[2.12.0](https://github.com/sharetribe/flex-template-web/releases/tag/v2.12.0). - You can also follow along the [Getting started with FTW](https://www.sharetribe.com/docs/tutorials/getting-started-with-ftw/) tutorial in the [Flex Docs website](https://www.sharetribe.com/docs/). diff --git a/package.json b/package.json index b22a0478..ef514d92 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "redux-thunk": "^2.3.0", "sanitize.css": "^5.0.0", "seedrandom": "^2.4.4", - "sharetribe-flex-sdk": "^1.2.0", + "sharetribe-flex-sdk": "^1.3.0", "sharetribe-scripts": "1.1.5", "smoothscroll-polyfill": "^0.4.0", "source-map-support": "^0.5.9", diff --git a/src/components/EditListingWizard/EditListingWizard.js b/src/components/EditListingWizard/EditListingWizard.js index 4dc5b903..1ba249cc 100644 --- a/src/components/EditListingWizard/EditListingWizard.js +++ b/src/components/EditListingWizard/EditListingWizard.js @@ -156,7 +156,7 @@ class EditListingWizard extends Component { handlePublishListing(id) { const { onPublishListingDraft, currentUser } = this.props; const stripeConnected = - currentUser && currentUser.attributes && currentUser.attributes.stripeConnected; + currentUser && currentUser.stripeAccount && !!currentUser.stripeAccount.id; if (stripeConnected) { onPublishListingDraft(id); } else { @@ -172,9 +172,8 @@ class EditListingWizard extends Component { } handlePayoutSubmit(values) { - const { fname: firstName, lname: lastName, ...rest } = values; this.props - .onPayoutDetailsSubmit({ firstName, lastName, ...rest }) + .onPayoutDetailsSubmit(values) .then(() => { this.setState({ showPayoutDetails: false }); this.props.onManageDisableScrolling('EditListingWizard.payoutModal', false); @@ -289,6 +288,7 @@ class EditListingWizard extends Component { className={css.payoutDetails} inProgress={fetchInProgress} createStripeAccountError={errors ? errors.createStripeAccountError : null} + currentUserId={this.props.currentUser.id} onChange={onPayoutDetailsFormChange} onSubmit={this.handlePayoutSubmit} /> diff --git a/src/components/FieldBirthdayInput/FieldBirthdayInput.js b/src/components/FieldBirthdayInput/FieldBirthdayInput.js index 6152592e..96896483 100644 --- a/src/components/FieldBirthdayInput/FieldBirthdayInput.js +++ b/src/components/FieldBirthdayInput/FieldBirthdayInput.js @@ -145,6 +145,7 @@ class BirthdayInputComponent extends Component {
{dateLabel} {yearLabel}