LedgerHQ / ledgerjs

⛔️ MOVED to monorepo "ledger-live"
https://github.com/LedgerHQ/ledger-live
Apache License 2.0
574 stars 382 forks source link

[@ledgerHQ/hw-app-helium] fix bug in verify address mode #807

Closed allenan closed 2 years ago

allenan commented 2 years ago

This fixes a bug where an invalid address was being created from the return value of getAddress where display was true. The issue is that the buffer from the device returns extra data after the public key when the verify flag is true. We know the public key will always be 32 bytes, so we slice out that exact amount. The extra data will be removed in a future firmware release, but this will fix it in the current version and remain future proof

codecov[bot] commented 2 years ago

Codecov Report

Merging #807 (feaa18b) into master (1ec099d) will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #807   +/-   ##
=======================================
  Coverage   45.09%   45.09%           
=======================================
  Files          83       83           
  Lines        5060     5060           
  Branches      897      897           
=======================================
  Hits         2282     2282           
  Misses       2576     2576           
  Partials      202      202           
Impacted Files Coverage Δ
packages/hw-app-helium/src/Helium.ts 89.28% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 1ec099d...feaa18b. Read the comment docs.