Skip to content

Commit

Permalink
chore: ⚡ Take in account archethic-foundation/archethic-node#714
Browse files Browse the repository at this point in the history
  • Loading branch information
redDwarf03 committed Jan 8, 2025
1 parent 830be0e commit aa7fdde
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
1 change: 0 additions & 1 deletion lib/domain/models/app_wallet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ part 'app_wallet.freezed.dart';
class AppWallet with _$AppWallet {
const factory AppWallet({
required String seed,
// TODO(redddwarf03): Mutualize keychain infos
required AppKeychain appKeychain,
required KeychainSecuredInfos keychainSecuredInfos,
}) = _AppWallet;
Expand Down
16 changes: 4 additions & 12 deletions lib/infrastructure/repositories/nft/nft.repository.dart
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,6 @@ class NFTRepositoryImpl implements NFTRepository {
tokenAddressList.toSet().toList(),
);

// TODO(reddwarf03): temporaly section -> need https://github.com/archethic-foundation/archethic-node/issues/714

final secretMap = await apiService.getTransaction(
tokenAddressList.toSet().toList(),
request:
'data { ownerships { authorizedPublicKeys { encryptedSecretKey, publicKey } secret } }',
);

for (final tokenBalance in balance.token) {
final token = tokenMap[tokenBalance.address];

Expand All @@ -146,13 +138,13 @@ class NFTRepositoryImpl implements NFTRepository {

final newProperties = {...token.properties};

if (secretMap[tokenBalance.address] != null &&
secretMap[tokenBalance.address]!.data != null &&
secretMap[tokenBalance.address]!.data!.ownerships.isNotEmpty) {
if (tokenMap[tokenBalance.address] != null &&
tokenMap[tokenBalance.address]!.ownerships != null &&
tokenMap[tokenBalance.address]!.ownerships!.isNotEmpty) {
newProperties.addAll(
_tokenPropertiesDecryptedSecret(
keypair: keychainSecuredInfos.services[nameAccount]!.keyPair!,
ownerships: secretMap[tokenBalance.address]!.data!.ownerships,
ownerships: tokenMap[tokenBalance.address]!.ownerships!,
),
);
}
Expand Down

0 comments on commit aa7fdde

Please sign in to comment.