From 0e975d2a61bb1739ae212eb1e6b326f9f840fa7e Mon Sep 17 00:00:00 2001 From: Jenni Nurmi Date: Thu, 28 Feb 2019 09:35:14 +0200 Subject: [PATCH] Hide company account creation if new Stripe API is used --- .../PayoutDetailsForm/PayoutDetailsForm.js | 48 +++++++++++-------- 1 file changed, 27 insertions(+), 21 deletions(-) diff --git a/src/forms/PayoutDetailsForm/PayoutDetailsForm.js b/src/forms/PayoutDetailsForm/PayoutDetailsForm.js index 4964c8b3..d5159ab3 100644 --- a/src/forms/PayoutDetailsForm/PayoutDetailsForm.js +++ b/src/forms/PayoutDetailsForm/PayoutDetailsForm.js @@ -46,7 +46,11 @@ const PayoutDetailsFormComponent = props => ( values, } = fieldRenderProps; - const { country, accountType } = values; + const { country } = values; + + const usesOldAPI = config.stripe.useDeprecatedLegalEntityWithStripe; + + const accountType = usesOldAPI ? values.accountType : 'individual'; const individualAccountLabel = intl.formatMessage({ id: 'PayoutDetailsForm.individualAccount', @@ -99,27 +103,29 @@ const PayoutDetailsFormComponent = props => ( return (
-
-

- -

-
- - + {usesOldAPI ? ( +
+

+ +

+
+ + +
-
+ ) : null} {accountType ? (