Export USD and BTC indexes for FIAT_OPTIONS

This commit is contained in:
Fernando Porazzi
2023-10-26 18:25:49 +02:00
committed by Paul Miller
parent 152aee0cfe
commit 2226e9f951
2 changed files with 11 additions and 4 deletions

View File

@@ -43,7 +43,6 @@ type ChooseCurrencyForm = {
* }
*/
//Bitcoin and USD need to be FIAT_OPTIONS[0] and FIAT_OPTIONS[1] respectively, they are called in megaStore.tsx
export const FIAT_OPTIONS: Currency[] = [
{
label: "Bitcoin BTC",
@@ -103,6 +102,9 @@ export const FIAT_OPTIONS: Currency[] = [
{ label: "Kuwaiti Dinar KWD", value: "KWD", maxFractionalDigits: 3 }
].sort((a, b) => (a.value > b.value ? 1 : b.value > a.value ? -1 : 0));
export const USD_INDEX = FIAT_OPTIONS.findIndex((fo) => fo.value === "USD");
export const BTC_INDEX = FIAT_OPTIONS.findIndex((fo) => fo.value === "BTC");
export function ChooseCurrency() {
const i18n = useI18n();
const [error, setError] = createSignal<Error>();