Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,10 @@ class _SeedItemStickyDelegate extends SliverPersistentHeaderDelegate {
}

@override
double get maxExtent => 56;
double get maxExtent => 54;

@override
double get minExtent => 56;
double get minExtent => 54;

@override
bool shouldRebuild(_SeedItemStickyDelegate oldDelegate) {
Expand Down
12 changes: 11 additions & 1 deletion lib/feature/wallet/widgets/select_account/select_account_wm.dart
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,14 @@ class SelectAccountWidgetModel
_listState.accept(
_accountsState.value
?.map((selectAccountData) {
final matchSeedName = selectAccountData.name
.toLowerCase()
.contains(value);
final filteredPrivateKeys = selectAccountData.privateKeys
.map((keyInfo) {
final matchKeyName = keyInfo.keyName.toLowerCase().contains(
value,
);
final filteredAccounts = keyInfo.accounts.where((account) {
return account.name.toLowerCase().contains(value) ||
account.address.address.toLowerCase().contains(value);
Expand All @@ -53,7 +59,11 @@ class SelectAccountWidgetModel
return SeedWithInfo(
keyName: keyInfo.keyName,
key: keyInfo.key,
accounts: filteredAccounts,
accounts:
(filteredAccounts.isEmpty &&
(matchKeyName || matchSeedName))
? keyInfo.accounts
: filteredAccounts,
);
})
.where((keyInfo) => keyInfo.accounts.isNotEmpty)
Expand Down