extension icon indicating copy to clipboard operation
extension copied to clipboard

Error: transaction size must be defined" when trying to send BRC-20 tokens (send flow) or an UTXO with multi inscriptions

Open 314159265359879 opened this issue 1 year ago • 1 comments

To reproduce use wallet with BRC-20 wallet displayed under assets and no ~500 sat balance and take these steps:

  1. Click send
  2. Click BRC20 token
  3. Input amount of tokens to send, i.e. 4
  4. Click continue
  5. See error image

image

TODO: Test if this only occurs when the BTC balance has a dust amount of BTC or also when the BTC balance is 0 (use dev wallet account 3 (small BTC balance) and 4 (no btc balance). Test blocked by #https://github.com/leather-wallet/extension/issues/4940 because BRC20 balance isn't displayed.

If the dust amount or low amount of BTC is causing this error. We should handle this better, show low balance error so the user can fix that. This error doesn't help the user understand why this is happening.

314159265359879 avatar Feb 14 '24 13:02 314159265359879

This issue is more general.

Reproduction steps 2 (BTC balance amount doesn't matter)

  1. dev wallet account 2
  2. Hover over inscription ...9900 to send
  3. input a valid bitcoin address
  4. click continue
  5. See error image

By the way this is not a normal inscription we are selecting it is paired with another inscription in the same UTXO.

314159265359879 avatar Feb 16 '24 09:02 314159265359879

@kyranjamie any idea what's up here?

markmhendrickson avatar Feb 22 '24 13:02 markmhendrickson

I believe this is an unhandled error where a user that has no spendable UTXOs attempts to make a transaction.

kyranjamie avatar Feb 22 '24 14:02 kyranjamie

Is that because the remaining UTXOs in the user's balance are protected?

markmhendrickson avatar Feb 23 '24 12:02 markmhendrickson

That, or they're just uneconomical.

kyranjamie avatar Feb 23 '24 12:02 kyranjamie

When I reproduced it there is enough BTC (well beyond dust/uneconomical amount) in account 2, the unhandled issue though, I think it is related to the UTXO holding multiple inscriptions in that case. That is different from the very first case reported here though.

314159265359879 avatar Feb 23 '24 14:02 314159265359879

Here is another case of this same error popping up. I am increasing the severity of this bug to P1 based on this.

Here is a transaction https://mempool.space/tx/029b6de94608d27156920b00957ca87a48e0c2be4260b05b4385648eaf63854e the wallet would normally have no issue with, it would allow increasing the fee because the inputs/outputs allow for a three-four fold increase. Yet when the user clicks "increase fee" in the activities tab in Leather they hit this error instead: image

image

314159265359879 avatar Feb 28 '24 19:02 314159265359879

This issue is more general.

Reproduction steps 2 (BTC balance amount doesn't matter)

  1. dev wallet account 2
  2. Hover over inscription ...9900 to send
  3. input a valid bitcoin address
  4. click continue
  5. See error image

By the way this is not a normal inscription we are selecting it is paired with another inscription in the same UTXO.

Retested with PR5011, looks LGTM

314159265359879 avatar Mar 06 '24 22:03 314159265359879