Merge pull request #7367 from overleaf/tm-add-singapore-currency-mapping

Add Singapore/Singapore Dollar to currency mappings

GitOrigin-RevId: 1ba2cf35435a8a7ce31ac92c9dd0d92a2cf2e4bf
This commit is contained in:
June Kelly 2022-04-13 10:06:18 +01:00 committed by Copybot
parent 77adf9803c
commit 90303f2f8c
2 changed files with 2 additions and 0 deletions

View file

@ -15,6 +15,7 @@ const currencyMappings = {
NO: 'NOK', NO: 'NOK',
CA: 'CAD', CA: 'CAD',
SE: 'SEK', SE: 'SEK',
SG: 'SGD',
} }
const validCurrencyParams = Object.values(currencyMappings).concat(['EUR']) const validCurrencyParams = Object.values(currencyMappings).concat(['EUR'])

View file

@ -47,6 +47,7 @@ describe('GeoIpLookup', function () {
expect(this.GeoIpLookup.isValidCurrencyParam('USD')).to.equal(true) expect(this.GeoIpLookup.isValidCurrencyParam('USD')).to.equal(true)
expect(this.GeoIpLookup.isValidCurrencyParam('AUD')).to.equal(true) expect(this.GeoIpLookup.isValidCurrencyParam('AUD')).to.equal(true)
expect(this.GeoIpLookup.isValidCurrencyParam('EUR')).to.equal(true) expect(this.GeoIpLookup.isValidCurrencyParam('EUR')).to.equal(true)
expect(this.GeoIpLookup.isValidCurrencyParam('SGD')).to.equal(true)
expect(this.GeoIpLookup.isValidCurrencyParam('WAT')).to.equal(false) expect(this.GeoIpLookup.isValidCurrencyParam('WAT')).to.equal(false)
expect(this.GeoIpLookup.isValidCurrencyParam('NON')).to.equal(false) expect(this.GeoIpLookup.isValidCurrencyParam('NON')).to.equal(false)
expect(this.GeoIpLookup.isValidCurrencyParam('LOL')).to.equal(false) expect(this.GeoIpLookup.isValidCurrencyParam('LOL')).to.equal(false)