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

[Snapps] Fix: Don't throw an exception on snapp commands with zero transfer #6133

Merged
merged 7 commits into from
Jan 27, 2021

Conversation

mrmr1993
Copy link
Member

Snapp commands may have 0 delta for both parties if there is a separate fee payer. This stops the code from throwing an exception.

The logic is still wrong: if a fee payment is given and different from either of the snapp accounts, the calculated total should be 0 regardless of the difference. Still, this is enough for now to make the snapp demo not fall at this hurdle.

Checklist:

  • Document code purpose, how to use it
    • Mention expected invariants, implicit constraints
  • Tests were added for the new behavior
    • Document test purpose, significance of failures
    • Test names should reflect their purpose
  • All tests pass (CI will check this if you didn't)
  • Serialized types are in stable-versioned modules
  • Does this close issues? List them:

@mrmr1993 mrmr1993 requested a review from a team as a code owner September 24, 2020 13:51
@mrmr1993 mrmr1993 changed the title Fix: Don't throw an exception on snapp commands with zero transfer [Snapps] Fix: Don't throw an exception on snapp commands with zero transfer Sep 24, 2020
@mrmr1993
Copy link
Member Author

Updated, turns out we need the more correct behaviour, so implemented that here.

@mrmr1993 mrmr1993 added the ci-build-me Add this label to trigger a circle+buildkite build for this branch label Nov 18, 2020
@mrmr1993 mrmr1993 changed the base branch from develop to compatible January 20, 2021 21:49
@mrmr1993 mrmr1993 merged commit 2e7f6f1 into compatible Jan 27, 2021
@mrmr1993 mrmr1993 deleted the fix/allow-zero-transfer-snapp-commands branch January 27, 2021 03:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-build-me Add this label to trigger a circle+buildkite build for this branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants