Closed 314159265359879 closed 3 months ago
It may be worth contacting the developer since the PSBT may be badly formatted?
This is reproducible with wallet version 6.42.1 after all, I thought I already tested this with the latest wallet but it turned out to be on 6.42.0, and there it was still fine. This broke in the latest release (with the testnet fix):
The same error is displayed when trying to transfer tokens.
https://github.com/leather-wallet/extension/assets/33360391/9c4bc8aa-7ba8-49fc-afd0-e22fa99c5f4b
openstamp.io also mentioned reporting another signing issue earlier which came up from wallet version 6.41.1: #5015
@markmhendrickson @kyranjamie This is a prob again w/ the signer lib not supporting the 'ms' address type. We created a function getAddressFromOutScript
to get around it, but if you call Address.encode()
now, it is going to hit this error. I am trying to understand exactly where this changed, but in a recent commit there is now an added function for what we are doing here, but again, it isn't supporting the type 'ms' and hits the same error:
Current error using our custom function:
Using his function hits same error:
Commit adding the new function, but not release yet ...I just copied it to test: https://github.com/paulmillr/scure-btc-signer/commit/e1460341e88b161e99999b31697ab1f4401e0192
Hitting this error (trying to pinpoint when changed): https://github.com/paulmillr/scure-btc-signer/blob/bae4ac5ee1b442b20046052ecedd33ca32827e1a/src/payment.ts#L717
I don't know how to proceed here to support how these Stamps txs are being constructed? I think we still need the address for type 'ms' so we can't just ignore this? For type 'unknown' we just return 'unknown' to display in the UI, can we do the same for this case? 🤔 I wouldn't advise doing this.
The other issue linked above is hitting a similar error in the lib here: https://github.com/paulmillr/scure-btc-signer/blob/bae4ac5ee1b442b20046052ecedd33ca32827e1a/src/payment.ts#L244
I believe these txs just aren't being constructed in a way that the signer lib supports? These errors are in place for a reason?
Thanks for the research @fbwoolf.
The simplest fix here might be to just downgrade @scure/btc-signer
for now, if this unblocks the issue?
I wonder if it might be a good idea for us to use both signer libraries, with bitcoinjs-lib
as the fallback? This sounds like a bit of a hack, but might make for a more robust signing process. Developers use both libraries, so us using both would avoid any library-specific edge cases. We could get analytics on how/why txs fail with one and not the other.
I'm inclined not to straight swap btc-signer for bitcoinjs-lib as afaik this lib has issues with RN owing to its use of Buffer
, and might have the reverse problem of some edge case txs that work in signer but not bitcoinjs.
The fix is here in the mono repo. I need to install the change into the extension. We simply had an outdated fn in the mono repo and installed it back into the extension: https://github.com/leather-io/mono/pull/253
I have not been able to reproduce this issue. I went through several checks with the user, who used 6.42.1 and disabled other extensions on Chrome.
This error pops up when the user tries to buy any SRC token on the marketplace. And when they try to list an SRC-20 token, The list with the amount and unit price and confirm... then the error shows.
They see this error: