-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PE-3173: Utilize Turbo Uploads for Quick Sync #1362
Conversation
…ke it reusable PE-3173
Visit the preview URL for this PR (updated for commit 2ab486d): https://ardrive-web--pr1362-pe-3173-sku13v5z.web.app (expires Wed, 11 Oct 2023 19:01:41 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: a224ebaee2f0939e7665e7630e7d3d6cd7d0f8b0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a few commented codes we need to remove. Besides that, it looks good to me.
One important note for this feature is that in the future we will unify all the upload actions into a single component. Upload revisions (a file, or just rename or move actions), new files, snapshots, pins, etc.
This new component will abstract the entire logic for Turbo/AR, and the logic implemented here + upload will be unified into this component.
@@ -180,7 +212,7 @@ class CreateSnapshotCubit extends Cubit<CreateSnapshotState> { | |||
|
|||
Future<void> _prepareAndSignTx( | |||
SnapshotEntity snapshotEntity, | |||
Uint8List data, | |||
// Uint8List data, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
commented code.
@@ -191,10 +223,14 @@ class CreateSnapshotCubit extends Cubit<CreateSnapshotState> { | |||
)); | |||
|
|||
await prepareTx(isArConnectProfile); | |||
await _pst.addCommunityTipToTx(_preparedTx); | |||
// await _pst.addCommunityTipToTx(_preparedDataItem); // Turbo should be the one setting the tip, right? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we don't add the community tip in the client side for Turbo
final wallet = profile.wallet; | ||
|
||
final addr = await wallet.getAddress(); | ||
logger.d('Posting snapshot transaction with $addr'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the $addr
really required in this log? If not, consider removing it
@@ -28,6 +28,7 @@ class UploadPlan { | |||
required Map<String, FileDataItemUploadHandle> fileDataItemUploadHandles, | |||
required Map<String, FolderDataItemUploadHandle> | |||
folderDataItemUploadHandles, | |||
// required Map<String, UploadHandle> snapshotUploadHandles, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
commented code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
…n ar is not enough to upload PE-4665
PE-4665: Snapshot creation disabled without ARs
…method selector and not to be shown when turbo free uploads; makes the button be disabled when no balance PE-4676
…enough balance message PE-4676
…free thanks to turbo PE-4687
PE-4676: Issues around the balance for snapshot creation
PE-4687: Free snapshots aren't using Turbo as it's expected
… top up sucess PE-4694
…rect turbo balance PE-4694
…ake amount of turbo balance, and dry run for the topup PE-4694
…up success PE-4694
Co-authored-by: Thiago Carvalho <[email protected]>
PE-4694: Credit update issue during snapshot creation purchase
PE-3173: version bump of ardrive-ui
--- Releases ---
Android release: https://appdistribution.firebase.google.com/testerapps/1:305132849030:android:6cf0cd5ec064fad3ffce07/releases/6h36pno36ubd8