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 logic for letting the user execute the transaction based on available funds. #268

Merged
merged 4 commits into from
Sep 1, 2021

Conversation

hbulgarini
Copy link
Contributor

@hbulgarini hbulgarini commented Aug 30, 2021

Closes #262 .
Closes #267.

As described in the GH issue 262, this PR is actually implementing the following two behaviors:

  1. validate that native sender balance is enough to pay the fees.
  2. validate that sender companion balance is enough to deduct the amount.

Another enhancement introduced on this PR is that the enough funds calculation is now happening on the reducer logic 100% and there is a hook in the data model that triggers the update in case balance gets updated.

Also this PR solves the bug described in the #267 and now the fee is correctly deducted from the balance sender ( shows the same fee as polkadotjs )

@hbulgarini hbulgarini requested a review from wirednkod August 30, 2021 19:47
@hbulgarini hbulgarini merged commit e1bbd5c into master Sep 1, 2021
@hbulgarini hbulgarini deleted the hb-restrict-companion-balance-zero branch September 1, 2021 14:11
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.

Internal Transfer fee calculation. Transfer should not be allowed if account balances are insufficient.
1 participant