Closed Overtorment closed 4 years ago
This is an issue with Electrum OR an issue with the base43 decoder.
https://github.com/bitcoin/bips/blob/master/bip-0174.mediawiki#specification
That base43 library looks super suspicious... I'd recommend against using it.
Yeah, that library is BS... broken.
Just use base-x (it's what we use for bs58 in bitcoinjs-lib, so you already have it as a dep.
thanks!
I encountered an issue with Electrum desktop 4.0.3. Displayed QR code with PSBT is:
1) base43 encoded (not a problem) 2) magic number
0x70736274
("psbt") is padded with0x00
.Why? I don't know, but if you throw it in bitcoinjs as is - it will choke.
I wrote simple unpad function, but I have a feeling that something is wrong.
Example:
(same on runkit: https://runkit.com/overtorment/5f805f125ba08e001c32f318 )
screenshot: (slightly different qr)