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

Max value is 0 when being on All Accounts and clicking send, having default account empty #16784

Open
anastasiyaig opened this issue Nov 20, 2024 · 9 comments
Labels
bug Something isn't working wallet-team
Milestone

Comments

@anastasiyaig
Copy link
Contributor

Description

Image

  1. create wallet account with funds
  2. open wallet
  3. click All accounts tab
  4. click asset you have balance for, for example ETH
  5. click send button

Result: MAX amount is 0, cant sent

Screen.Recording.2024-11-20.at.14.48.24.mov
@anastasiyaig
Copy link
Contributor Author

perhaps we need to disable send button for All accounts ? @benjthayer how to mitigate this?

@benjthayer
Copy link

perhaps we need to disable send button for All accounts ? @benjthayer how to mitigate this?

Hey @anastasiyaig the current logic is that when the Send dialog is invoked via All accounts -> Token detail, we default the account selection to the first in the users Wallet list. Which is why sometimes the max will be 0 even if the user holds that asset in other accounts - its all down to which account we default to.

We could default in this scenario to the account that holds the most of the relevant asset but it was thought at the time that creating more extensive logic for which account is selected would be more dev work and also cause some confusion to the user if they are not clear on why the default account keeps changing.

cc @Khushboo-dev-cpp

@anastasiyaig
Copy link
Contributor Author

@benjthayer but when you click Send when being on a screen with chart, like ETH, then we dont default to set "from" to any of accounts. pls check on the video

@benjthayer
Copy link

@benjthayer but when you click Send when being on a screen with chart, like ETH, then we dont default to set "from" to any of accounts. pls check on the video

Account 1 is the defaulted account no? Sorry think I might be misunderstanding the issue! 😂

Image

@anastasiyaig
Copy link
Contributor Author

no you are right :D you are correct, its fine, we indeed need to think of how we can handle the case when default account is empty :D

@anastasiyaig anastasiyaig changed the title Max value is 0 when being on All Accounts and and trying to send from Asset overview tab Max value is 0 when being on All Accounts and clicking send, having default account empty Nov 20, 2024
@Khushboo-dev-cpp
Copy link
Contributor

Khushboo-dev-cpp commented Nov 21, 2024

e current logic is that when the Send dialog is invoked via All accounts -> Token detail, we default the account selection to the first in the users Wallet list. Which is why sometimes the max will be 0 even if the user holds that asset in other accounts - its all down to which account we default to.

We could default in this scenario to the account that holds the most of the relevant asset but it was thought at the time that creating more extensive logic for which account is selected would be more dev work and also cause some confusion to the user if they are not clear on why the default account keeps changing.

@benjthayer @anastasiyaig yes we thought, switching accounts based on which accounts holds most tokens might be confusing, hence this logic. @benjthayer maybe we can choose the account to most balance and show a toast message that says account with most balance has been selected as sender.?

@anastasiyaig
Copy link
Contributor Author

@Khushboo-dev-cpp we need to default to account with balance that you can send from, so sender, not recipient

@Khushboo-dev-cpp
Copy link
Contributor

@Khushboo-dev-cpp we need to default to account with balance that you can send from, so sender, not recipient

Aaah silly me, I updated my comment! I meant sender

@benjthayer
Copy link

e current logic is that when the Send dialog is invoked via All accounts -> Token detail, we default the account selection to the first in the users Wallet list. Which is why sometimes the max will be 0 even if the user holds that asset in other accounts - its all down to which account we default to.
We could default in this scenario to the account that holds the most of the relevant asset but it was thought at the time that creating more extensive logic for which account is selected would be more dev work and also cause some confusion to the user if they are not clear on why the default account keeps changing.

@benjthayer @anastasiyaig yes we thought, switching accounts based on which accounts holds most tokens might be confusing, hence this logic. @benjthayer maybe we can choose the account to most balance and show a toast message that says account with most balance has been selected as sender.?

Yeah Im inclined to agree, @Khushboo-dev-cpp thinking on it. I'm not sure we need the toast though - when the user clicks on the account dropdown, they will see that it is the account with the highest value of the selected token that has been selected for them:
https://www.figma.com/design/FkFClTCYKf83RJWoifWgoX/Wallet-v2?node-id=25193-64032&t=1ThWg0e78q6kxv8z-4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wallet-team
Projects
Status: No status
Development

No branches or pull requests

4 participants
@Khushboo-dev-cpp @anastasiyaig @benjthayer and others