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

Transferable balance is incorrect #9988

Closed
2 of 10 tasks
michalisFr opened this issue Oct 27, 2023 · 9 comments · Fixed by #10842
Closed
2 of 10 tasks

Transferable balance is incorrect #9988

michalisFr opened this issue Oct 27, 2023 · 9 comments · Fixed by #10842
Labels

Comments

@michalisFr
Copy link

  • I'm submitting a ...
  • Bug report
  • Feature request
  • Support request
  • Other
  • What is the current behavior and expected behavior?

Transferable balance seems to be calculated incorrectly. After the merging of this PR, reducible is calculated as indicated here.

It seems transferable is calculated with the deprecated:
transferable = free - reserved - max(feeFrozen, miscFrozen)

  • What is the motivation for changing the behavior?

Display transferable balance properly.

Perhaps free balance should also be displayed because it can be used for holds (aka reserves) even if transferable is insufficient.

  • Please tell us about your environment:
  • Version: apps v0.132.2-134

  • Environment:

    • Node.js
    • Browser
    • Other (limited support for other environments)
  • Language:

    • JavaScript
    • TypeScript (include tsc --version)
    • Other
@Albertpolkadot
Copy link

Hello @IkerAlus & @TarikGul ,

Today, I encountered a critical issue while attempting to submit a proposal. After creating a pre-image, I noticed that my transferrable balance was showing as 0 DOT.

In an attempt to rectify this, I initiated a transaction of 20 DOT from another wallet to my identified wallet. However, even after completing the transaction, my transferrable balance remains unchanged. Subscan indicates that the transaction was successfully processed, as seen here.

Captura de pantalla 2024-04-19 122056

This issue is particularly urgent as I urgently need to submit two proposals on Polkassembly and create and sign child bounties within the next 10 days. Unfortunately, my account is currently frozen, preventing me from proceeding with these crucial tasks.

Thanks!

@IkerAlus
Copy link

Hi @Albertpolkadot I fail to understand, why is the fact that the transferable balance is not showed correctly in the UI preventing you from submitting your transactions as usual?

Also, Subscan reports that the transferable balance is 0 DOT for this account too:

Screenshot 2024-04-19 at 11 45 59

@Albertpolkadot
Copy link

Hi @IkerAlus,

Yes, this is the problem, I sent 20 Dots to my wallet, but I can't see these 20 DOTS that they should be free...

image

@TarikGul
Copy link
Member

@Albertpolkadot Hey I am looking into this now. Can you post a picture of the UI where it says your transferable balance is zero. I am currently trying to trace down the root of this and that would help a lot.

@TarikGul
Copy link
Member

TarikGul commented Apr 19, 2024

@TarikGul
Copy link
Member

@Albertpolkadot To add to what @IkerAlus is saying as well, even if the displayed transferable is incorrect in the UI, that shouldn't stop you from sending an extrinsic through the extrinsic page since the on chain data is still correct.

@michalisFr
Copy link
Author

michalisFr commented Apr 22, 2024

@TarikGul @Albertpolkadot @IkerAlus

The fee_payment pallet hasn't migrated to fungibles yet AFAIK, so although the funds are there (based on the new calculation) the pallet thinks the reducible balance is zero because it calculates it with the previous formula: transferable = free - max(frozen, reserved). From what I see, this PR was merged 3 weeks ago, so it should be in the next runtime upgrade.

So, although according to the balances pallet the transferable isn't zero, if the UI is updated before the updated fee_payment pallet is in the runtime, transactions might still fail with the insufficient_funds error.

A list of all pallets that need migration is here, but I don't know how updated the tracking is.

What you Albert can do, if you want to transfer those funds out, is deposit enough DOT to bring the free balance above zero based on the previous calculation, and then you'll be able to transfer all transferable balance with a transfer_all call.

@TarikGul
Copy link
Member

This has been fixed in the API level and will be fixed in apps this week.

@polkadot-js-bot
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue if you think you have a related problem or query.

@polkadot-js polkadot-js locked as resolved and limited conversation to collaborators Aug 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

Successfully merging a pull request may close this issue.

5 participants