mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-29 05:00:43 +10:00
Merge pull request #141 from sharetribe/fix-breaking-change-on-api
FIX: createStripeAccount API call changed
This commit is contained in:
commit
f4b81a1072
2 changed files with 4 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue