From 22d7a6f11d53bdfcb28959fb70fc93f1a1ab534f Mon Sep 17 00:00:00 2001 From: Thiago Carvalho Date: Fri, 1 Mar 2024 16:24:10 -0300 Subject: [PATCH 1/3] Update data_bundler_utils.dart --- packages/ardrive_uploader/lib/src/utils/data_bundler_utils.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/ardrive_uploader/lib/src/utils/data_bundler_utils.dart b/packages/ardrive_uploader/lib/src/utils/data_bundler_utils.dart index 660cdd435a..8f836e55d6 100644 --- a/packages/ardrive_uploader/lib/src/utils/data_bundler_utils.dart +++ b/packages/ardrive_uploader/lib/src/utils/data_bundler_utils.dart @@ -5,7 +5,7 @@ Future> createDataItemResultFromDataItemFiles( Wallet wallet, ) async { final List dataItemList = []; - final dataItemCount = dataItemList.length; + final dataItemCount = dataItems.length; for (var i = 0; i < dataItemCount; i++) { final dataItem = dataItems[i]; await createDataItemTaskEither( From 5461560f2e8fc325f7d49ecb13213fafa2a20a40 Mon Sep 17 00:00:00 2001 From: Thiago Carvalho Date: Fri, 1 Mar 2024 16:29:48 -0300 Subject: [PATCH 2/3] Update pubspec.yaml --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index 0c0e88ca83..368b346cb9 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -3,7 +3,7 @@ description: Secure, permanent storage publish_to: 'none' -version: 2.37.0 +version: 2.37.1 environment: sdk: '>=3.0.2 <4.0.0' From 7321ae6e815a02912519e831e5b8b582ec254fe3 Mon Sep 17 00:00:00 2001 From: Thiago Carvalho Date: Fri, 1 Mar 2024 19:38:58 -0300 Subject: [PATCH 3/3] fix(ar uploads) - dont add duplicated ciphers on tx --- packages/ardrive_uploader/lib/src/data_bundler.dart | 5 ++++- packages/ardrive_uploader/lib/src/upload_strategy.dart | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/ardrive_uploader/lib/src/data_bundler.dart b/packages/ardrive_uploader/lib/src/data_bundler.dart index f60e74e42f..519de3c2e8 100644 --- a/packages/ardrive_uploader/lib/src/data_bundler.dart +++ b/packages/ardrive_uploader/lib/src/data_bundler.dart @@ -32,6 +32,7 @@ abstract class DataBundler { required ARFSUploadMetadata metadata, required Wallet wallet, SecretKey? driveKey, + List? dataItemFiles, Function? onStartMetadataCreation, Function? onFinishMetadataCreation, Function? onStartBundleCreation, @@ -69,6 +70,7 @@ class DataTransactionBundler implements DataBundler { required IOFile file, required ARFSUploadMetadata metadata, required Wallet wallet, + List? dataItemFiles, SecretKey? driveKey, Function? onStartEncryption, Function? onStartBundling, @@ -77,7 +79,7 @@ class DataTransactionBundler implements DataBundler { Function? onStartBundleCreation, Function? onFinishBundleCreation, }) async { - final dataItemFiles = await createDataItemsForFile( + dataItemFiles ??= await createDataItemsForFile( file: file, metadata: metadata, wallet: wallet, @@ -336,6 +338,7 @@ class BDIDataBundler implements DataBundler { required Wallet wallet, SecretKey? driveKey, Function? onStartBundling, + List? dataItemFiles, Function? onStartMetadataCreation, Function? onFinishMetadataCreation, Function? onStartBundleCreation, diff --git a/packages/ardrive_uploader/lib/src/upload_strategy.dart b/packages/ardrive_uploader/lib/src/upload_strategy.dart index 619b44cad5..26b310dc4a 100644 --- a/packages/ardrive_uploader/lib/src/upload_strategy.dart +++ b/packages/ardrive_uploader/lib/src/upload_strategy.dart @@ -194,6 +194,7 @@ class UploadFileUsingBundleStrategy extends UploadFileStrategy { }) async { final bundle = await _dataBundler.createDataBundle( file: task.file, + dataItemFiles: dataItems, metadata: task.metadata, wallet: wallet, driveKey: task.encryptionKey,