Skip to content

Commit

Permalink
remove Math.round() when converting the amount and send actual amount…
Browse files Browse the repository at this point in the history
… to generate an invoice (#280)
  • Loading branch information
Nodirbek75 authored Oct 15, 2024
1 parent 1cf95b7 commit 363cbdc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
5 changes: 2 additions & 3 deletions app/hooks/use-price-conversion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,8 @@ export const usePriceConversion = () => {
return moneyAmount
}

let amount = Math.floor(
moneyAmount.amount * priceOfCurrencyInCurrency(moneyAmount.currency, toCurrency),
)
let amount =
moneyAmount.amount * priceOfCurrencyInCurrency(moneyAmount.currency, toCurrency)

if (
moneyAmountIsCurrencyType(moneyAmount, DisplayCurrency) &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ export const createPaymentRequest = (
// Handle USD payment requests
if (pr.type === Invoice.Lightning) {
if (pr.settlementAmount && pr.settlementAmount?.currency === WalletCurrency.Usd) {
console.log("Invoice create amount: ", pr.settlementAmount.amount)
const { data, errors } = await mutations.lnUsdInvoiceCreate({
variables: {
input: {
Expand Down

0 comments on commit 363cbdc

Please sign in to comment.