Skip to content

Commit

Permalink
refactor: 🔥 Remove NFT creation feature & clean unused dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
redDwarf03 committed Dec 25, 2024
1 parent 914df78 commit 7c247ca
Show file tree
Hide file tree
Showing 90 changed files with 28 additions and 8,647 deletions.
31 changes: 7 additions & 24 deletions lib/application/account/providers.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import 'package:aewallet/modules/aeswap/application/session/provider.dart';
import 'package:aewallet/modules/aeswap/domain/models/util/get_pool_list_response.dart';
import 'package:archethic_dapp_framework_flutter/archethic_dapp_framework_flutter.dart'
as aedappfm;
import 'package:collection/collection.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:logging/logging.dart';
import 'package:riverpod_annotation/riverpod_annotation.dart';
Expand All @@ -44,20 +43,17 @@ Future<List<Account>> _sortedAccounts(Ref ref) async {
@riverpod
List<AccountToken> _getAccountNFTFiltered(
Ref ref,
Account account, {
bool? favorite,
}) {
Account account,
) {
return ref.watch(_accountRepositoryProvider).getAccountNFTFiltered(
account,
favorite: favorite,
);
}

class AccountRepository {
List<AccountToken> getAccountNFTFiltered(
Account account, {
bool? favorite,
}) {
Account account,
) {
final accountNFTFiltered = <AccountToken>[
..._filterTokens(account, account.accountNFT),
// A collection of NFT has the same address for all the sub NFT, we only want to display one NFT in that case
Expand All @@ -70,28 +66,15 @@ class AccountRepository {

List<AccountToken> _filterTokens(
Account account,
List<AccountToken>? accountTokens, {
bool? favorite,
}) {
List<AccountToken>? accountTokens,
) {
final listTokens = <AccountToken>[];
if (accountTokens == null) {
return listTokens;
}

for (final accountToken in accountTokens) {
final nftInfoOffChain = account.nftInfosOffChainList!.firstWhereOrNull(
(nftInfoOff) => nftInfoOff.id == accountToken.tokenInformation!.id,
);
if (nftInfoOffChain == null) {
continue;
}
if (favorite == null) {
listTokens.add(accountToken);
} else {
if (nftInfoOffChain.favorite == favorite) {
listTokens.add(accountToken);
}
}
listTokens.add(accountToken);
}

return listTokens;
Expand Down
29 changes: 6 additions & 23 deletions lib/application/account/providers.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

41 changes: 0 additions & 41 deletions lib/application/farm_apr.g.dart

This file was deleted.

17 changes: 0 additions & 17 deletions lib/application/utils/cache.dart

This file was deleted.

39 changes: 0 additions & 39 deletions lib/application/utils/wait_until.dart

This file was deleted.

15 changes: 0 additions & 15 deletions lib/domain/repositories/fungible_tokens_local.dart

This file was deleted.

13 changes: 0 additions & 13 deletions lib/domain/repositories/fungible_tokens_remote.dart

This file was deleted.

14 changes: 0 additions & 14 deletions lib/domain/repositories/transaction_local.dart

This file was deleted.

Loading

0 comments on commit 7c247ca

Please sign in to comment.