Skip to content

Commit

Permalink
Merge pull request #74 from sharetribe/update-v4.1.0-from-upstream
Browse files Browse the repository at this point in the history
Update v4.1.0 from upstream
  • Loading branch information
Gnito authored Feb 3, 2020
2 parents 69238f1 + 3171791 commit 544261b
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 25 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,22 @@ https://github.com/sharetribe/flex-template-web/

## Upcoming version 2020-XX-XX

## [v6.1.0] 2020-02-03

Update from upstream (first 3 bullets) and a couple of pending changes.

- [fix] PaymentMethodsForm: remove unused 'invalid' prop that breaks some versions of Final Form
[#1255](https://github.com/sharetribe/ftw-daily/pull/1255)
- [fix] Fix `console.warn` functions. [#1252](https://github.com/sharetribe/ftw-daily/pull/1252)
- [add] Add missing countries (e.g. MX and JP) to `StripeBankAccountTokenInput` validations.
[#1250](https://github.com/sharetribe/ftw-daily/pull/1250)
- [add] Add French and Spanish translations for yogatime
[#72](https://github.com/sharetribe/ftw-hourly/pull/72)
- [fix] Fix bug in showing availability exceptions. This bug was introduced in v6.0.0.
[#71](https://github.com/sharetribe/ftw-hourly/pull/71)

[v6.1.0]: https://github.com/sharetribe/ftw-hourly/compare/v6.0.0...v6.1.0

## [v6.0.0] 2019-12-20

This is update from from [upstream](https://github.com/sharetribe/ftw-daily): v4.0.0
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "app",
"version": "v6.0.0",
"version": "v6.1.0",
"private": true,
"license": "Apache-2.0",
"dependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,14 +166,21 @@ export const mapInputsToStripeAccountKeys = (country, values) => {
case 'AT':
case 'BE':
case 'DK':
case 'EE':
case 'FI':
case 'FR':
case 'DE':
case 'GR':
case 'IE':
case 'IT':
case 'LV':
case 'LT':
case 'LU':
case 'NL':
case 'PL':
case 'PT':
case 'SK':
case 'SI':
case 'ES':
case 'SE':
case 'CH':
Expand Down Expand Up @@ -222,6 +229,19 @@ export const mapInputsToStripeAccountKeys = (country, values) => {
account_number: cleanedString(values[ACCOUNT_NUMBER]),
};

case 'JP':
return {
bank_name: cleanedString(values[BANK_NAME]),
branch_name: cleanedString(values[BRANCH_NAME]),
routing_number: cleanedString(values[BANK_CODE]).concat(values[BRANCH_CODE]),
account_number: cleanedString(values[ACCOUNT_NUMBER]),
account_holder_name: cleanedString(values[ACCOUNT_OWNER_NAME]),
};

case 'MX':
return {
account_number: cleanedString(values[CLABE]),
};
default:
throw new Error(`Not supported country (${country}) given to validator`);
}
Expand Down
4 changes: 1 addition & 3 deletions src/forms/PaymentMethodsForm/PaymentMethodsForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* It's also handled separately in handleSubmit function.
*/
import React, { Component } from 'react';
import { bool, func, object, string } from 'prop-types';
import { func, object, string } from 'prop-types';
import { FormattedMessage, injectIntl, intlShape } from '../../util/reactIntl';
import { Form as FinalForm } from 'react-final-form';
import classNames from 'classnames';
Expand Down Expand Up @@ -284,7 +284,6 @@ PaymentMethodsForm.defaultProps = {
rootClassName: null,
inProgress: false,
handleSubmit: null,
invalid: false,
addPaymentMethodError: null,
deletePaymentMethodError: null,
createStripeCustomerError: null,
Expand All @@ -295,7 +294,6 @@ PaymentMethodsForm.defaultProps = {
PaymentMethodsForm.propTypes = {
formId: string,
intl: intlShape.isRequired,
invalid: bool,
handleSubmit: func,
addPaymentMethodError: object,
deletePaymentMethodError: object,
Expand Down
34 changes: 13 additions & 21 deletions src/util/seo.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,7 @@ export const openGraphMetaProps = data => {
url,
} = data;

if (
!(
title &&
description &&
contentType &&
url &&
facebookImages &&
facebookImages.length > 0 &&
canonicalRootURL
)
) {
if (!(title && description && contentType && url && facebookImages && canonicalRootURL)) {
/* eslint-disable no-console */
if (console && console.warn) {
console.warn(
Expand All @@ -58,17 +48,19 @@ export const openGraphMetaProps = data => {
{ property: 'og:locale', content: ensureOpenGraphLocale(locale) },
];

facebookImages.forEach(i => {
openGraphMeta.push({
property: 'og:image',
content: i.url,
});
if (facebookImages && facebookImages.length > 0) {
facebookImages.forEach(i => {
openGraphMeta.push({
property: 'og:image',
content: i.url,
});

if (i.width && i.height) {
openGraphMeta.push({ property: 'og:image:width', content: i.width });
openGraphMeta.push({ property: 'og:image:height', content: i.height });
}
});
if (i.width && i.height) {
openGraphMeta.push({ property: 'og:image:width', content: i.width });
openGraphMeta.push({ property: 'og:image:height', content: i.height });
}
});
}

if (siteTitle) {
openGraphMeta.push({ property: 'og:site_name', content: siteTitle });
Expand Down

0 comments on commit 544261b

Please sign in to comment.