diff --git a/src/containers/EditListingPage/EditListingPage.duck.js b/src/containers/EditListingPage/EditListingPage.duck.js index 04e5d96d..877317cb 100644 --- a/src/containers/EditListingPage/EditListingPage.duck.js +++ b/src/containers/EditListingPage/EditListingPage.duck.js @@ -147,8 +147,9 @@ export function requestCreateListing(data) { dispatch(createListing(actionPayload)); const shouldCreateStripeAccount = bankAccountToken && country; + const stripeAccountAddress = { country }; const accountCreated = shouldCreateStripeAccount - ? dispatch(createStripeAccount(bankAccountToken, country)) + ? dispatch(createStripeAccount(bankAccountToken, stripeAccountAddress)) : Promise.resolve('already created'); return accountCreated diff --git a/src/ducks/user.duck.js b/src/ducks/user.duck.js index 0675010e..9827e11e 100644 --- a/src/ducks/user.duck.js +++ b/src/ducks/user.duck.js @@ -90,11 +90,11 @@ export const fetchCurrentUser = () => }); }; -export const createStripeAccount = (bankAccountToken, country) => +export const createStripeAccount = (bankAccountToken, address) => (dispatch, getState, sdk) => { dispatch(stripeAccountCreateRequest()); return sdk.users - .createStripeAccount({ bankAccountToken, country }) + .createStripeAccount({ bankAccountToken, address }) .then(response => { dispatch(stripeAccountCreateSuccess(response)); return response;