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: move wallet manager "zero balance" check to transaction handlers #2896

Merged
merged 14 commits into from
Aug 30, 2019

Conversation

air1one
Copy link
Contributor

@air1one air1one commented Aug 29, 2019

Move the database wallet manager "zero balance" check to transaction handlers.

Fixes issue with HTLC transactions where we authorize a sender to send HTLC claim or refund transaction with no balance.

Added e2e tests for htlc claim and refund.

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Refactor
  • Performance
  • Tests
  • Build
  • Documentation
  • Code style update
  • Continuous Integration
  • Other, please describe:

Does this PR introduce a breaking change?

  • Yes
  • No

Does this PR release a new version?

  • Yes
  • No

If yes, please describe the impact and migration path for existing applications:

The PR fulfills these requirements:

  • It's submitted to the develop branch, not the master branch
  • All tests are passing
  • New/updated tests are included

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)

@codecov-io
Copy link

codecov-io commented Aug 29, 2019

Codecov Report

Merging #2896 into develop will decrease coverage by 0.03%.
The diff coverage is 40%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #2896      +/-   ##
===========================================
- Coverage    68.12%   68.08%   -0.04%     
===========================================
  Files          405      405              
  Lines         9734     9733       -1     
  Branches       459      460       +1     
===========================================
- Hits          6631     6627       -4     
- Misses        3067     3069       +2     
- Partials        36       37       +1
Impacted Files Coverage Δ
...ages/core-transactions/src/handlers/transaction.ts 63.33% <0%> (-2.19%) ⬇️
...ckages/core-transaction-pool/src/wallet-manager.ts 100% <100%> (ø) ⬆️
packages/core-transactions/src/errors.ts 85.71% <50%> (-1.06%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e03846d...1ced933. Read the comment docs.

spkjp
spkjp previously approved these changes Aug 30, 2019
@spkjp spkjp self-requested a review August 30, 2019 23:13
@spkjp spkjp merged commit 8c773da into develop Aug 30, 2019
@ghost ghost deleted the fix/wallet-manager branch August 30, 2019 23:14
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

4 participants