Update snapshots and formatting after rebase

This commit is contained in:
Kimmo Puputti 2018-01-04 12:35:32 +02:00
parent 9e98466661
commit 86e750610e
4 changed files with 85 additions and 12 deletions

View file

@ -65,13 +65,16 @@ class EditListingPhotosPanel extends Component {
bankAccountToken,
address: omitBy(address, isUndefined),
};
this.props.onPayoutDetailsSubmit(params).then(() => {
this.setState({ showPayoutDetails: false });
this.props.onManageDisableScrolling('EditListingPhotosPanel.payoutModal', false);
this.props.onSubmit(this.state.submittedValues);
}).catch(() => {
// do nothing
});
this.props
.onPayoutDetailsSubmit(params)
.then(() => {
this.setState({ showPayoutDetails: false });
this.props.onManageDisableScrolling('EditListingPhotosPanel.payoutModal', false);
this.props.onSubmit(this.state.submittedValues);
})
.catch(() => {
// do nothing
});
}
render() {

View file

@ -4388,6 +4388,10 @@ exports[`TransactionPanel - Order enquired matches snapshot 1`] = `
"lineItems": Array [
Object {
"code": "line-item/night",
"includeFor": Array [
"customer",
"provider",
],
"lineTotal": Money {
"amount": 16500,
"currency": "USD",
@ -4401,6 +4405,9 @@ exports[`TransactionPanel - Order enquired matches snapshot 1`] = `
},
Object {
"code": "line-item/provider-commission",
"includeFor": Array [
"provider",
],
"lineTotal": Money {
"amount": -100,
"currency": "USD",
@ -4642,6 +4649,10 @@ exports[`TransactionPanel - Order enquired matches snapshot 1`] = `
"lineItems": Array [
Object {
"code": "line-item/night",
"includeFor": Array [
"customer",
"provider",
],
"lineTotal": Money {
"amount": 16500,
"currency": "USD",
@ -4655,6 +4666,9 @@ exports[`TransactionPanel - Order enquired matches snapshot 1`] = `
},
Object {
"code": "line-item/provider-commission",
"includeFor": Array [
"provider",
],
"lineTotal": Money {
"amount": -100,
"currency": "USD",
@ -4764,6 +4778,10 @@ exports[`TransactionPanel - Order enquired matches snapshot 1`] = `
"lineItems": Array [
Object {
"code": "line-item/night",
"includeFor": Array [
"customer",
"provider",
],
"lineTotal": Money {
"amount": 16500,
"currency": "USD",
@ -4777,6 +4795,9 @@ exports[`TransactionPanel - Order enquired matches snapshot 1`] = `
},
Object {
"code": "line-item/provider-commission",
"includeFor": Array [
"provider",
],
"lineTotal": Money {
"amount": -100,
"currency": "USD",
@ -5004,6 +5025,10 @@ exports[`TransactionPanel - Order enquired matches snapshot 1`] = `
"lineItems": Array [
Object {
"code": "line-item/night",
"includeFor": Array [
"customer",
"provider",
],
"lineTotal": Money {
"amount": 16500,
"currency": "USD",
@ -5017,6 +5042,9 @@ exports[`TransactionPanel - Order enquired matches snapshot 1`] = `
},
Object {
"code": "line-item/provider-commission",
"includeFor": Array [
"provider",
],
"lineTotal": Money {
"amount": -100,
"currency": "USD",
@ -5220,6 +5248,10 @@ exports[`TransactionPanel - Order preauthorized matches snapshot 1`] = `
"lineItems": Array [
Object {
"code": "line-item/night",
"includeFor": Array [
"customer",
"provider",
],
"lineTotal": Money {
"amount": 16500,
"currency": "USD",
@ -5233,6 +5265,9 @@ exports[`TransactionPanel - Order preauthorized matches snapshot 1`] = `
},
Object {
"code": "line-item/provider-commission",
"includeFor": Array [
"provider",
],
"lineTotal": Money {
"amount": -100,
"currency": "USD",
@ -5345,6 +5380,10 @@ exports[`TransactionPanel - Order preauthorized matches snapshot 1`] = `
"lineItems": Array [
Object {
"code": "line-item/night",
"includeFor": Array [
"customer",
"provider",
],
"lineTotal": Money {
"amount": 16500,
"currency": "USD",
@ -5358,6 +5397,9 @@ exports[`TransactionPanel - Order preauthorized matches snapshot 1`] = `
},
Object {
"code": "line-item/provider-commission",
"includeFor": Array [
"provider",
],
"lineTotal": Money {
"amount": -100,
"currency": "USD",
@ -5467,6 +5509,10 @@ exports[`TransactionPanel - Order preauthorized matches snapshot 1`] = `
"lineItems": Array [
Object {
"code": "line-item/night",
"includeFor": Array [
"customer",
"provider",
],
"lineTotal": Money {
"amount": 16500,
"currency": "USD",
@ -5480,6 +5526,9 @@ exports[`TransactionPanel - Order preauthorized matches snapshot 1`] = `
},
Object {
"code": "line-item/provider-commission",
"includeFor": Array [
"provider",
],
"lineTotal": Money {
"amount": -100,
"currency": "USD",
@ -5589,6 +5638,10 @@ exports[`TransactionPanel - Order preauthorized matches snapshot 1`] = `
"lineItems": Array [
Object {
"code": "line-item/night",
"includeFor": Array [
"customer",
"provider",
],
"lineTotal": Money {
"amount": 16500,
"currency": "USD",
@ -5602,6 +5655,9 @@ exports[`TransactionPanel - Order preauthorized matches snapshot 1`] = `
},
Object {
"code": "line-item/provider-commission",
"includeFor": Array [
"provider",
],
"lineTotal": Money {
"amount": -100,
"currency": "USD",
@ -5829,6 +5885,10 @@ exports[`TransactionPanel - Order preauthorized matches snapshot 1`] = `
"lineItems": Array [
Object {
"code": "line-item/night",
"includeFor": Array [
"customer",
"provider",
],
"lineTotal": Money {
"amount": 16500,
"currency": "USD",
@ -5842,6 +5902,9 @@ exports[`TransactionPanel - Order preauthorized matches snapshot 1`] = `
},
Object {
"code": "line-item/provider-commission",
"includeFor": Array [
"provider",
],
"lineTotal": Money {
"amount": -100,
"currency": "USD",
@ -6039,6 +6102,10 @@ exports[`TransactionPanel - Sale accepted matches snapshot 1`] = `
"lineItems": Array [
Object {
"code": "line-item/night",
"includeFor": Array [
"customer",
"provider",
],
"lineTotal": Money {
"amount": 16500,
"currency": "USD",
@ -6052,6 +6119,9 @@ exports[`TransactionPanel - Sale accepted matches snapshot 1`] = `
},
Object {
"code": "line-item/provider-commission",
"includeFor": Array [
"provider",
],
"lineTotal": Money {
"amount": -1000,
"currency": "USD",

View file

@ -383,9 +383,10 @@ export const createStripeAccount = payoutDetails => (dispatch, getState, sdk) =>
.catch(err => {
const e = storableError(err);
dispatch(stripeAccountCreateError(e));
const stripeMessage = e.apiErrors && e.apiErrors.length > 0 && e.apiErrors[0].meta
? e.apiErrors[0].meta.stripe_message
: null;
const stripeMessage =
e.apiErrors && e.apiErrors.length > 0 && e.apiErrors[0].meta
? e.apiErrors[0].meta.stripe_message
: null;
log.error(err, 'create-stripe-account-failed', { stripeMessage });
throw e;
});

View file

@ -157,12 +157,11 @@ export const isChangeEmailWrongPassword = error => error && error.status === 403
*/
export const isChangePasswordWrongPassword = error => error && error.status === 403;
/**
* Check if the given API error (from
* 'sdk.currentUser.createStripeAccount(payoutDetails)') is due to
* invalid postal code in the given country.
*/
*/
export const isStripeInvalidPostalCode = error => {
const msgRe = /^Invalid [A-Z]{2} postal code$/;
return errorAPIErrors(error).some(apiError => {