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

test: add tests for alby #2390

Merged
merged 59 commits into from
Apr 8, 2024
Merged

test: add tests for alby #2390

merged 59 commits into from
Apr 8, 2024

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.

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.

Base automatically changed from test_http_wallets to dev April 8, 2024 09:18
@motorina0 motorina0 merged commit ea58b51 into dev Apr 8, 2024
24 checks passed
@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.

None yet

4 participants