Skip to content

Commit

Permalink
Merge pull request #1793 from ardriveapp/PE-6452-type-error-type-erro…
Browse files Browse the repository at this point in the history
…r-instance-of-create-manifest-upload-review-type-create-manifest-upload-review-is-not-a-s

PE-6452: avoids check conflicts when wrong state
  • Loading branch information
thiagocarvalhodev authored Jul 18, 2024
2 parents 7b52e00 + f524794 commit 62a444f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/blocs/create_manifest/create_manifest_cubit.dart
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,11 @@ class CreateManifestCubit extends Cubit<CreateManifestState> {
}

Future<void> checkForConflicts(String name) async {
/// Prevent multiple checks from being triggered
if (state is! CreateManifestFolderLoadSuccess) {
return;
}

final parentFolder =
(state as CreateManifestFolderLoadSuccess).viewingFolder.folder;

Expand Down Expand Up @@ -180,6 +185,8 @@ class CreateManifestCubit extends Cubit<CreateManifestState> {
emit(CreateManifestPreparingManifest(parentFolder: parentFolder));

await prepareManifestTx(manifestName: name);

logger.d('No conflicts found');
}

Future<void> prepareManifestTx({
Expand Down

0 comments on commit 62a444f

Please sign in to comment.