v4.26.0 Release Candidate (#2191)

* v4.26.0 Release Candidate

* Fix Wownero Creation issue

* Add KES fiat currency
This commit is contained in:
Omar Hatem
2025-04-12 03:23:41 +02:00
committed by GitHub
parent a7376c3225
commit ce12f517f4
10 changed files with 84 additions and 31 deletions
+49 -5
View File
@@ -9,8 +9,50 @@ class FiatCurrency extends EnumerableItem<String> with Serializable<String> impl
static List<FiatCurrency> get all => _all.values.toList();
static List<FiatCurrency> get currenciesAvailableToBuyWith =>
[amd, 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, tur,];
static List<FiatCurrency> get currenciesAvailableToBuyWith => [
amd,
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,
tur,
kes,
];
static const amd = FiatCurrency(symbol: 'AMD', countryCode: "arm", fullName: "Armenian Dram");
static const ars = FiatCurrency(symbol: 'ARS', countryCode: "arg", fullName: "Argentine Peso");
@@ -62,6 +104,7 @@ class FiatCurrency extends EnumerableItem<String> with Serializable<String> impl
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 final _all = {
FiatCurrency.amd.raw: FiatCurrency.amd,
@@ -114,6 +157,7 @@ class FiatCurrency extends EnumerableItem<String> with Serializable<String> impl
FiatCurrency.vnd.raw: FiatCurrency.vnd,
FiatCurrency.zar.raw: FiatCurrency.zar,
FiatCurrency.tur.raw: FiatCurrency.tur,
FiatCurrency.kes.raw: FiatCurrency.kes,
};
static FiatCurrency deserialize({required String raw}) => _all[raw] ?? FiatCurrency.usd;
@@ -123,13 +167,13 @@ class FiatCurrency extends EnumerableItem<String> with Serializable<String> impl
@override
int get hashCode => raw.hashCode ^ title.hashCode;
@override
String get name => raw;
@override
String? get tag => null;
@override
String get iconPath => "assets/images/flags/$countryCode.png";
String get iconPath => "assets/images/flags/$countryCode.png";
}
@@ -21,6 +21,7 @@ import 'package:cake_wallet/utils/responsive_layout_util.dart';
import 'package:cake_wallet/utils/show_pop_up.dart';
import 'package:cake_wallet/view_model/seed_settings_view_model.dart';
import 'package:cake_wallet/view_model/wallet_new_vm.dart';
import 'package:cw_core/wallet_type.dart';
import 'package:flutter/material.dart';
import 'package:flutter_mobx/flutter_mobx.dart';
import 'package:mobx/mobx.dart';
@@ -102,8 +103,8 @@ class _WalletNameFormState extends State<WalletNameForm> {
_stateReaction ??= reaction((_) => _walletNewVM.state, (ExecutionState state) async {
if (state is ExecutedSuccessfullyState) {
if (widget.isChildWallet) {
Navigator.of(navigatorKey.currentContext ?? context)
.pushNamed(Routes.walletGroupExistingSeedDescriptionPage,
Navigator.of(navigatorKey.currentContext ?? context).pushNamed(
Routes.walletGroupExistingSeedDescriptionPage,
arguments: _walletNewVM.seedPhraseWordsLength);
} else {
Navigator.of(navigatorKey.currentContext ?? context)
@@ -317,7 +318,11 @@ class _WalletNameFormState extends State<WalletNameForm> {
await showPopUp<void>(
context: context,
builder: (_) => Picker(
items: MoneroSeedType.all,
items: MoneroSeedType.all
.where((e) => // exclude bip39 in case of Wownero
widget._walletNewVM.type != WalletType.wownero ||
e.raw != MoneroSeedType.bip39.raw)
.toList(),
selectedAtIndex: isPolyseed ? 1 : 0,
onItemSelected: _setSeedType,
isSeparated: false,
@@ -402,8 +407,7 @@ class _WalletNameFormState extends State<WalletNameForm> {
await _walletNewVM.create(
options: _walletNewVM.hasLanguageSelector
? [
_languageSelectorKey.currentState?.selected ??
defaultSeedLanguage,
_languageSelectorKey.currentState?.selected ?? defaultSeedLanguage,
widget._seedSettingsViewModel.moneroSeedType
]
: null);
+1 -1
View File
@@ -161,7 +161,7 @@ abstract class WalletNewVMBase extends WalletCreationVM with Store {
return wownero!.createWowneroNewWalletCredentials(
name: name,
language: options!.first as String,
isPolyseed: options.last as bool,
isPolyseed: (options.last as MoneroSeedType).raw == 1,
password: walletPassword,
passphrase: passphrase,
);