Skip to content
This repository has been archived by the owner on Mar 23, 2023. It is now read-only.

feat: persist unconfirmed transactions #660

Merged
merged 5 commits into from Dec 5, 2018

Conversation

alexbarnsley
Copy link
Member

@alexbarnsley alexbarnsley commented Dec 5, 2018

Proposed changes

(ignore the branch name - i'm considering this a feature instead of a fix)

The app now has a hardcoded 45 minute value for how long it takes for transactions to expire. This is set in core, and there's no endpoint that provides this value. I thought about adding a network modal field, but I didn't want it to confuse users when adding custom networks. It can be added in the future if it causes issues.

To sum up, an unconfirmed transaction is stored in the local database. This remains until the transaction is processed and received, or the 45 minute period ends. At this point it is removed from the local database. If a wallet is in view with a transaction that expires, it will get a strikethrough and remain the unconfirmed grey.

Resolves #644

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (improve a current implementation without adding a new feature or fixing a bug)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Build (changes that affect the build system)
  • Docs (documentation only changes)
  • Test (adding missing tests or fixing existing tests)
  • Other... Please describe:

Checklist

  • I have read the CONTRIBUTING documentation
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

@alexbarnsley
Copy link
Member Author

spelt "persist" wrong in my commit message 🤦‍♂️

@@ -1,5 +1,6 @@
exports.APP = {
website: 'https://ark.io'
website: 'https://ark.io',
transactionExpiryMinutes: 45
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe this can be set as a network property, so, when core provides the configuration, the transition would be straight

@faustbrian faustbrian merged commit cc195f0 into develop Dec 5, 2018
@faustbrian faustbrian deleted the fix/persist-unconfirmed-txs branch December 5, 2018 17:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Persist unconfirmed transactions, and clear if past the core expired time
3 participants