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

[FIX] Convert USD amount to SATs before requesting a lnurl invoice #207

Merged
merged 2 commits into from
Aug 16, 2024

Conversation

lollerfirst
Copy link
Contributor

@lollerfirst lollerfirst commented Aug 15, 2024

  • Added fetchBitcoinPriceUSD to wallet.ts, which fetches the price from Coinbase
  • Modified lnurlPayFirst: avoid potentially repeated query.
  • Modified lnurlPaySecond: if mintStore.activeUnit is usd then calculate the equivalent in satoshis and use that for the invoice.

…from Coinbase

* Modified `lnurlPayFirst`: avoid potentially query the host 2 times.
* Modified `lnurlPaySecond`: if `mintStore.activeUnit` is `usd` then calculate the equivalent in satoshis and use that for the invoice.
@callebtc callebtc merged commit 6c8dfee into cashubtc:main Aug 16, 2024
1 check failed
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.

2 participants