Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fee calculation and presentation #621

Merged
merged 1 commit into from
Oct 25, 2023

Conversation

ademar111190
Copy link
Collaborator

@ademar111190 ademar111190 commented Aug 23, 2023

Related breez/breez-sdk-greenlight#294

How to test

  • Close your channels
  • Wait for the triangle showing unexpected funds appear at the top right of home page
    • It can take some hours
    • You can close the app and back later
  • Go through the flow sending the sats to a btc wallet
  • At the processing fee speed, choose one of the options
    • write down the fee and value you should receive at you address
  • Confirm the transaction and wait for the sats appear at your wallet
    • It can take some hours
    • You can close the app and back later
  • Check if the value you received and the fee paid is the same
    • It can be a few sats different from the forecasted
    • something like 2 sats of difference is expected.

@ademar111190 ademar111190 self-assigned this Aug 23, 2023
@ademar111190 ademar111190 changed the base branch from main to add-debug-keystore September 13, 2023 13:55
@ademar111190 ademar111190 force-pushed the fee-calculation-and-presentation branch 5 times, most recently from 798496c to b21d7d0 Compare September 18, 2023 12:46
@ademar111190 ademar111190 marked this pull request as ready for review September 18, 2023 12:46
@ademar111190 ademar111190 changed the title WIP: fee calculation and presentation Fee calculation and presentation Sep 18, 2023
Copy link
Collaborator

@ok300 ok300 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

Base automatically changed from add-debug-keystore to main September 27, 2023 11:34
Copy link
Collaborator

@erdemyerebasmaz erdemyerebasmaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please rebase or create a new PR on top of main.

@ademar111190 ademar111190 force-pushed the fee-calculation-and-presentation branch from b51444c to cdba2be Compare October 6, 2023 13:30
@ademar111190
Copy link
Collaborator Author

I was about to test but the fee recommendation from mempool is 7satsvb for all; so I'll wait for at least one variation so I can double check the fee chooser is correct

unexpected-funds-all-fees-as-7.mp4

Copy link
Collaborator

@erdemyerebasmaz erdemyerebasmaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ademar111190
Copy link
Collaborator Author

I just ran a test here (video attached) the difference from the fee showed and the fee realized was 2 satoshis:

Logs
[FeeOptionsBloc] {FINE} (2023-10-09T12:34:17.780976Z) : fetchFeeOptions recommendedFees:
fastestFee: 8,
halfHourFee: 6,
hourFee: 4.
[SweepBloc] {FINE} (2023-10-09T12:34:28.431894Z) : Sweep to address BC1QFGLJ5G6Z4RW3E7UL8JQTC2T4D4LZT4TAUN30UK using 8 fee vByte'

https://mempool.space/tx/a1241757839158c963ca875badc4a1d6d678aa9dd56d9ee3f094460b7af15946
Fee	874 sat$0.24
Fee rate 8.00 sat/vB
Dest 94 126 sats
Video
fee.calc.mp4

@ademar111190 ademar111190 force-pushed the fee-calculation-and-presentation branch from cdba2be to 8082b2e Compare October 9, 2023 12:51
@ademar111190 ademar111190 merged commit 23cb26b into main Oct 25, 2023
1 check failed
@ademar111190 ademar111190 deleted the fee-calculation-and-presentation branch October 25, 2023 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants