Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@motorina0
Copy link
Collaborator

@motorina0 motorina0 commented Apr 3, 2024

Summary

  • add test data for alby
  • update alby.py to follow the BaseWallet interface
  • minor changes to the test framework

Two open questions for @bitkarrot:

  • is the alby fee value negative?
    • see comment here
    • the alby doc example has zero fee for regular invoices (ambigous) but a positive value for keysend payments ("fee": 1)
  • we do not get back the preimage for the outgoing payments. I can see in the docs that the generic endpoint (/invoices/{checkin_id}) does not return the pre-image, but the dedicated endpoints do (/invoices/incoming/{checkin_id}, (/invoices/outgoing/{checkin_id})).
    • see my comment here

See the "skip": true tests for more details.

@codecov
Copy link

codecov bot commented Apr 3, 2024

Codecov Report

Attention: Patch coverage is 86.56716% with 9 lines in your changes are missing coverage. Please review.

Project coverage is 59.97%. Comparing base (bfda0b6) to head (2f8c382).

Files Patch % Lines
lnbits/wallets/alby.py 86.56% 9 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #2390      +/-   ##
==========================================
+ Coverage   59.46%   59.97%   +0.50%     
==========================================
  Files          65       65              
  Lines        9404     9441      +37     
==========================================
+ Hits         5592     5662      +70     
+ Misses       3812     3779      -33     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

return PaymentResponse(False, None, None, None, error_message)

checking_id = data["payment_hash"]
# todo: confirm with bitkarrot that having the minus is fine
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

cc: @bitkarrot ☝️

Copy link
Contributor

Choose a reason for hiding this comment

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

the fee value returned by Alby is positive.

@motorina0 motorina0 marked this pull request as ready for review April 3, 2024 11:11
@bitkarrot
Copy link
Contributor

@motorina0 ok gimme a day to check this out.

@motorina0 motorina0 force-pushed the test_http_wallets branch from 028b01c to 653d6a6 Compare April 5, 2024 10:34
Base automatically changed from test_http_wallets to dev April 8, 2024 09:18
@motorina0 motorina0 merged commit ea58b51 into dev Apr 8, 2024
@motorina0 motorina0 deleted the test_alby branch April 8, 2024 10:26
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