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

Disable updateSSH on low balance #684

Merged
merged 2 commits into from
Jun 25, 2023

Conversation

zaelgohary
Copy link
Contributor

Description

Disable updateSSH on low balance

Related Issues

Checklist

  • Tests included
  • Build pass
  • Documentation
  • Code format and docstrings
  • Screenshots/Video attached (needed for UI changes)

@@ -271,7 +271,7 @@
color="primary"
variant="text"
@click="updateSSH"
:disabled="!ssh || profileManager.profile.ssh === ssh || updatingSSH"
:disabled="!ssh || profileManager.profile.ssh === ssh || updatingSSH || !isEnoughBalance(balance)"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
:disabled="!ssh || profileManager.profile.ssh === ssh || updatingSSH || !isEnoughBalance(balance)"
:disabled="!ssh || profileManager.profile.ssh === ssh || updatingSSH || !isEnoughBalance(balance, 0.001)"

Please update isEnoughBalance to take the balance and the amount to check for because right now no idea what is the enough balance without digging into isEnoughBalance ...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Wouldn't that leave room for error if the second param does not equal the lowest possible balance? The minimum balance should be the same in all cases and the suggested fix won't ensure that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added a minimum amount by default in isEnoughBalance.

@AhmedHanafy725 AhmedHanafy725 merged commit 000bfd6 into development Jun 25, 2023
@AhmedHanafy725 AhmedHanafy725 deleted the development_disable_update_SSH branch June 25, 2023 11:32
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.

3 participants