bitcoin-sv / spv-wallet

Open-source non-custodial hosted wallet for the BSV Blockchain (UTXOs, xPubs, Paymail & More!)
https://docs.bsvblockchain.org/network-topology/applications/spv-wallet
MIT License
51 stars 15 forks source link

feat(SPV-1160): new record outline endpoint with actual repository for op_return txs #777

Open chris-4chain opened 1 week ago

chris-4chain commented 1 week ago

This pull request introduces several new functionalities and improvements to the SPV Wallet project, particularly focusing on transaction recording and testing capabilities. The key changes include the addition of new services, interfaces, and test fixtures to support transaction recording and handling.

Transaction Recording Enhancements:

Testing Improvements:

Code Refactoring:

These enhancements significantly improve the functionality and testability of the SPV Wallet project, especially in terms of handling and recording transaction data.

Pull Request Checklist

github-actions[bot] commented 1 week ago

Manual Tests

:information_source: Remember to ask team members to perform manual tests and to assign tested label after testing.

codecov-commenter commented 1 week ago

:warning: Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 70.76023% with 50 lines in your changes missing coverage. Please review.

Project coverage is 45.16%. Comparing base (18e6389) to head (dec5784).

Files with missing lines Patch % Lines
engine/testabilities/testmode/db_mode.go 33.33% 12 Missing :warning:
...ransaction/record/testabilities/mock_repository.go 0.00% 10 Missing :warning:
...ping/annotatedtx/annotated_tx_request_to_engine.go 66.66% 6 Missing and 1 partial :warning:
engine/database/dao/transactions.go 78.57% 4 Missing and 2 partials :warning:
...ansaction/record/testabilities/mock_broadcaster.go 0.00% 5 Missing :warning:
engine/client.go 0.00% 2 Missing and 1 partial :warning:
engine/client_transaction.go 0.00% 3 Missing :warning:
engine/testabilities/fixture_engine.go 0.00% 1 Missing and 2 partials :warning:
engine/client_internal.go 90.90% 0 Missing and 1 partial :warning:
Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/bitcoin-sv/spv-wallet/pull/777/graphs/tree.svg?width=650&height=150&src=pr&token=1lMo440mSU&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bitcoin-sv)](https://app.codecov.io/gh/bitcoin-sv/spv-wallet/pull/777?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bitcoin-sv) ```diff @@ Coverage Diff @@ ## main #777 +/- ## ========================================== + Coverage 44.88% 45.16% +0.28% ========================================== Files 350 358 +8 Lines 17217 17360 +143 ========================================== + Hits 7727 7841 +114 - Misses 8922 8949 +27 - Partials 568 570 +2 ``` | [Flag](https://app.codecov.io/gh/bitcoin-sv/spv-wallet/pull/777/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bitcoin-sv) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/bitcoin-sv/spv-wallet/pull/777/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bitcoin-sv) | `45.16% <70.76%> (+0.28%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bitcoin-sv#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files with missing lines](https://app.codecov.io/gh/bitcoin-sv/spv-wallet/pull/777?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bitcoin-sv) | Coverage Δ | | |---|---|---| | [...ons/testabilities/fixture\_spvwallet\_application.go](https://app.codecov.io/gh/bitcoin-sv/spv-wallet/pull/777?src=pr&el=tree&filepath=actions%2Ftestabilities%2Ffixture_spvwallet_application.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bitcoin-sv#diff-YWN0aW9ucy90ZXN0YWJpbGl0aWVzL2ZpeHR1cmVfc3B2d2FsbGV0X2FwcGxpY2F0aW9uLmdv) | `75.55% <100.00%> (+1.13%)` | :arrow_up: | | [actions/transactions/outlines\_record.go](https://app.codecov.io/gh/bitcoin-sv/spv-wallet/pull/777?src=pr&el=tree&filepath=actions%2Ftransactions%2Foutlines_record.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bitcoin-sv#diff-YWN0aW9ucy90cmFuc2FjdGlvbnMvb3V0bGluZXNfcmVjb3JkLmdv) | `100.00% <100.00%> (ø)` | | | [actions/transactions/routes.go](https://app.codecov.io/gh/bitcoin-sv/spv-wallet/pull/777?src=pr&el=tree&filepath=actions%2Ftransactions%2Froutes.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bitcoin-sv#diff-YWN0aW9ucy90cmFuc2FjdGlvbnMvcm91dGVzLmdv) | `100.00% <100.00%> (ø)` | | | [engine/database/data.go](https://app.codecov.io/gh/bitcoin-sv/spv-wallet/pull/777?src=pr&el=tree&filepath=engine%2Fdatabase%2Fdata.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bitcoin-sv#diff-ZW5naW5lL2RhdGFiYXNlL2RhdGEuZ28=) | `100.00% <ø> (ø)` | | | [engine/database/models.go](https://app.codecov.io/gh/bitcoin-sv/spv-wallet/pull/777?src=pr&el=tree&filepath=engine%2Fdatabase%2Fmodels.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bitcoin-sv#diff-ZW5naW5lL2RhdGFiYXNlL21vZGVscy5nbw==) | `100.00% <100.00%> (ø)` | | | [engine/database/output.go](https://app.codecov.io/gh/bitcoin-sv/spv-wallet/pull/777?src=pr&el=tree&filepath=engine%2Fdatabase%2Foutput.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bitcoin-sv#diff-ZW5naW5lL2RhdGFiYXNlL291dHB1dC5nbw==) | `100.00% <100.00%> (ø)` | | | [engine/database/tracked\_transaction.go](https://app.codecov.io/gh/bitcoin-sv/spv-wallet/pull/777?src=pr&el=tree&filepath=engine%2Fdatabase%2Ftracked_transaction.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bitcoin-sv#diff-ZW5naW5lL2RhdGFiYXNlL3RyYWNrZWRfdHJhbnNhY3Rpb24uZ28=) | `100.00% <100.00%> (ø)` | | | [engine/definitions.go](https://app.codecov.io/gh/bitcoin-sv/spv-wallet/pull/777?src=pr&el=tree&filepath=engine%2Fdefinitions.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bitcoin-sv#diff-ZW5naW5lL2RlZmluaXRpb25zLmdv) | `100.00% <100.00%> (ø)` | | | [engine/testabilities/fixture\_arc.go](https://app.codecov.io/gh/bitcoin-sv/spv-wallet/pull/777?src=pr&el=tree&filepath=engine%2Ftestabilities%2Ffixture_arc.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bitcoin-sv#diff-ZW5naW5lL3Rlc3RhYmlsaXRpZXMvZml4dHVyZV9hcmMuZ28=) | `100.00% <100.00%> (ø)` | | | [engine/transaction/record/record\_outline.go](https://app.codecov.io/gh/bitcoin-sv/spv-wallet/pull/777?src=pr&el=tree&filepath=engine%2Ftransaction%2Frecord%2Frecord_outline.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bitcoin-sv#diff-ZW5naW5lL3RyYW5zYWN0aW9uL3JlY29yZC9yZWNvcmRfb3V0bGluZS5nbw==) | `90.10% <100.00%> (ø)` | | | ... and [10 more](https://app.codecov.io/gh/bitcoin-sv/spv-wallet/pull/777?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bitcoin-sv) | | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/bitcoin-sv/spv-wallet/pull/777/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bitcoin-sv) ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/bitcoin-sv/spv-wallet/pull/777?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bitcoin-sv). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bitcoin-sv) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/bitcoin-sv/spv-wallet/pull/777?dropdown=coverage&src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bitcoin-sv). Last update [18e6389...dec5784](https://app.codecov.io/gh/bitcoin-sv/spv-wallet/pull/777?dropdown=coverage&src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bitcoin-sv). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bitcoin-sv).