Skip to content

Commit

Permalink
Merge pull request #1425 from sharetribe/no-upper-case-for-undefined-…
Browse files Browse the repository at this point in the history
…currency

Currency's upper-case conversion should not expect that env-variable is set
  • Loading branch information
Gnito authored Apr 9, 2021
2 parents 495ff08 + bcf9f7b commit 0dd882e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ way to update this template, but currently, we follow a pattern:

## Upcoming version 2020-XX-XX

- [fix] currency conversion should not expect that env-variable is set.
[#1425](https://github.com/sharetribe/ftw-daily/pull/1425)
- [fix] LoadableComponentErrorBoundary should be used in prod, not in dev-mode with
hot-loading.[#1429](https://github.com/sharetribe/ftw-daily/pull/1429)
- [fix] currency for Poland (PLN) [#1427](https://github.com/sharetribe/ftw-daily/pull/1427)
Expand Down
6 changes: 4 additions & 2 deletions src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,10 @@ const sdkClientId = process.env.REACT_APP_SHARETRIBE_SDK_CLIENT_ID;
const sdkBaseUrl = process.env.REACT_APP_SHARETRIBE_SDK_BASE_URL;
const sdkTransitVerbose = process.env.REACT_APP_SHARETRIBE_SDK_TRANSIT_VERBOSE === 'true';

const curr = process.env.REACT_APP_SHARETRIBE_MARKETPLACE_CURRENCY;
const currency = curr.toUpperCase();
// Marketplace currency.
// It should match one of the currencies listed in currency-config.js
const currencyConf = process.env.REACT_APP_SHARETRIBE_MARKETPLACE_CURRENCY;
const currency = currencyConf ? currencyConf.toUpperCase() : currencyConf;

// Currency formatting options.
// See: https://github.com/yahoo/react-intl/wiki/API#formatnumber
Expand Down

0 comments on commit 0dd882e

Please sign in to comment.