Closed TheCharlatan closed 6 years ago
Since the source code (tracked in the git tree) should be able to run the tool without any additional tools like node+npm (for browserify) directly in the browser, I think browserify should be run after every commit that changes the javascript files.
@stephaniestroka the constants can't be taken over with a simple conversion to a string, since the string needs to be a hexadecimal, however the javascript number type is a decimal, which will change the value, when it is parsed as a hexadecimal again.
Oh, that's right. Didn't pay attention. But num.toString(16)
should work. Have you tried that?
Edit: possibly with a slice.
I can also accept it as is, if you want to leave it, since it's better to have it working than to discuss how to perfectionate a minor thing (...given the current imperfect state of the code. On the other hand, I'm basically encouraging the "broken window"-effect in software engineering)
I tried for example BITCOIN_MAINNET_PRIVATE.toString(16)
, but got a value error.
The segwit accounts require special version bytes for electrum as specified here: https://github.com/pooler/electrum-ltc
Please review the first commit, it contains the changes. The second commit is a re-run of browserify.