Skip to content
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-4676: Issues around the balance for snapshot creation #1385

Merged
merged 2 commits into from
Sep 27, 2023
Merged

Conversation

matibat
Copy link
Contributor

@matibat matibat commented Sep 26, 2023

Changes

  • Adds the insufficient balance message for snapshot creation.
    • Makes it not to be shown when free turbo uploads (same for file upload).
  • Makes the insufficient message for Turbo be displayed in the File Upload modal.
  • Makes the button be accordingly enabled/disabled.

--- Releases ---
Android release: https://appdistribution.firebase.google.com/testerapps/1:305132849030:android:6cf0cd5ec064fad3ffce07/releases/2hrepjq4mrcd0

…method selector and not to be shown when turbo free uploads; makes the button be disabled when no balance PE-4676
@matibat matibat self-assigned this Sep 26, 2023
@github-actions
Copy link

Visit the preview URL for this PR (updated for commit 1a2e618):

https://ardrive-web--pr1385-pe-4676-ehj8etbi.web.app

(expires Tue, 03 Oct 2023 21:04:46 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: a224ebaee2f0939e7665e7630e7d3d6cd7d0f8b0

Copy link
Contributor Author

@matibat matibat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Self-review checkpoint.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the reviewer - This was making the button enabled state not to be updated.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the reviewer - This was causing the state for Upload File to not detect when the upload method changed so the "insufficient message" wasn't being updated.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the reviewer - Now this component is also having the "insufficient balance" message.

@@ -136,7 +135,6 @@ class UploadForm extends StatefulWidget {

class _UploadFormState extends State<UploadForm> {
final _scrollController = ScrollController();
UploadMethod? _uploadMethod;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the reviewer - Unused variable

@@ -496,37 +492,32 @@ class _UploadFormState extends State<UploadForm> {
height: 8,
),
},
if (!state.isFreeThanksToTurbo)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the reviewer - Now it's not necessary to run this check because the Widget does it under the hood.

@@ -756,114 +747,4 @@ class _UploadFormState extends State<UploadForm> {
return const SizedBox();
},
);

Widget _getInsufficientBalanceMessage({
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the reviewer - Now this piece is also part of the PaymentMethodSelector component.

Copy link
Collaborator

@thiagocarvalhodev thiagocarvalhodev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@matibat matibat merged commit 51d4d63 into PE-3173 Sep 27, 2023
7 checks passed
@matibat matibat deleted the PE-4676 branch September 27, 2023 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants