status-im / status-desktop

Status Desktop client made in Nim & QML
https://status.app
Mozilla Public License 2.0
301 stars 79 forks source link

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

Open anastasiyaig opened 2 days ago

anastasiyaig commented 2 days ago

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

https://github.com/user-attachments/assets/fb56501b-745e-4c18-9ddc-102b0af7e6f7

Generalresolution03 commented 1 day ago

Hello @anastasiyaig can you discuss this issue with the official support?

anastasiyaig commented 1 day ago

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

benjthayer commented 1 day ago

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 commented 1 day ago

@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 commented 1 day ago

@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 commented 1 day ago

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

Khushboo-dev-cpp commented 21 hours ago

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 commented 20 hours ago

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

Khushboo-dev-cpp commented 20 hours ago

@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