Skip to content

Commit

Permalink
Fix the reported currency for countries CU and VG.
Browse files Browse the repository at this point in the history
  • Loading branch information
bojanz committed Oct 31, 2023
1 parent 9bda7c7 commit e40c416
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions scripts/generate_country_data.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand Down
4 changes: 2 additions & 2 deletions src/Country/CountryRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
Expand Down Expand Up @@ -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'],
Expand Down

0 comments on commit e40c416

Please sign in to comment.