Skip to content
This repository has been archived by the owner on Jan 12, 2022. It is now read-only.

fix: comportement on new address with existing transaction in store #147

Merged
merged 4 commits into from
Jun 15, 2020

Conversation

Alex-Werner
Copy link
Contributor

Issue being fixed or feature implemented

When we import a transaction and one of it's constitutive element (input or output) impact and address that we own but are not yet aware of it (because it exceed the BIP44 spec on first run, for instance on an index 21).
We will submit for insertion again, but we where preventing any processing as we already had it.
This PR fixes that issue.

What was done?

  • refactored BIP44.ensureEnoughtAddress so utils are splitted in separate file
  • ensure importTransaction re-process a transaction on addresses that are not marked as already having it (address.transactions[])

How Has This Been Tested?

This specific case (us paying to ourself with a gap of address) were not included in test and will require to add it in our Tests improvement PR coming soon.

Breaking Changes

None.

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation

Copy link
Member

@shumkov shumkov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@Alex-Werner Alex-Werner merged commit b17c291 into master Jun 15, 2020
@Alex-Werner Alex-Werner deleted the fix/new-addr-on-existing-tx branch June 15, 2020 18:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants