diff --git a/assets/images/flags/are.png b/assets/images/flags/are.png new file mode 100644 index 000000000..ae68c4ff2 Binary files /dev/null and b/assets/images/flags/are.png differ diff --git a/assets/images/flags/arg.png b/assets/images/flags/arg.png new file mode 100644 index 000000000..c5bd233d2 Binary files /dev/null and b/assets/images/flags/arg.png differ diff --git a/assets/images/flags/bgd.png b/assets/images/flags/bgd.png new file mode 100644 index 000000000..0f8c5cfe5 Binary files /dev/null and b/assets/images/flags/bgd.png differ diff --git a/assets/images/flags/chl.png b/assets/images/flags/chl.png new file mode 100644 index 000000000..73a38f406 Binary files /dev/null and b/assets/images/flags/chl.png differ diff --git a/assets/images/flags/col.png b/assets/images/flags/col.png new file mode 100644 index 000000000..9a0fc6ac1 Binary files /dev/null and b/assets/images/flags/col.png differ diff --git a/assets/images/flags/egy.png b/assets/images/flags/egy.png new file mode 100644 index 000000000..062ee21cf Binary files /dev/null and b/assets/images/flags/egy.png differ diff --git a/assets/images/flags/gha.png b/assets/images/flags/gha.png new file mode 100644 index 000000000..8d6801e81 Binary files /dev/null and b/assets/images/flags/gha.png differ diff --git a/assets/images/flags/gtm.png b/assets/images/flags/gtm.png new file mode 100644 index 000000000..2083ad806 Binary files /dev/null and b/assets/images/flags/gtm.png differ diff --git a/assets/images/flags/irn.png b/assets/images/flags/irn.png new file mode 100644 index 000000000..151a03919 Binary files /dev/null and b/assets/images/flags/irn.png differ diff --git a/assets/images/flags/mar.png b/assets/images/flags/mar.png new file mode 100644 index 000000000..65b31c892 Binary files /dev/null and b/assets/images/flags/mar.png differ diff --git a/assets/images/flags/nga.png b/assets/images/flags/nga.png new file mode 100644 index 000000000..ebfd82449 Binary files /dev/null and b/assets/images/flags/nga.png differ diff --git a/assets/images/flags/twn.png b/assets/images/flags/twn.png new file mode 100644 index 000000000..4af8ba78d Binary files /dev/null and b/assets/images/flags/twn.png differ diff --git a/assets/images/flags/vnm.png b/assets/images/flags/vnm.png new file mode 100644 index 000000000..3cbbf878f Binary files /dev/null and b/assets/images/flags/vnm.png differ diff --git a/lib/entities/fiat_currency.dart b/lib/entities/fiat_currency.dart index 9cad6f468..12ceff92a 100644 --- a/lib/entities/fiat_currency.dart +++ b/lib/entities/fiat_currency.dart @@ -9,76 +9,106 @@ class FiatCurrency extends EnumerableItem with Serializable { static List get all => _all.values.toList(); static List get currenciesAvailableToBuyWith => - [aud, brl, cad, chf, czk, eur, dkk, gbp, hkd, ils, jpy, krw, mxn, myr, nok, nzd, pln, sek, sgd, thb, usd, zar]; + [aud, bgn, brl, cad, chf, clp, cop, czk, dkk, egp, eur, gbp, gtq, hkd, hrk, huf, idr, ils, inr, isk, jpy, krw, mad, mxn, myr, ngn, nok, nzd, php, pkr, pln, ron, sek, sgd, thb, twd, usd, vnd, zar]; + static const ars = FiatCurrency(symbol: 'ARS', countryCode: "arg", fullName: "Argentine Peso"); static const aud = FiatCurrency(symbol: 'AUD', countryCode: "aus", fullName: "Australian Dollar"); + static const bdt = FiatCurrency(symbol: 'BDT', countryCode: "bgd", fullName: "Bangladeshi Taka"); static const bgn = FiatCurrency(symbol: 'BGN', countryCode: "bgr", fullName: "Bulgarian Lev"); static const brl = FiatCurrency(symbol: 'BRL', countryCode: "bra", fullName: "Brazilian Real"); static const cad = FiatCurrency(symbol: 'CAD', countryCode: "cad", fullName: "Canadian Dollar"); static const chf = FiatCurrency(symbol: 'CHF', countryCode: "che", fullName: "Swiss Franc"); + static const clp = FiatCurrency(symbol: 'CLP', countryCode: "chl", fullName: "Chilean Peso"); static const cny = FiatCurrency(symbol: 'CNY', countryCode: "chn", fullName: "Chinese Yuan"); + static const cop = FiatCurrency(symbol: 'COP', countryCode: "col", fullName: "Colombian Peso"); static const czk = FiatCurrency(symbol: 'CZK', countryCode: "czk", fullName: "Czech Koruna"); - static const eur = FiatCurrency(symbol: 'EUR', countryCode: "eur", fullName: "Euro"); static const dkk = FiatCurrency(symbol: 'DKK', countryCode: "dnk", fullName: "Danish Krone"); - static const gbp = FiatCurrency(symbol: 'GBP', countryCode: "gbr", fullName: "Pound sterling"); + static const egp = FiatCurrency(symbol: 'EGP', countryCode: "egy", fullName: "Egyptian Pound"); + static const eur = FiatCurrency(symbol: 'EUR', countryCode: "eur", fullName: "Euro"); + static const gbp = FiatCurrency(symbol: 'GBP', countryCode: "gbr", fullName: "Pound Sterling"); + static const ghs = FiatCurrency(symbol: 'GHS', countryCode: "gha", fullName: "Ghanaian Cedi"); + static const gtq = FiatCurrency(symbol: 'GTQ', countryCode: "gtm", fullName: "Guatemalan Quetzal"); static const hkd = FiatCurrency(symbol: 'HKD', countryCode: "hkg", fullName: "Hong Kong Dollar"); static const hrk = FiatCurrency(symbol: 'HRK', countryCode: "hrv", fullName: "Croatian Kuna"); static const huf = FiatCurrency(symbol: 'HUF', countryCode: "hun", fullName: "Hungarian Forint"); static const idr = FiatCurrency(symbol: 'IDR', countryCode: "idn", fullName: "Indonesian Rupiah"); static const ils = FiatCurrency(symbol: 'ILS', countryCode: "isr", fullName: "Israeli New Shekel"); static const inr = FiatCurrency(symbol: 'INR', countryCode: "ind", fullName: "Indian Rupee"); - static const isk = FiatCurrency(symbol: 'ISK', countryCode: "isl", fullName: "Icelandic Króna"); - static const jpy = FiatCurrency(symbol: 'JPY', countryCode: "jpn", fullName: "Japanese Yen equals"); - static const krw = FiatCurrency(symbol: 'KRW', countryCode: "kor", fullName: "South Korean won"); + static const irr = FiatCurrency(symbol: 'IRR', countryCode: "irn", fullName: "Iranian Rial"); + static const isk = FiatCurrency(symbol: 'ISK', countryCode: "isl", fullName: "Icelandic Krona Króna"); + static const jpy = FiatCurrency(symbol: 'JPY', countryCode: "jpn", fullName: "Japanese Yen"); + static const krw = FiatCurrency(symbol: 'KRW', countryCode: "kor", fullName: "South Korean Won"); + static const mad = FiatCurrency(symbol: 'MAD', countryCode: "mar", fullName: "Moroccan Dirham"); static const mxn = FiatCurrency(symbol: 'MXN', countryCode: "mex", fullName: "Mexican Peso"); static const myr = FiatCurrency(symbol: 'MYR', countryCode: "mys", fullName: "Malaysian Ringgit"); + static const ngn = FiatCurrency(symbol: 'NGN', countryCode: "nga", fullName: "Nigerian Naira"); static const nok = FiatCurrency(symbol: 'NOK', countryCode: "nor", fullName: "Norwegian Krone"); static const nzd = FiatCurrency(symbol: 'NZD', countryCode: "nzl", fullName: "New Zealand Dollar"); - static const php = FiatCurrency(symbol: 'PHP', countryCode: "phl", fullName: "Philippine peso"); - static const pln = FiatCurrency(symbol: 'PLN', countryCode: "pol", fullName: "Poland złoty"); + static const php = FiatCurrency(symbol: 'PHP', countryCode: "phl", fullName: "Philippine Peso"); + static const pkr = FiatCurrency(symbol: 'PKR', countryCode: "pak", fullName: "Pakistani Rupee"); + static const pln = FiatCurrency(symbol: 'PLN', countryCode: "pol", fullName: "Poland Zloty złoty"); static const ron = FiatCurrency(symbol: 'RON', countryCode: "rou", fullName: "Romanian Leu"); static const rub = FiatCurrency(symbol: 'RUB', countryCode: "rus", fullName: "Russian Ruble"); + static const sar = FiatCurrency(symbol: 'SAR', countryCode: "sau", fullName: "Saudi Riyal"); static const sek = FiatCurrency(symbol: 'SEK', countryCode: "swe", fullName: "Swedish Krona"); static const sgd = FiatCurrency(symbol: 'SGD', countryCode: "sgp", fullName: "Singapore Dollar"); - static const thb = FiatCurrency(symbol: 'THB', countryCode: "tha", fullName: "Thai Baht"); + static const thb = FiatCurrency(symbol: 'THB', countryCode: "tha", fullName: "New Thaiwan Dollar"); + static const twd = FiatCurrency(symbol: 'TWD', countryCode: "twn", fullName: "Thai Baht"); + static const uah = FiatCurrency(symbol: 'UAH', countryCode: "ukr", fullName: "Ukrainian Hryvnia"); static const usd = FiatCurrency(symbol: 'USD', countryCode: "usa", fullName: "United States Dollar"); + static const vef = FiatCurrency(symbol: 'VEF', countryCode: "ven", fullName: "Venezuelan Bolivar Bolívar"); + static const vnd = FiatCurrency(symbol: 'VND', countryCode: "vnm", fullName: "Vietnamese Dong đồng"); static const zar = FiatCurrency(symbol: 'ZAR', countryCode: "saf", fullName: "South African Rand"); - static const vef = FiatCurrency(symbol: 'VEF', countryCode: "ven", fullName: "Venezuelan Bolívar"); static final _all = { + FiatCurrency.ars.raw: FiatCurrency.ars, FiatCurrency.aud.raw: FiatCurrency.aud, + FiatCurrency.bdt.raw: FiatCurrency.bdt, FiatCurrency.bgn.raw: FiatCurrency.bgn, FiatCurrency.brl.raw: FiatCurrency.brl, FiatCurrency.cad.raw: FiatCurrency.cad, FiatCurrency.chf.raw: FiatCurrency.chf, + FiatCurrency.clp.raw: FiatCurrency.clp, FiatCurrency.cny.raw: FiatCurrency.cny, + FiatCurrency.cop.raw: FiatCurrency.cop, FiatCurrency.czk.raw: FiatCurrency.czk, - FiatCurrency.eur.raw: FiatCurrency.eur, FiatCurrency.dkk.raw: FiatCurrency.dkk, + FiatCurrency.egp.raw: FiatCurrency.egp, + FiatCurrency.eur.raw: FiatCurrency.eur, FiatCurrency.gbp.raw: FiatCurrency.gbp, + FiatCurrency.ghs.raw: FiatCurrency.ghs, + FiatCurrency.gtq.raw: FiatCurrency.gtq, FiatCurrency.hkd.raw: FiatCurrency.hkd, FiatCurrency.hrk.raw: FiatCurrency.hrk, FiatCurrency.huf.raw: FiatCurrency.huf, FiatCurrency.idr.raw: FiatCurrency.idr, FiatCurrency.ils.raw: FiatCurrency.ils, FiatCurrency.inr.raw: FiatCurrency.inr, + FiatCurrency.irr.raw: FiatCurrency.irr, FiatCurrency.isk.raw: FiatCurrency.isk, FiatCurrency.jpy.raw: FiatCurrency.jpy, FiatCurrency.krw.raw: FiatCurrency.krw, + FiatCurrency.mad.raw: FiatCurrency.mad, FiatCurrency.mxn.raw: FiatCurrency.mxn, FiatCurrency.myr.raw: FiatCurrency.myr, + FiatCurrency.ngn.raw: FiatCurrency.ngn, FiatCurrency.nok.raw: FiatCurrency.nok, FiatCurrency.nzd.raw: FiatCurrency.nzd, FiatCurrency.php.raw: FiatCurrency.php, + FiatCurrency.pkr.raw: FiatCurrency.pkr, FiatCurrency.pln.raw: FiatCurrency.pln, FiatCurrency.ron.raw: FiatCurrency.ron, FiatCurrency.rub.raw: FiatCurrency.rub, + FiatCurrency.sar.raw: FiatCurrency.sar, FiatCurrency.sek.raw: FiatCurrency.sek, FiatCurrency.sgd.raw: FiatCurrency.sgd, FiatCurrency.thb.raw: FiatCurrency.thb, + FiatCurrency.twd.raw: FiatCurrency.twd, + FiatCurrency.uah.raw: FiatCurrency.uah, FiatCurrency.usd.raw: FiatCurrency.usd, - FiatCurrency.zar.raw: FiatCurrency.zar, - FiatCurrency.vef.raw: FiatCurrency.vef + FiatCurrency.vef.raw: FiatCurrency.vef, + FiatCurrency.vnd.raw: FiatCurrency.vnd, + FiatCurrency.zar.raw: FiatCurrency.zar }; static FiatCurrency deserialize({required String raw}) => _all[raw]!; diff --git a/lib/reactions/on_current_wallet_change.dart b/lib/reactions/on_current_wallet_change.dart index 2325fe382..7fdb6b84f 100644 --- a/lib/reactions/on_current_wallet_change.dart +++ b/lib/reactions/on_current_wallet_change.dart @@ -67,7 +67,6 @@ void startCurrentWalletChangeReaction(AppStore appStore, await wallet.connectToNode(node: node); if (wallet.type == WalletType.haven) { - settingsStore.fiatCurrency = FiatCurrency.usd; await updateHavenRate(fiatConversionStore); }