symbol-sdk-typescript-javascript
symbol-sdk-typescript-javascript copied to clipboard
[DEP0005] DeprecationWarning: Buffer() is deprecated
- Expected behavior and actual behavior.
I got an error.
(node:83482) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
I think should use Buffer.from instead of new Buffer.
$ grep -nrE '[^a-zA-Z](Slow)?Buffer\s*\(' --exclude-dir node_modules/symbol-sdk/*
node_modules/symbol-sdk/dist/src/core/format/RawAddress.js:84: const ripemdHash = new ripemd160().update(new Buffer(publicKeyHash)).digest();
node_modules/symbol-sdk/src/core/format/RawAddress.ts:86: const ripemdHash = new ripemd160().update(new Buffer(publicKeyHash)).digest();
https://github.com/nemtech/symbol-sdk-typescript-javascript/blob/main/src/core/format/RawAddress.ts#L86
-
Steps to reproduce the problem.
-
Specifications like the version of the project, operating system, or hardware.
nodejs v10.24.0 sdk 0.23.2