osmosis-labs / osmosis-frontend

Web interface for Osmosis Zone
https://app.osmosis.zone/
Apache License 2.0
230 stars 416 forks source link

Deposit function on Assets page includes vested tokens #168

Closed JeremyParish69 closed 2 years ago

JeremyParish69 commented 2 years ago

Problem

The Deposit link on the Assets page includes vested tokens, making IBC transactions fail. It can be difficult for users to troubleshoot since even Keplr extension shows vested tokens as 'Available' and Mintscan will first show the total balance. Only once you manually subtract the vested balance (or look at 'Available' on Mintscan) can you determine what the real available balance is.

I noticed this today with LUM where many users' tokens are vested from the Airdrop.

Solution

Make it easy on users by having the Deposit function subtract vested tokens so transfers user don't get confused and IBC txs stop failing.

dogemos commented 2 years ago

There's not a easy way to calculate the amount of loose vs vested tokens with the current bank/balances query. Feel like there could be a separate query (potentially from the Cosmos SDK itself) to get a summarized balance of vested/non-liquid tokens.

cc @ValarDragon

ValarDragon commented 2 years ago

Should be on the hub right now, using GetSpendableCoins query

jonator commented 2 years ago

Haven't heard of issue being a problem to users