Closed vsund closed 6 years ago
Fixed an error with this solution in https://github.com/ntzwrk/blockstack.ts/commit/d677b248e257ff861bd004c042fa5fe17fa5de2a
It's deprecated (like other Buffer constructors), but Buffers can take buffers as inputs. It just makes a copy: https://nodejs.org/api/buffer.html#buffer_new_buffer_buffer
Ah ok, thanks! Since it's deprecated, should I raise a PR against blockstack.js
or leave it as it is?
You can raise a PR -- should be a pretty direct conversion to just using the Buffer.from()
Thanks, did so: https://github.com/blockstack/blockstack.js/pull/395
In https://github.com/ntzwrk/blockstack.ts/commit/ae6bc6015fe2e3c5edbb414badc2f74c97e2b7b2 I fixed a potential doubly buffered input (
content
can be eitherstring
orBuffer
, but the constructor ofBuffer
only takesstring
as input type). Wondering now what would happen ifnew Buffer()
gets aBuffer
as input. Should we fix this inblockstack.js
or does this work?