Skip to content
Snippets Groups Projects
Commit 685af5e2 authored by poka's avatar poka
Browse files

check ismember before hasidentity wallet

parent 794dd54c
No related branches found
No related tags found
No related merge requests found
Pipeline #39412 failed
.fvmrc 0 → 100644
{
"flutter": "3.27.1"
}
\ No newline at end of file
......@@ -54,4 +54,7 @@ integration_test/duniter/data/chains/
# Ignore PC deps
scripts/pushGecko
android-old
\ No newline at end of file
android-old
# FVM Version Cache
.fvm/
\ No newline at end of file
{
"dart.flutterSdkPath": ".fvm/versions/3.27.1"
}
\ No newline at end of file
......@@ -14,8 +14,6 @@ import 'package:provider/provider.dart';
class MyWalletsProvider with ChangeNotifier {
List<WalletData> listWallets = [];
WalletData? idtyWallet;
List<WalletData> listWalletsWithoutIdty = [];
String pinCode = '';
late String mnemonic;
int? pinLenght;
......@@ -37,6 +35,10 @@ class MyWalletsProvider with ChangeNotifier {
bool isWalletsExists() => chestBox.isNotEmpty;
WalletData? get idtyWallet => listWallets.firstWhereOrNull((w) => w.isMembre) ?? listWallets.firstWhereOrNull((w) => w.hasIdentity);
List<WalletData> get listWalletsWithoutIdty => listWallets.where((w) => !w.hasIdentity).toList();
Future<List<WalletData>> readAllWallets([int? chest]) async {
final sub = Provider.of<SubstrateSdk>(homeContext, listen: false);
chest = chest ?? getCurrentChest();
......@@ -66,11 +68,6 @@ class MyWalletsProvider with ChangeNotifier {
listWallets.sort((p1, p2) => Comparable.compare(p1.number!, p2.number!));
idtyWallet = listWallets.firstWhereOrNull((w) => w.hasIdentity);
listWalletsWithoutIdty = listWallets.toList();
listWalletsWithoutIdty.removeWhere((w) => w.address == idtyWallet?.address);
return listWallets;
}
......
......@@ -2,7 +2,7 @@ name: gecko
description: Pay with G1.
publish_to: "none"
version: 0.1.21+95
version: 0.1.21+96
environment:
sdk: ^3.5.3
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment