From 4aa43779ca8d8c20c1d9f1ade6f982b997600641 Mon Sep 17 00:00:00 2001 From: Karl Prieb Date: Fri, 6 Oct 2023 10:51:50 -0300 Subject: [PATCH] remove logs --- lib/src/streams/transaction_uploader.dart | 9 --------- lib/src/streams/utils.dart | 1 - 2 files changed, 10 deletions(-) diff --git a/lib/src/streams/transaction_uploader.dart b/lib/src/streams/transaction_uploader.dart index 6bd14f8..794afeb 100644 --- a/lib/src/streams/transaction_uploader.dart +++ b/lib/src/streams/transaction_uploader.dart @@ -31,7 +31,6 @@ TaskEither> uploadTransaction( final txHeaders = transaction.toJson(); return _postTransactionHeaderTaskEither(arweave, txHeaders).flatMap((_) { - print('call post chunks'); return TaskEither.of(_postChunks(arweave, transaction)); }); } @@ -39,12 +38,9 @@ TaskEither> uploadTransaction( TaskEither _postTransactionHeaderTaskEither( ArweaveApi arweave, Map headers) { return TaskEither.tryCatch(() async { - print('Uploading transaction headers...'); - final res = await arweave.post('tx', body: json.encode(headers)); if (!(res.statusCode >= 200 && res.statusCode < 300)) { - print('Unable to upload transaction: ${res.statusCode}'); throw Exception('Unable to upload transaction: ${res.statusCode}'); } @@ -56,7 +52,6 @@ Stream<(int, int)> _postChunks( ArweaveApi arweave, TransactionResult transaction, ) async* { - print('Uploading chunks...'); final chunkUploadCompletionStreamController = StreamController(); final chunkStream = transaction.chunkStreamGenerator(); final chunkQueue = StreamQueue(chunkStream); @@ -84,11 +79,8 @@ Stream<(int, int)> _postChunks( }, ); - print('chunk uploaded'); - chunkUploadCompletionStreamController.add(chunkIndex); } catch (err) { - print('Chunk upload failed at $chunkIndex'); chunkUploadCompletionStreamController.addError(err); } } @@ -148,7 +140,6 @@ Future _uploadChunk(ArweaveApi arweave, int chunkIndex, } final res = await arweave.post('chunk', body: json.encode(chunk)); - print('Uploaded chunk $chunkIndex: ${res.statusCode}'); if (res.statusCode != 200) { final responseError = getResponseError(res); diff --git a/lib/src/streams/utils.dart b/lib/src/streams/utils.dart index b3e1388..c5464c1 100644 --- a/lib/src/streams/utils.dart +++ b/lib/src/streams/utils.dart @@ -93,7 +93,6 @@ TaskEither deepHashTaskEither( return TaskEither.tryCatch(() async { return await deepHash(inputs); }, (error, _) { - print(error); return DeepHashError(); }); }