Open woofbotapp opened 2 years ago
A few thoughts:
Perhaps we should add a new set of functions for to/fromOutputScript and deprecate the current ones for removal in the next major version bump?
As a temporary solution, though super hackey, the consuming app could do something like:
function wrappedFromOutputScript(script, network) {
const oldWarn = console.warn
console.warn = () => {}
const result = fromOutputScript(script, network)
console.warn = oldWarn
return result
}
As a temporary solution, though super hackey, the consuming app could do something like:
function wrappedFromOutputScript(script, network) { const oldWarn = console.warn console.warn = () => {} const result = fromOutputScript(script, network) console.warn = oldWarn return result }
Is there an ETA on this at all?
Is there an ETA on this at all?
Please help review this PR https://github.com/bitcoinjs/bitcoinjs-lib/pull/1742, and the rest will follow 🎵
This also happens when parsing some Litecoin transactions.
Maybe adding an optional argument in fromOutputScript
to disable these warnings?
I guess we can just do it once. See PR.
https://github.com/bitcoinjs/bitcoinjs-lib/blob/93af5afe67dbc491e36bdfc8d48a00179093f7d1/ts_src/address.ts#L52
I'm writing an app that continuously parses lots of transactions (for analysis purposes) This warning is printed every time such output-script is parsed, and it really spams my logs.
Please make it possible to avoid this warning, maybe via an environment variable. Another reasonable option is to print the warning only after the first time such an output-script is found, and not in following occurrences.
Thanks!