You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
…saction cost (#1851)
# Goal
The goal of this PR is to fix a frequency-tx-payment bug to allow
capacity holders to transact when their free balance is less than the
minimum balance, or Existential Deposit (ED).
Closes#1850
# Discussion
- [x] `withdraw_fee` check updated to use `total_balance` instead of
`balance`, which ensures that if an account has capacity (`frozen` > 0)
but has no available balance (`free == frozen`) transactions are still
successful
- [x] Ensures that additional provider keys that have no ED cannot
transact successfully.
- [x] Add e2e-test that successfully claims a handle with 0 available
balance
# How to Test
- Ensure that e2e-tests complete successfully
# Checklist
- [x] Chain spec updated
- [ ] Custom RPC OR Runtime API added/changed? Updated js/api-augment.
- [ ] Design doc(s) updated
- [x] Tests added
- [ ] Benchmarks added
- [ ] Weights updated
---------
Co-authored-by: Matthew Orris <--help>
Co-authored-by: Joe Caputo <joseph.caputo@unfinished.com>
Scenario:
Account X
to createProvider X
Account X
has balance of 200 UNITsAccount X
Stakes toProvider X
199 UNITs (The max allowed as the system forces you to retain at least 1 UNIT when staking the max amount)Account X
then does some things that remove most/all of the 1 UNIT that is unfrozen.Account X
has minimal unfrozen tokensAccount X
then tries to do a Capacity Transaction onProvider X
that without Capacity would take MORE than the minimal unfrozen token balance1010 Invalid Transaction - Inability to pay some fees (e.g. account balance too low)
The text was updated successfully, but these errors were encountered: