Closed shortthefomo closed 1 year ago
Can you see which submodule (file path) triggers it?
not sure how to find that but as soon as i add const lib = require('xrpl-accountlib')
im getting that warning.
I tried adding --trace-deprecation
to the scripts in the package but that then complains that it does not know what param that is.
npx ncc build
is doing the trans compile there.
I checked the source of the lib. and I can't find the use of Buffer as a constructor;
generate/familySeed.ts: entropy?: Buffer | Uint8Array;
utils/index.ts:function bufferToHext(buffer: Buffer): string {
utils/index.ts: return Buffer.from(nonCanonicalDer).toString("hex").toUpperCase();
What kind of secret type (mnemonic, family seed, ... ) are you using when you get this error?
thats the thing, i dont even need to have accountSetup(ctx)
and it throws the warning as soon as i add const lib = require('xrpl-accountlib')
don't even use it just declare it the warning is printed from the contract.
figured out this is part of Evernodes issue after being able to dump the stack trace.
FYI, Found the source of this one @WietseWind its the secret libs codec thats used.
Thanks, that's some nice digging!
Created a PR: https://github.com/professorhantzen/ripple-secret-codec/pull/2
If merged & published to npm: great, otherwise I'll incorporate the updated version in xrpl-accountlib
soon.
Merged :) Updated ripple-secret-codec@1.0.3 is now included in the just published xrpl-accountlib@1.5.3
:)
Using this lib with evernode im getting the following warning.
im guessing this is due to the trans compilation.
DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead