shapeshift / web

ShapeShift Web
https://app.shapeshift.com
MIT License
174 stars 187 forks source link

Unable to send BTC to taproot addresses #6761

Open purelycrickets opened 7 months ago

purelycrickets commented 7 months ago

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:

  1. Find taproot style BTC address to test a send to (I used Coolwallet)
  2. Attempt a BTC send to that taproot address for any amount of funds.
  3. Witness the errors in the console log when the address is entered.
  4. 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 () at u (array.ts:43:12) at k.encode (tuple.ts:51:16) at R.encode (abi-coder.ts:86:15) f @ unstoppable-domains.ts:79 await in f (async) k @ address.ts:239 I @ address.ts:324 await in I (async) validateAddress @ Address.tsx:73 Re @ isCheckBoxInput.ts:1306 U @ isCheckBoxInput.ts:1558 T @ isCheckBoxInput.ts:1399 R @ isCheckBoxInput.ts:1458 Te @ isCheckBoxInput.ts:1872 B @ isCheckBoxInput.ts:364 H @ isCheckBoxInput.ts:479 _o @ react-dom.production.min.js:167 El @ react-dom.production.min.js:290 bs @ react-dom.production.min.js:280 ms @ react-dom.production.min.js:280 ys @ react-dom.production.min.js:280 is @ react-dom.production.min.js:268 k @ scheduler.production.min.js:13 P @ scheduler.production.min.js:14 Show 15 more frames Show less useFormSend.tsx:58 Error: failed to add output: Error: bc1pxk2u9kjszfzxqmsrcctvst32dn2pqrlptsw0e7wqumhlq9cl35ks9v5kh2 has no matching Script at B. (bitcoin.ts:312:39) at Generator.next () at bitcoin.ts:31:71 at new Promise () at a (bitcoin.ts:27:12) at bitcoin.ts:287:67 at Array.map () at B. (bitcoin.ts:287:51) at Generator.next () at s (bitcoin.ts:28:58)

Acceptance Criteria

Need By Date

No response

Screenshots/Mockups

No response

Estimated effort

No response

purelycrickets commented 7 months ago

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!"

0xean commented 4 months ago

holding on a fix since we are contemplating taproot at the product level for the moment.

twblack88 commented 3 weeks ago

It's time. For chainflip and to be more modern.