Polkadex-Substrate / Polkadex-Open-Beta

12 stars 3 forks source link

Cannot transfer tokens using "MAX" if user has some locked(staked) PDEX tokens #593

Open nashidahmed opened 11 months ago

nashidahmed commented 11 months ago

By raising this issue, I agree to the terms and conditions presented by Polkadex here: Terms and Conditions

Description

When the user has some amount of locked PDEX tokens, they cannot transfer tokens into the exchange using the "MAX" button. Doing so, will result in the "{“token”:”Frozen”}" error {token: Frozen} error

Steps to reproduce:

  1. Go to Balances page. The user should have some amount of staked PDEX tokens using this wallet.
  2. The locked tokens will display in the balances along with any unlocked balance.
  3. If the user has 20 locked tokens and 80 unlocked, clicking on max, populates the input with 100.
  4. Attempting to withdraw will result in the "{“token”:”Frozen”}" error.

Expected

The locked tokens should be accounted for and only the max unlocked tokens should be calculated on clicking "MAX". Another option would be to avoid displaying the locked tokens for transfer altogether since they cannot technically be transferred.

onchainaddress:{esoia6ocj8jC4Wq2mSeiCsXf1Z3eHqx7oHQ8hK8iPgHUYAmeC}