hdwallet icon indicating copy to clipboard operation
hdwallet copied to clipboard

fix: updated intanceof checks to allow Buffer intances

Open theoboldfrazier opened this issue 3 years ago • 3 comments

Due to polyfill of Buffer on webv2, the function fromB64ToArray was returning type Buffer, instead of Uint8Array. This was causing an error to be thrown and blocking decryption of a wallet.

This PR updates the checks to allow instanceof Buffer in addition to the existing ArrayBuffer and Uint8Array types.

theoboldfrazier avatar Apr 21 '22 21:04 theoboldfrazier

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
hdwallet ✅ Ready (Inspect) Visit Preview Jul 23, 2022 at 0:46AM (UTC)

vercel[bot] avatar Apr 21 '22 21:04 vercel[bot]

Double-checking; is this issue still relevant / can we close this?

mrnerdhair avatar Apr 28 '22 18:04 mrnerdhair

It seems to me that Buffer is a valid input to those functions, seeing as how no code changes were needed to support Buffer. I don't see a downside here.

cjthompson avatar May 12 '22 18:05 cjthompson

closing as stale.

0xean avatar Jan 29 '24 21:01 0xean