diff --git a/scripts/generate_country_data.php b/scripts/generate_country_data.php index 9693a503..42f3be13 100644 --- a/scripts/generate_country_data.php +++ b/scripts/generate_country_data.php @@ -293,6 +293,10 @@ function prepare_currencies(array $currencies): array $currencies = array_filter($currencies, static function ($currency) { return !isset($currency['_tender']) || $currency['_tender'] != 'false'; }); + // Remove ex-currencies. + $currencies = array_filter($currencies, static function ($currency) { + return !isset($currency['_to']); + }); // Sort by _from date. uasort($currencies, 'compare_from_dates'); diff --git a/src/Country/CountryRepository.php b/src/Country/CountryRepository.php index a8e7efa8..cc854cc8 100644 --- a/src/Country/CountryRepository.php +++ b/src/Country/CountryRepository.php @@ -230,7 +230,7 @@ protected function getBaseDefinitions(): array 'CO' => ['COL', '170', 'COP'], 'CP' => ['CPT', null, null], 'CR' => ['CRI', '188', 'CRC'], - 'CU' => ['CUB', '192', 'CUC'], + 'CU' => ['CUB', '192', 'CUP'], 'CV' => ['CPV', '132', 'CVE'], 'CW' => ['CUW', '531', 'ANG'], 'CX' => ['CXR', '162', 'AUD'], @@ -422,7 +422,7 @@ protected function getBaseDefinitions(): array 'VA' => ['VAT', '336', 'EUR'], 'VC' => ['VCT', '670', 'XCD'], 'VE' => ['VEN', '862', 'VES'], - 'VG' => ['VGB', '092', 'GBP'], + 'VG' => ['VGB', '092', 'USD'], 'VI' => ['VIR', '850', 'USD'], 'VN' => ['VNM', '704', 'VND'], 'VU' => ['VUT', '548', 'VUV'],