Skip to content

Commit

Permalink
Update upload_cubit.dart
Browse files Browse the repository at this point in the history
dont block upload if fails to get records for wallet
  • Loading branch information
thiagocarvalhodev committed Nov 18, 2024
1 parent db79d04 commit 147a332
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions lib/blocs/upload/upload_cubit.dart
Original file line number Diff line number Diff line change
Expand Up @@ -902,6 +902,10 @@ class UploadCubit extends Cubit<UploadState> {
if (state is UploadReady) {
emit((state as UploadReady).copyWith(arnsRecords: value));
}
}).catchError((e) {
logger.e(
'Error getting ant records for wallet. Proceeding with the upload...',
e);
});

_files
Expand Down Expand Up @@ -1048,9 +1052,15 @@ class UploadCubit extends Cubit<UploadState> {
}

if (manifestFileEntries.isNotEmpty) {
// load arns names
await _arnsRepository
.getAntRecordsForWallet(_auth.currentUser.walletAddress);
try {
// load arns names
await _arnsRepository
.getAntRecordsForWallet(_auth.currentUser.walletAddress);
} catch (e) {
logger.e(
'Error getting ant records for wallet. Proceeding with the upload...',
e);
}
}

emit(
Expand Down

0 comments on commit 147a332

Please sign in to comment.