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

fix locked balance as fee #2105

Merged
merged 2 commits into from
May 11, 2022
Merged

fix locked balance as fee #2105

merged 2 commits into from
May 11, 2022

Conversation

zqhxuyuan
Copy link
Contributor

@zqhxuyuan zqhxuyuan commented May 11, 2022

Current, we use free balance which containts locked part to decide whether the user have enough native asset. If user locked most of native asset, and left transferable native asset less than ED. then withdraw those native asset will failed. Also, this would't use other token as fee payment. because current we either choose native asset if native asset is enough(in this case it's true) or other token if native asset is not enough.

if fee.saturating_add(native_existential_deposit) <= total_native {
None

@zqhxuyuan zqhxuyuan requested a review from xlc May 11, 2022 09:50
@zqhxuyuan zqhxuyuan changed the title locked balance not as fee fix locked balance as fee May 11, 2022
@zqhxuyuan zqhxuyuan merged commit 9f11fa6 into master May 11, 2022
@zqhxuyuan zqhxuyuan deleted the fix_locked_charge_fee branch May 11, 2022 11:45
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

Successfully merging this pull request may close these issues.

None yet

2 participants