From 9c5af0f2c2f14f3044f4ecb626885478c58bf2cd Mon Sep 17 00:00:00 2001 From: Thiago Carvalho <32248947+thiagocarvalhodev@users.noreply.github.com> Date: Mon, 18 Nov 2024 16:08:40 -0300 Subject: [PATCH] Update arweave_service.dart --- lib/services/arweave/arweave_service.dart | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/lib/services/arweave/arweave_service.dart b/lib/services/arweave/arweave_service.dart index 92ae0ee0d..208567b90 100644 --- a/lib/services/arweave/arweave_service.dart +++ b/lib/services/arweave/arweave_service.dart @@ -597,16 +597,18 @@ class ArweaveService { driveTx.getTag(EntityTag.driveId)!, ); - driveKey ??= await _crypto.deriveDriveKey( - wallet, - driveTx.getTag(EntityTag.driveId)!, - password, - ); + if (driveKey == null) { + driveKey = await _crypto.deriveDriveKey( + wallet, + driveTx.getTag(EntityTag.driveId)!, + password, + ); - _driveDao.putDriveKeyInMemory( - driveID: driveTx.getTag(EntityTag.driveId)!, - driveKey: driveKey, - ); + _driveDao.putDriveKeyInMemory( + driveID: driveTx.getTag(EntityTag.driveId)!, + driveKey: driveKey, + ); + } } try { final drive = await DriveEntity.fromTransaction(