add emojis to FiatCurrency
What changed, and why it matters
This commit is a straightforward user-interface enhancement: it adds country-flag emoji icons next to fiat currency entries in the Cake Wallet app. There is no security-relevant change—no new network calls, no altered permissions, no cryptographic changes, and no data handling modifications.
No security action needed. Review as normal UI/data-model change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change modifies lib/entities/fiat_currency.dart to add a required emoji field to the FiatCurrency model and populates each static currency constant with a corresponding regional-indicator emoji flag. It also reformats constructor calls and changes some single quotes to double quotes. The emoji values are static string literals (Unicode regional indicator symbols), not user-controlled input, and are not used in any security-critical path visible in this diff.
Changed components
lib/entities/fiat_currency.dartInspect captured patch +148 / −64
diff --git a/lib/entities/fiat_currency.dart b/lib/entities/fiat_currency.dart
index 1907211b..58e86ca7 100644
--- a/lib/entities/fiat_currency.dart
+++ b/lib/entities/fiat_currency.dart
@@ -1,12 +1,13 @@
-import 'package:cw_core/amount/money.dart';
-import 'package:cw_core/currency.dart';
-import 'package:cw_core/enumerable_item.dart';
+import "package:cw_core/amount/money.dart";
+import "package:cw_core/currency.dart";
+import "package:cw_core/enumerable_item.dart";
class FiatCurrency extends EnumerableItem<String> with Serializable<String> implements Currency {
const FiatCurrency({
required this.symbol,
required this.countryCode,
required this.fullName,
+ required this.emoji,
this.decimals = 2,
}) : super(title: symbol, raw: symbol);
@@ -21,6 +22,8 @@ class FiatCurrency extends EnumerableItem<String> with Serializable<String> impl
@override
final String symbol;
+ final String emoji;
+
static List<FiatCurrency> get all => _all.values.toList();
static List<FiatCurrency> get currenciesAvailableToBuyWith => [
@@ -68,67 +71,148 @@ class FiatCurrency extends EnumerableItem<String> with Serializable<String> impl
kes,
];
- static const amd = FiatCurrency(symbol: 'AMD', countryCode: "arm", fullName: "Armenian Dram");
- 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 dkk = FiatCurrency(symbol: 'DKK', countryCode: "dnk", fullName: "Danish Krone");
- 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 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 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: "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 tur = FiatCurrency(symbol: 'TRY', countryCode: "tur", fullName: "Turkish Lira");
- static const kes = FiatCurrency(symbol: 'KES', countryCode: "ken", fullName: "Kenyan Shillings");
+ static const amd =
+ FiatCurrency(symbol: "AMD", countryCode: "arm", fullName: "Armenian Dram", emoji: "🇦🇲");
+ static const ars =
+ FiatCurrency(symbol: "ARS", countryCode: "arg", fullName: "Argentine Peso", emoji: "🇦🇷");
+ static const aud =
+ FiatCurrency(symbol: "AUD", countryCode: "aus", fullName: "Australian Dollar", emoji: "🇦🇺");
+ static const bdt =
+ FiatCurrency(symbol: "BDT", countryCode: "bgd", fullName: "Bangladeshi Taka", emoji: "🇧🇩");
+ static const bgn =
+ FiatCurrency(symbol: "BGN", countryCode: "bgr", fullName: "Bulgarian Lev", emoji: "🇧🇬");
+ static const brl =
+ FiatCurrency(symbol: "BRL", countryCode: "bra", fullName: "Brazilian Real", emoji: "🇧🇷");
+ static const cad =
+ FiatCurrency(symbol: "CAD", countryCode: "cad", fullName: "Canadian Dollar", emoji: "🇨🇦");
+ static const chf =
+ FiatCurrency(symbol: "CHF", countryCode: "che", fullName: "Swiss Franc", emoji: "🇨🇭");
+ static const clp =
+ FiatCurrency(symbol: "CLP", countryCode: "chl", fullName: "Chilean Peso", emoji: "🇨🇱");
+ static const cny =
+ FiatCurrency(symbol: "CNY", countryCode: "chn", fullName: "Chinese Yuan", emoji: "🇨🇳");
+ static const cop =
+ FiatCurrency(symbol: "COP", countryCode: "col", fullName: "Colombian Peso", emoji: "🇨🇴");
+ static const czk =
+ FiatCurrency(symbol: "CZK", countryCode: "czk", fullName: "Czech Koruna", emoji: "🇨🇿");
+ static const dkk =
+ FiatCurrency(symbol: "DKK", countryCode: "dnk", fullName: "Danish Krone", emoji: "🇩🇰");
+ static const egp =
+ FiatCurrency(symbol: "EGP", countryCode: "egy", fullName: "Egyptian Pound", emoji: "🇪🇬");
+ static const eur =
+ FiatCurrency(symbol: "EUR", countryCode: "eur", fullName: "Euro", emoji: "🇪🇺");
+ static const gbp =
+ FiatCurrency(symbol: "GBP", countryCode: "gbr", fullName: "Pound Sterling", emoji: "🇬🇧");
+ static const ghs =
+ FiatCurrency(symbol: "GHS", countryCode: "gha", fullName: "Ghanaian Cedi", emoji: "🇬🇭");
+ static const gtq = FiatCurrency(
+ symbol: "GTQ",
+ countryCode: "gtm",
+ fullName: "Guatemalan Quetzal",
+ emoji: "🇬🇹",
+ );
+ static const hkd =
+ FiatCurrency(symbol: "HKD", countryCode: "hkg", fullName: "Hong Kong Dollar", emoji: "🇭🇰");
+ static const hrk =
+ FiatCurrency(symbol: "HRK", countryCode: "hrv", fullName: "Croatian Kuna", emoji: "🇭🇷");
+ static const huf =
+ FiatCurrency(symbol: "HUF", countryCode: "hun", fullName: "Hungarian Forint", emoji: "🇭🇺");
+ static const idr =
+ FiatCurrency(symbol: "IDR", countryCode: "idn", fullName: "Indonesian Rupiah", emoji: "🇮🇩");
+ static const ils = FiatCurrency(
+ symbol: "ILS",
+ countryCode: "isr",
+ fullName: "Israeli New Shekel",
+ emoji: "🇮🇱",
+ );
+ static const inr =
+ FiatCurrency(symbol: "INR", countryCode: "ind", fullName: "Indian Rupee", emoji: "🇮🇳");
+ static const irr =
+ FiatCurrency(symbol: "IRR", countryCode: "irn", fullName: "Iranian Rial", emoji: "🇮🇷");
+ static const isk = FiatCurrency(
+ symbol: "ISK",
+ countryCode: "isl",
+ fullName: "Icelandic Krona Króna",
+ emoji: "🇮🇸",
+ );
+ static const jpy =
+ FiatCurrency(symbol: "JPY", countryCode: "jpn", fullName: "Japanese Yen", emoji: "🇯🇵");
+ static const krw =
+ FiatCurrency(symbol: "KRW", countryCode: "kor", fullName: "South Korean Won", emoji: "🇰🇷");
+ static const mad =
+ FiatCurrency(symbol: "MAD", countryCode: "mar", fullName: "Moroccan Dirham", emoji: "🇲🇦");
+ static const mxn =
+ FiatCurrency(symbol: "MXN", countryCode: "mex", fullName: "Mexican Peso", emoji: "🇲🇽");
+ static const myr =
+ FiatCurrency(symbol: "MYR", countryCode: "mys", fullName: "Malaysian Ringgit", emoji: "🇲🇾");
+ static const ngn =
+ FiatCurrency(symbol: "NGN", countryCode: "nga", fullName: "Nigerian Naira", emoji: "🇳🇬");
+ static const nok =
+ FiatCurrency(symbol: "NOK", countryCode: "nor", fullName: "Norwegian Krone", emoji: "🇳🇴");
+ static const nzd = FiatCurrency(
+ symbol: "NZD",
+ countryCode: "nzl",
+ fullName: "New Zealand Dollar",
+ emoji: "🇳🇿",
+ );
+ static const php =
+ FiatCurrency(symbol: "PHP", countryCode: "phl", fullName: "Philippine Peso", emoji: "🇵🇭");
+ static const pkr =
+ FiatCurrency(symbol: "PKR", countryCode: "pak", fullName: "Pakistani Rupee", emoji: "🇵🇰");
+ static const pln = FiatCurrency(
+ symbol: "PLN",
+ countryCode: "pol",
+ fullName: "Poland Zloty złoty",
+ emoji: "🇵🇱",
+ );
+ static const ron =
+ FiatCurrency(symbol: "RON", countryCode: "rou", fullName: "Romanian Leu", emoji: "🇷🇴");
+ static const rub =
+ FiatCurrency(symbol: "RUB", countryCode: "rus", fullName: "Russian Ruble", emoji: "🇷🇺");
+ static const sar =
+ FiatCurrency(symbol: "SAR", countryCode: "sau", fullName: "Saudi Riyal", emoji: "🇸🇦");
+ static const sek =
+ FiatCurrency(symbol: "SEK", countryCode: "swe", fullName: "Swedish Krona", emoji: "🇸🇪");
+ static const sgd =
+ FiatCurrency(symbol: "SGD", countryCode: "sgp", fullName: "Singapore Dollar", emoji: "🇸🇬");
+ static const thb = FiatCurrency(
+ symbol: "THB",
+ countryCode: "tha",
+ fullName: "New Thaiwan Dollar",
+ emoji: "🇹🇭",
+ );
+ static const twd =
+ FiatCurrency(symbol: "TWD", countryCode: "twn", fullName: "Thai Baht", emoji: "🇹🇼");
+ static const uah =
+ FiatCurrency(symbol: "UAH", countryCode: "ukr", fullName: "Ukrainian Hryvnia", emoji: "🇺🇦");
+ static const usd = FiatCurrency(
+ symbol: "USD",
+ countryCode: "usa",
+ fullName: "United States Dollar",
+ emoji: "🇺🇸",
+ );
+ static const vef = FiatCurrency(
+ symbol: "VEF",
+ countryCode: "ven",
+ fullName: "Venezuelan Bolivar Bolívar",
+ emoji: "🇻🇪",
+ );
+ static const vnd = FiatCurrency(
+ symbol: "VND",
+ countryCode: "vnm",
+ fullName: "Vietnamese Dong đồng",
+ emoji: "🇻🇳",
+ );
+ static const zar = FiatCurrency(
+ symbol: "ZAR",
+ countryCode: "saf",
+ fullName: "South African Rand",
+ emoji: "🇿🇦",
+ );
+ static const tur =
+ FiatCurrency(symbol: "TRY", countryCode: "tur", fullName: "Turkish Lira", emoji: "🇹🇷");
+ static const kes =
+ FiatCurrency(symbol: "KES", countryCode: "ken", fullName: "Kenyan Shillings", emoji: "🇰🇪");
static final _all = {
FiatCurrency.amd.raw: FiatCurrency.amd,
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.