leather-io / extension

Leather browser extension
https://leather.io
MIT License
305 stars 144 forks source link

Show amount when fee increase option is shown #5826

Closed 314159265359879 closed 2 months ago

314159265359879 commented 2 months ago

Original report

Bitcoin transactions don't all have the ability to increase fee

Possibly related to #4176)

– and the one that does have it, doesn't show the amount being sent. Pete, might this be a formatting issue?

image

pete-watters commented 2 months ago

I'm not sure if we were showing the amount being sent when increasing the fee? I checked the code and it doesn't seem to be a formatting issue.

I checked back to v6.44 and I don't see it there?

I don't know what dictates when we show Increase fee and not but can look into that.

Maybe I can do that along with finishing this PR from an external - https://github.com/leather-io/extension/pull/5533 ?

markmhendrickson commented 2 months ago

Presumably we should show the amount being sent and the increase fee option in all cases.

pete-watters commented 2 months ago

I did some testing here and I am seeing Increase fee for every transaction I try and send:

https://github.com/user-attachments/assets/e0bd1efb-e575-4a0b-b888-a912f83c3dcd

I tried different fee amounts and a custom fee and I kept seeing it. Maybe there was some network issue when you were testing this @markmhendrickson as I know you had other issues with avatars not loading?

When I was testing I noticed that sometimes new activity didn't show up right away and then did after a hard refresh. Also sometimes it did update right away (classically once I was trying to record it being broken)

I can update it so that we always show the amount being sent above the Increase fee button. Right now we only show the amount OR then button

pete-watters commented 2 months ago

I opened this PR that adds the amount being sent above the Increase fee button: Screenshot 2024-09-03 at 10 10 04

markmhendrickson commented 2 months ago

Maybe there was some network issue when you were testing this @markmhendrickson as I know you had other issues with avatars not loading?

Interesting – is there code that loads data before showing the button to increase fee, and if so, is it necessary for showing the option?

pete-watters commented 2 months ago

Maybe there was some network issue when you were testing this @markmhendrickson as I know you had other issues with avatars not loading?

Interesting – is there code that loads data before showing the button to increase fee, and if so, is it necessary for showing the option?

I checked deeper into the code for this and there are some scenarios where we don't enable or show this button. We have a setting for isEnabled to disable the button but if it's not enabled we also don't show the button at all.

BTC

In this commit on 23/8/2023 we added hiding this button for transactions with taproot input. There is no issue in the commit so I'm not sure exactly why we did that.

For BTC we enable Increase Fee if these conditions pass:

Some links:

STX

For STX we show increase fee if: