Browse Source

Merge pull request #411 from LN-Zap/fix/invoice-creation

fix(convert): return value if converting with same to and from currency
renovate/lint-staged-8.x
JimmyMow 7 years ago
committed by GitHub
parent
commit
590ac80785
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      app/utils/btc.js

6
app/utils/btc.js

@ -93,6 +93,8 @@ export function convert(from, to, amount, price) {
return btcToSatoshis(amount)
case 'usd':
return btcToUsd(amount, price)
case 'btc':
return amount
}
break
case 'bits':
@ -103,6 +105,8 @@ export function convert(from, to, amount, price) {
return bitsToSatoshis(amount)
case 'usd':
return bitsToUsd(amount, price)
case 'bits':
return amount
}
break
case 'sats':
@ -113,6 +117,8 @@ export function convert(from, to, amount, price) {
return satoshisToBits(amount)
case 'usd':
return satoshisToUsd(amount, price)
case 'sats':
return amount
}
break
default:

Loading…
Cancel
Save