Unable to send BTC to taproot addresses
Overview
Currently being reported by users in both MetaMask and Mobile and able to be recreated by Ops with native. In production, users are unable to send to BTC taproot addresses, however the app allows users to go through the transaction building flow resulting in an error and not a successful transaction
References and additional details
https://github.com/shapeshift/web/assets/94998097/e97d0e9b-5f0d-476b-920f-a7bd729b4b4e
Screen recording of the error in action^
Recreation steps:
- Find taproot style BTC address to test a send to (I used Coolwallet)
- Attempt a BTC send to that taproot address for any amount of funds.
- Witness the errors in the console log when the address is entered.
- Continue to attempt to broadcast the transaction and witness the 'User rejected the transaction' error.
Error from logs
unstoppable-domains.ts:79 Error: invalid address (argument="address", value="bc1pxk2u9kjszfzxqmsrcctvst32dn2pqrlptsw0e7wqumhlq9cl35ks9v5kh2", code=INVALID_ARGUMENT, version=address/5.7.0) (argument="addr", value="bc1pxk2u9kjszfzxqmsrcctvst32dn2pqrlptsw0e7wqumhlq9cl35ks9v5kh2", code=INVALID_ARGUMENT, version=abi/5.7.0) at u.makeError (index.ts:224:23) at u.throwError (index.ts:233:20) at u.throwArgumentError (index.ts:236:21) at i._throwError (abstract-coder.ts:38:16) at i.encode (address.ts:17:18) at array.ts:57:19 at Array.forEach (Acceptance Criteria
Users are either able to send to taproot BTC addresses, or users are properly warned when entering a taproot address that their transactions cannot be completed to that address type.
Need By Date
No response
Screenshots/Mockups
No response
Estimated effort
No response
From @gomesalexandre in discord: "Yeah pretty sure we don't support sending to P2TR, should be super easy to detect and we could add some error messaging and disabled state early on!"
holding on a fix since we are contemplating taproot at the product level for the moment.