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

Dont send withdraw tx if funds are not withdrawable yet #2636

Closed
bunghi opened this issue Feb 16, 2024 · 2 comments
Closed

Dont send withdraw tx if funds are not withdrawable yet #2636

bunghi opened this issue Feb 16, 2024 · 2 comments

Comments

@bunghi
Copy link

bunghi commented Feb 16, 2024

Checking bonds before running withdraw tx:

# namadac bonds --owner tnam1qycyxsy0k6d7nlklk656unaktnu4ju3j9q5fggzr
Last committed epoch: 7
Self-bonds from tnam1qycyxsy0k6d7nlklk656unaktnu4ju3j9q5fggzr:
  Remaining active bond from epoch 0: Δ 2621500.000000
Active (slashed) bonds total: 2621500.000000
Bonds total: 2621500.000000

Unbonded self-bonds from tnam1qycyxsy0k6d7nlklk656unaktnu4ju3j9q5fggzr:
  Withdrawable from epoch 12 (active from 0): Δ 10000.000000
Unbonded total: 10000.000000
Withdrawable total: 0.000000

All bonds total active: 2621500.000000
All bonds total: 2621500.000000
All unbonds total active: 10000.000000
All unbonds total: 10000.000000
All unbonds total withdrawable: 0.000000

There are 10000 unbonding tokens withdrawable only from epoch 12.
If i run the withdraw it says there are 10000 withdrawable and submits the tx:

# namadac withdraw --validator tnam1qycyxsy0k6d7nlklk656unaktnu4ju3j9q5fggzr
Looking-up public key of tnam1qycyxsy0k6d7nlklk656unaktnu4ju3j9q5fggzr from the ledger...
Found 10000.000000 tokens that can be withdrawn.
Submitting transaction to withdraw them...
Transaction added to mempool.
Wrapper transaction hash: B580F9FC39606CC6058C25951DB7CF9604CD150F88025A88EE98194600334067
Inner transaction hash: E2786A0E4A7F9FB3D4BC7AD257E662ECB4C2B69258DAA50DBDF576BEA3AC80C3
Wrapper transaction accepted at height 27348. Used 20 gas.
Waiting for inner transaction result...
Transaction was successfully applied at height 27349. Used 4205 gas.

Maybe it would be better to show a message that they cant be withdrawn yet and exit instead of sending the tx.

@aquariusluo
Copy link

aquariusluo commented Feb 26, 2024

There is very confused info "Found 10000.000000 tokens that can be withdrawn." like which can be withdrawn. Should quit and prompt not to tx atm.

@brentstone
Copy link
Collaborator

Thanks for reporting, this is indeed a bug! It will be addressed in #2748.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants