diff --git a/BlueComponents.js b/BlueComponents.js
index 58b9c6325..b29756b3b 100644
--- a/BlueComponents.js
+++ b/BlueComponents.js
@@ -1702,33 +1702,6 @@ export class BlueAddressInput extends Component {
}
}
-export class BlueReadQR extends Component {
- static propTypes = {
- suffix: PropTypes.string,
- onBarScanned: PropTypes.func,
- };
-
- render() {
- return (
- NavigationService.navigate('ScanQrAddress', { onBarScanned: this.props.onBarScanned }) }
- style={{
- flex: 1,
- flexDirection: 'row',
- minWidth: width,
- justifyContent: 'center',
- alignItems: 'center'
- }}
- >
-
-
- {loc.send.details.scan} {this.props.suffix}
-
-
- );
- }
-}
-
export class BlueBitcoinAmount extends Component {
static propTypes = {
isLoading: PropTypes.bool,
diff --git a/loc/cs_CZ.js b/loc/cs_CZ.js
index 82cb301bf..0115ecd87 100644
--- a/loc/cs_CZ.js
+++ b/loc/cs_CZ.js
@@ -165,6 +165,7 @@ module.exports = {
create: 'Create',
setAmount: 'Přijmout částku...',
},
+ scan_lnurl: 'Scan to receive'
},
buyBitcoin: {
header: 'Koupit Bitcoin',
diff --git a/loc/da_DK.js b/loc/da_DK.js
index 9a26f4a9c..7d7ccfa5c 100644
--- a/loc/da_DK.js
+++ b/loc/da_DK.js
@@ -165,6 +165,7 @@ module.exports = {
create: 'Create',
setAmount: 'Modtag med beløb',
},
+ scan_lnurl: 'Scan to receive'
},
buyBitcoin: {
header: 'Køb Bitcoin',
diff --git a/loc/de_DE.js b/loc/de_DE.js
index 82cb15b77..dbd9b7d03 100644
--- a/loc/de_DE.js
+++ b/loc/de_DE.js
@@ -167,6 +167,7 @@ module.exports = {
create: 'Create',
setAmount: 'Zu erhaltender Betrag',
},
+ scan_lnurl: 'Scan to receive'
},
buyBitcoin: {
header: 'Kaufe Bitcoin',
diff --git a/loc/el.js b/loc/el.js
index 26ce61c20..a1971e12c 100644
--- a/loc/el.js
+++ b/loc/el.js
@@ -168,6 +168,7 @@ module.exports = {
create: 'Δημιούργησε',
setAmount: 'Λάβε με ποσό',
},
+ scan_lnurl: 'Scan to receive'
},
buyBitcoin: {
header: 'Αγόρασε Bitcoin',
diff --git a/loc/en.js b/loc/en.js
index ee5c28c33..7cd40b4ab 100644
--- a/loc/en.js
+++ b/loc/en.js
@@ -166,6 +166,7 @@ module.exports = {
create: 'Create',
setAmount: 'Receive with amount',
},
+ scan_lnurl: 'Scan to receive'
},
buyBitcoin: {
header: 'Buy Bitcoin',
diff --git a/loc/es.js b/loc/es.js
index bf7f100bc..b077295d1 100644
--- a/loc/es.js
+++ b/loc/es.js
@@ -167,6 +167,7 @@ module.exports = {
create: 'Create',
setAmount: 'Receive with amount',
},
+ scan_lnurl: 'Scan to receive'
},
buyBitcoin: {
header: 'Buy Bitcoin',
diff --git a/loc/fi_FI.js b/loc/fi_FI.js
index 4d9b95c7c..f24d48888 100644
--- a/loc/fi_FI.js
+++ b/loc/fi_FI.js
@@ -168,6 +168,7 @@ module.exports = {
create: 'Luo',
setAmount: 'Vastaanotettava summa',
},
+ scan_lnurl: 'Scan to receive'
},
buyBitcoin: {
header: 'Osta Bitcoinia',
diff --git a/loc/fr_FR.js b/loc/fr_FR.js
index cbfbc43bb..2061fb86d 100644
--- a/loc/fr_FR.js
+++ b/loc/fr_FR.js
@@ -167,6 +167,7 @@ module.exports = {
create: 'Create',
setAmount: 'Revevoir avec montant',
},
+ scan_lnurl: 'Scan to receive'
},
buyBitcoin: {
header: 'Acheter du Bitcoin',
diff --git a/loc/hr_HR.js b/loc/hr_HR.js
index 5bc30145b..ad4be6bca 100644
--- a/loc/hr_HR.js
+++ b/loc/hr_HR.js
@@ -163,6 +163,7 @@ module.exports = {
create: 'Stvori',
setAmount: 'Odredi iznos za primiti',
},
+ scan_lnurl: 'Scan to receive'
},
buyBitcoin: {
header: 'Kupovina Bitcoina',
diff --git a/loc/hu_HU.js b/loc/hu_HU.js
index 3cb184df9..247e48e29 100644
--- a/loc/hu_HU.js
+++ b/loc/hu_HU.js
@@ -165,6 +165,7 @@ module.exports = {
create: 'Létrehoz',
setAmount: 'Fogadandó összeg',
},
+ scan_lnurl: 'Scan to receive'
},
buyBitcoin: {
header: 'Bitcoin vásárlása',
diff --git a/loc/id_ID.js b/loc/id_ID.js
index 5fd71472d..7e00ce7c5 100644
--- a/loc/id_ID.js
+++ b/loc/id_ID.js
@@ -165,6 +165,7 @@ module.exports = {
create: 'Buat',
setAmount: 'Terima sejumlah',
},
+ scan_lnurl: 'Scan to receive'
},
buyBitcoin: {
header: 'Beli bitcoin',
diff --git a/loc/it.js b/loc/it.js
index d5c2172ab..aea71d1db 100644
--- a/loc/it.js
+++ b/loc/it.js
@@ -168,6 +168,7 @@ module.exports = {
create: 'Crea',
setAmount: 'Ricevi con importo',
},
+ scan_lnurl: 'Scan to receive'
},
buyBitcoin: {
header: 'Compra Bitcoin',
diff --git a/loc/jp_JP.js b/loc/jp_JP.js
index 5669d0f30..9a3cf86ce 100644
--- a/loc/jp_JP.js
+++ b/loc/jp_JP.js
@@ -165,6 +165,7 @@ module.exports = {
create: '作成',
setAmount: '入金額',
},
+ scan_lnurl: 'Scan to receive'
},
buyBitcoin: {
header: 'Bitcoin の購入',
diff --git a/loc/nb_NO.js b/loc/nb_NO.js
index 5f1a7ad9c..6cf372562 100644
--- a/loc/nb_NO.js
+++ b/loc/nb_NO.js
@@ -166,6 +166,7 @@ module.exports = {
create: 'Lag',
setAmount: 'Motta med beløp',
},
+ scan_lnurl: 'Scan to receive'
},
buyBitcoin: {
header: 'Kjøp Bitcoin',
diff --git a/loc/nl_NL.js b/loc/nl_NL.js
index e0f2134d3..e82c38abc 100644
--- a/loc/nl_NL.js
+++ b/loc/nl_NL.js
@@ -166,6 +166,7 @@ module.exports = {
create: 'Create',
setAmount: 'Ontvang met bedrag',
},
+ scan_lnurl: 'Scan to receive'
},
buyBitcoin: {
header: 'Koop Bitcoin',
diff --git a/loc/pt_BR.js b/loc/pt_BR.js
index f61ba810b..c96c7c3f5 100644
--- a/loc/pt_BR.js
+++ b/loc/pt_BR.js
@@ -169,6 +169,7 @@ module.exports = {
create: 'Create',
setAmount: 'Valor a receber',
},
+ scan_lnurl: 'Receber lendo QR'
},
buyBitcoin: {
header: 'Comprar Bitcoin',
diff --git a/loc/pt_PT.js b/loc/pt_PT.js
index e5bf8ce51..83dbbdcc8 100644
--- a/loc/pt_PT.js
+++ b/loc/pt_PT.js
@@ -172,6 +172,7 @@ module.exports = {
create: 'Create',
setAmount: 'Receive with amount',
},
+ scan_lnurl: 'Receber lendo QR'
},
settings: {
tabBarLabel: 'Definições',
diff --git a/loc/ru.js b/loc/ru.js
index 91db7f7ae..a4badfcce 100644
--- a/loc/ru.js
+++ b/loc/ru.js
@@ -171,6 +171,7 @@ module.exports = {
create: 'Создать',
setAmount: 'Получить сумму',
},
+ scan_lnurl: 'Scan to receive'
},
settings: {
tabBarLabel: 'Настройки',
diff --git a/loc/sv_SE.js b/loc/sv_SE.js
index 7a1b39aaa..57de74da9 100644
--- a/loc/sv_SE.js
+++ b/loc/sv_SE.js
@@ -165,6 +165,7 @@ module.exports = {
create: 'Skapa',
setAmount: 'Ta emot med belopp',
},
+ scan_lnurl: 'Scan to receive'
},
buyBitcoin: {
header: 'Köp bitcoin',
diff --git a/loc/th_TH.js b/loc/th_TH.js
index ab2df0493..154dd9dbd 100644
--- a/loc/th_TH.js
+++ b/loc/th_TH.js
@@ -165,6 +165,7 @@ module.exports = {
create: 'สร้าง',
setAmount: 'รับด้วยจำนวน',
},
+ scan_lnurl: 'Scan to receive'
},
buyBitcoin: {
header: 'ซื้อบิตคอยน์',
diff --git a/loc/tr_TR.js b/loc/tr_TR.js
index a3ea5b6ff..c2f85cdb9 100644
--- a/loc/tr_TR.js
+++ b/loc/tr_TR.js
@@ -166,6 +166,7 @@ module.exports = {
create: 'Oluştur',
setAmount: 'Miktar ile al',
},
+ scan_lnurl: 'Scan to receive'
},
buyBitcoin: {
header: 'Bitcoin Satın al',
diff --git a/loc/ua.js b/loc/ua.js
index 74951ea4b..2db9c5fc4 100644
--- a/loc/ua.js
+++ b/loc/ua.js
@@ -166,6 +166,7 @@ module.exports = {
create: 'Create',
setAmount: 'Receive with amount',
},
+ scan_lnurl: 'Scan to receive'
},
buyBitcoin: {
header: 'Buy Bitcoin',
diff --git a/loc/zh_cn.js b/loc/zh_cn.js
index 68ea3f80a..c9b9ce145 100755
--- a/loc/zh_cn.js
+++ b/loc/zh_cn.js
@@ -163,6 +163,7 @@ module.exports = {
create: '创建',
setAmount: '收款金额',
},
+ scan_lnurl: 'Scan to receive'
},
buyBitcoin: {
header: '购买比特币',
diff --git a/screen/lnd/lndCreateInvoice.js b/screen/lnd/lndCreateInvoice.js
index b6363ae88..ea6dde0b8 100644
--- a/screen/lnd/lndCreateInvoice.js
+++ b/screen/lnd/lndCreateInvoice.js
@@ -1,13 +1,16 @@
/* global alert */
import React, { Component } from 'react';
-import { ActivityIndicator, View, TextInput, KeyboardAvoidingView, Keyboard, TouchableWithoutFeedback, Text } from 'react-native';
-import { BlueNavigationStyle, BlueButton, BlueReadQR, BlueBitcoinAmount, BlueDismissKeyboardInputAccessory } from '../../BlueComponents';
+import { Dimensions, ActivityIndicator, View, TextInput, KeyboardAvoidingView, Keyboard, TouchableWithoutFeedback, TouchableOpacity, Text } from 'react-native';
+import { BlueNavigationStyle, BlueButton, BlueBitcoinAmount, BlueDismissKeyboardInputAccessory } from '../../BlueComponents';
import PropTypes from 'prop-types';
import bech32 from 'bech32';
import { BitcoinUnit } from '../../models/bitcoinUnits';
+import NavigationService from '../../NavigationService';
import ReactNativeHapticFeedback from 'react-native-haptic-feedback';
+let BlueApp = require('../../BlueApp');
let EV = require('../../events');
let loc = require('../../loc');
+const { width } = Dimensions.get('window');
export default class LNDCreateInvoice extends Component {
static navigationOptions = ({ navigation }) => ({
@@ -108,7 +111,7 @@ export default class LNDCreateInvoice extends Component {
k1: reply.k1,
callback: reply.callback,
fixed: reply.minWithdrawable === reply.maxWithdrawable,
- min: reply.minWithdrawable / 1000,
+ min: (reply.minWithdrawable || 0) / 1000,
max: reply.maxWithdrawable / 1000
},
amount: (reply.maxWithdrawable / 1000).toString(),
@@ -138,10 +141,20 @@ export default class LNDCreateInvoice extends Component {
renderScanClickable = () => {
return (
-
+ NavigationService.navigate('ScanQrAddress', { onBarScanned: this.processLnurl }) }
+ style={{
+ flex: 1,
+ flexDirection: 'row',
+ minWidth: width,
+ justifyContent: 'center',
+ alignItems: 'center'
+ }}
+ >
+
+ {loc.receive.scan_lnurl}
+
+
);
};