novasamatech / nova-spektr

Nova Spektr — All-in-one Polkadot desktop wallet supporting multisigs, staking, light clients, and more
https://novaspektr.io
Apache License 2.0
40 stars 16 forks source link

Multisig. Error handling. Liquidity restriction check should be handle properly. #2690

Open stepanLav opened 5 days ago

stepanLav commented 5 days ago

Current validation shows Not enough tokens with explanation - Not enough tokens for paying multisig deposit and network fee on a selected account

but actually it triggers by condition balance.free >= balance.frozen after operation

Which may be hard to understand in case, when user has a big amount of frozen tokens, for example: Account 5EpsavEfPSZC8X2E4zHdJdepzpzfSccqNP5RUVyAU9Hyi3z4 has that balances:

{
  nonce: 932
  consumers: 3
  providers: 1
  sufficients: 0
  data: {
    free: 47,299,377,762,610
    reserved: 27,242,700,000,000
    frozen: 46,725,200,939,162
    flags: 170,141,183,460,469,231,731,687,309,040,608,171,718
  }
}

And run into liquidityrestrictions problem - https://westend.subscan.io/extrinsic/23518962-2 But for user its not quite clear why his 47+ WND not enough for pay fee and hold multisig deposit which in sum ~1.2 WND

Example:

Screenshot 2024-11-20 at 11 04 43 Screenshot 2024-11-20 at 11 04 13