extension: openPsbtRequestPopup throws unknown address type
Hiro Web Wallet 6.2.1 Browser Chrome, Firefox
This PSBT uses segwit address for inputs and pays to the taproot sBTC Alpha wallet (tb1qrjgzx3w697f65cz9qdxrsxs0v35ypqk7mqmm9v) triggers the (Unknown address type) error below;
70736274ff0100a00200000001782ba5d65b8551a99228b8d77e4989cf6ef6a197827d13b6d1dc3e8ba3d8e77f0100000000ffffffff0300000000000000001a6a1858323c1a7010183fd1a76976e7b2bb67acdf57cdfe704882dd89000000000000225120b8c8b0652cb2851a52374c7acd47181eb031e8fa5c62883f636e0d4fe695d6caecd70c000000000016001409c7efcd51a08da9b4e38345645866c2a270eb39000000000001011fb7700d00000000001600141c902345da2f93aa6045034c381a0f64684082de00000000
But loads and allows signing with Electrum.
Also tried with this PSBT using wallets cardinal address for inputs with. Throws same error in wallet but loads fine in Electrum
70736274ff0100a002000000017ab0408cd8a95eb821244c67f4924b00c44a4567ca9954cc97d08cddd3e84ef10000000000ffffffff0300000000000000001a6a1858323c1a7010183fd1a76976e7b2bb67acdf57cdfe704882dd89000000000000225120b8c8b0652cb2851a52374c7acd47181eb031e8fa5c62883f636e0d4fe695d6cac42b0f000000000016001409c7efcd51a08da9b4e38345645866c2a270eb39000000000001011f95c40f000000000016001409c7efcd51a08da9b4e38345645866c2a270eb3900000000
Unexpected Application Error!
Unknown address type=unknown
Error: Unknown address type=unknown
at Object.encode (chrome-extension://ldinpeekobnhjjdofggfgjlcehhmanlj/997.js:194768:19)
at getAddressFromOutScript (chrome-extension://ldinpeekobnhjjdofggfgjlcehhmanlj/index.js:43693:93)
at chrome-extension://ldinpeekobnhjjdofggfgjlcehhmanlj/index.js:20333:76
at Array.map (<anonymous>)
at chrome-extension://ldinpeekobnhjjdofggfgjlcehhmanlj/index.js:20328:42
at Object.useMemo (chrome-extension://ldinpeekobnhjjdofggfgjlcehhmanlj/997.js:142995:189)
at exports.useMemo (chrome-extension://ldinpeekobnhjjdofggfgjlcehhmanlj/997.js:147846:208)
at useParsedOutputs (chrome-extension://ldinpeekobnhjjdofggfgjlcehhmanlj/index.js:20328:27)
at useParsedPsbt (chrome-extension://ldinpeekobnhjjdofggfgjlcehhmanlj/index.js:20469:25)
at PsbtRequestDetails (chrome-extension://ldinpeekobnhjjdofggfgjlcehhmanlj/index.js:21266:7)
at Xh (chrome-extension://ldinpeekobnhjjdofggfgjlcehhmanlj/997.js:142978:137)
at Wk (chrome-extension://ldinpeekobnhjjdofggfgjlcehhmanlj/997.js:143101:337)
at Vk (chrome-extension://ldinpeekobnhjjdofggfgjlcehhmanlj/997.js:143091:389)
at Uk (chrome-extension://ldinpeekobnhjjdofggfgjlcehhmanlj/997.js:143091:320)
at Jk (chrome-extension://ldinpeekobnhjjdofggfgjlcehhmanlj/997.js:143091:180)
at Ok (chrome-extension://ldinpeekobnhjjdofggfgjlcehhmanlj/997.js:143082:88)
at Fk (chrome-extension://ldinpeekobnhjjdofggfgjlcehhmanlj/997.js:143084:300)
at jg (chrome-extension://ldinpeekobnhjjdofggfgjlcehhmanlj/997.js:142938:105)
at Xk (chrome-extension://ldinpeekobnhjjdofggfgjlcehhmanlj/997.js:143094:470)
at Qk (chrome-extension://ldinpeekobnhjjdofggfgjlcehhmanlj/997.js:143092:398)
at Hk (chrome-extension://ldinpeekobnhjjdofggfgjlcehhmanlj/997.js:143081:269)
at J (chrome-extension://ldinpeekobnhjjdofggfgjlcehhmanlj/997.js:155372:203)
at MessagePort.R (chrome-extension://ldinpeekobnhjjdofggfgjlcehhmanlj/997.js:155373:128)
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 34 (11 by maintainers)
Looks good to me @fbwoolf. Thanks again !
Hey @mica000 - Bitcoin allows unspendable outputs (signified with the OP_RETURN op code). They generally have a value of 0 and allow an 80 byte payload of data that is meaning full to some external protocol - sBTC in my case.
I also agree with @fbwoolf solution to hide these outputs. This makes sense as they don’t move BTC around and the details are still available in the other tab.
Awesome thank you - will test it over the weekend !
Update… I just tried signing a psbt from a different application and the error was not thrown - investigating this now…
Yep I’m okay with simply hiding if we don’t expect the user to benefit from seeing it
Hi Mark, yes the use case is deposit / withdrawal from sBTC protocol use op_return to store the payloads. Transaction generated by sBTC bridge are likely to have a mixture of outputs of type ‘unkown’ along with spendable outputs. The issue here was that yhe wallet tried to display an address for usability purposes for each output but unknown output have no address.
I think Fara solution of labelling them unknown works but might be confusing for users. They could be labelled ‘data’ or ‘unspendable’ etc. Not my forte!
@radicleart I made a PR you can test with the change. I was able to get past the error with your hex posted above. https://github.com/leather-wallet/extension/pull/4168
Link to build: https://github.com/leather-wallet/extension/actions/runs/6052120932
Ah yes - looks like he deprecated
allowUnknownOutput
in favour ofallowUnknownOutputs
in recent update.Will update everything and let you know - thanks !
Hi @fbwoolf, does this problem originate in scure-btc-signer ?
Can you raise an Issue for Paul if so please ? It’s hard for us to do this without knowing the internals of the wallet interaction with Millers code and this is high priority right now as its effects the upcoming release of sBTC.
NB @kenrogers !
Tested with segwit address in Electrum and able to sign and broadcast
Xverse signs and sends on first attempt but fails on second - perhaps because I couldn’t work out the right redeem script.