LedgerHQ / app-bitcoin-new

Modern Bitcoin Application based on PSBT and Descriptors
Apache License 2.0
93 stars 69 forks source link

Improve and refactor logic for standard wallet checking #182

Closed bigspider closed 1 year ago

bigspider commented 1 year ago

Fixes a bug where some non-default policies would be accepted as default.

Meanwhile, also refactors and simplifies the logic to verify if a policy is standard (reducing code duplication between get_wallet_address and sign_psbt, and updates the docs on wallet policies to the latest (testnet) deployed version.

codecov-commenter commented 1 year ago

Codecov Report

Patch coverage has no change and project coverage change: +0.52 :tada:

Comparison is base (0cf8c4d) 83.97% compared to head (da36777) 84.50%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #182 +/- ## =========================================== + Coverage 83.97% 84.50% +0.52% =========================================== Files 17 17 Lines 2191 2162 -29 =========================================== - Hits 1840 1827 -13 + Misses 351 335 -16 ``` | Flag | Coverage Δ | | |---|---|---| | unittests | `84.50% <ø> (+0.52%)` | :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=LedgerHQ#carryforward-flags-in-the-pull-request-comment) to find out more. | [Impacted Files](https://app.codecov.io/gh/LedgerHQ/app-bitcoin-new/pull/182?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=LedgerHQ) | Coverage Δ | | |---|---|---| | [src/common/bip32.c](https://app.codecov.io/gh/LedgerHQ/app-bitcoin-new/pull/182?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=LedgerHQ#diff-c3JjL2NvbW1vbi9iaXAzMi5j) | `88.52% <ø> (+14.08%)` | :arrow_up: |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

sonarcloud[bot] commented 1 year ago

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 4 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint