Skip to content

Fix missing GBP exchange rate in currency_conversion.json #109

@osw282

Description

@osw282

Issue Description

The GBP (Great British Pound) exchange rate in src/currencyservice/data/currency_conversion.json is set to an empty string "" instead of a numeric value. This causes currency conversion operations involving GBP to fail with NaN values.

Root Cause

In the currency conversion JSON file, the GBP entry is defined as:

"GBP": ""

This empty string value causes mathematical operations in the convert function in server.js to produce NaN results when dividing or multiplying by the empty string.

Impact

  • Any currency conversion requests involving GBP (either as source or target currency) will fail
  • The service may return invalid results or throw errors
  • Users cannot properly convert prices to/from GBP

Recommended Fix

Update the src/currencyservice/data/currency_conversion.json file to include a proper numeric exchange rate for GBP. Based on the other rates in the file (which appear to be EUR-based rates), a typical GBP rate would be around 0.85-0.90.

For example, change:

"GBP": ""

To:

"GBP": "0.8645"

Files Affected

  • src/currencyservice/data/currency_conversion.json

Priority

High - This affects core currency conversion functionality for one of the major world currencies.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions