-
Notifications
You must be signed in to change notification settings - Fork 62
feat: utxo locking #112
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
feat: utxo locking #112
Conversation
rhyslbw
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was drafted in the previous review, but it must have been deleted when I thought I was de-duping responses.
0b6f39d to
4fd158b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work here @mkazlauskas . My review is still in progress, but submitting early for advanced notice. What does the withdrawal example look like positioned as an integration test? The need for an example is really just pointing out a gap in our tests, which gains us the assurance we cannot otherwise have with pure examples.
e42d9b0 to
3312fd5
Compare
rhyslbw
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Please squash into minimal commits, then we're ready to merge.
feat(wallet): implement InMemoryTransactionTracker
…to it refactor: change Provider.submitTx return type to Promise<void>, use ProviderError
…withdrawal.ts, enable coverage
…th availableUtxo set
refactor(wallet): change event-naming, rename trackTransaction->track, a few small improvements
d3c0e5b to
a5bc91f
Compare
Context
Need to provide functionality that wallets need to prevent double-spend attempts.
Proposed Solution
availableUtxosfield toUtxoRepositoryand implement it forInMemoryUtxoRepositoryInMemoryTransactionTrackerImportant Changes Introduced
flushPromisesutility function toutil-devpackage,cslToOgmios.txIntocorepackagetransactionUntrackedevent toInMemoryUtxoRepository. To recover user should attempt to call TransactionTracker.trackTransaction manually.MockProviderto usejest.fnforutxoDelegationAndRewardsand a few other provider functions.ProviderErrorand implement the conversion forblockfrostProvider.@typescript-eslint/no-floating-promisesand disable@typescript-eslint/no-var-requires(covered by unicorn/prefer-module)