Fix fiat selector sorting

This commit is contained in:
natsoni 2024-04-03 16:32:38 +09:00
parent 69578f8086
commit 073578243c
No known key found for this signature in database
GPG Key ID: C65917583181743B

View File

@ -13,10 +13,10 @@ import { StateService } from '../../services/state.service';
export class FiatSelectorComponent implements OnInit { export class FiatSelectorComponent implements OnInit {
fiatForm: UntypedFormGroup; fiatForm: UntypedFormGroup;
currencies = Object.entries(fiatCurrencies).sort((a: any, b: any) => { currencies = Object.entries(fiatCurrencies).sort((a: any, b: any) => {
if (a[1].name < b[1].name) { if (a[1].code < b[1].code) {
return -1; return -1;
} }
if (a[1].name > b[1].name) { if (a[1].code > b[1].code) {
return 1; return 1;
} }
return 0; return 0;