mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-02-21 14:34:55 +01:00
"Scan lnurl" -> "Scan to receive"
This commit is contained in:
parent
3ed6a7a63f
commit
538688e7d7
25 changed files with 43 additions and 34 deletions
|
@ -1702,33 +1702,6 @@ export class BlueAddressInput extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
export class BlueReadQR extends Component {
|
||||
static propTypes = {
|
||||
suffix: PropTypes.string,
|
||||
onBarScanned: PropTypes.func,
|
||||
};
|
||||
|
||||
render() {
|
||||
return (
|
||||
<TouchableOpacity
|
||||
onPress={() => NavigationService.navigate('ScanQrAddress', { onBarScanned: this.props.onBarScanned }) }
|
||||
style={{
|
||||
flex: 1,
|
||||
flexDirection: 'row',
|
||||
minWidth: width,
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center'
|
||||
}}
|
||||
>
|
||||
<Icon name="qrcode" type="font-awesome" color={BlueApp.settings.buttonTextColor} containerStyle={{ marginRight: 8 }} />
|
||||
<Text style={{color: BlueApp.settings.buttonTextColor, textAlign: 'center'}}>
|
||||
{loc.send.details.scan} {this.props.suffix}
|
||||
</Text>
|
||||
</TouchableOpacity>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export class BlueBitcoinAmount extends Component {
|
||||
static propTypes = {
|
||||
isLoading: PropTypes.bool,
|
||||
|
|
|
@ -165,6 +165,7 @@ module.exports = {
|
|||
create: 'Create',
|
||||
setAmount: 'Přijmout částku...',
|
||||
},
|
||||
scan_lnurl: 'Scan to receive'
|
||||
},
|
||||
buyBitcoin: {
|
||||
header: 'Koupit Bitcoin',
|
||||
|
|
|
@ -165,6 +165,7 @@ module.exports = {
|
|||
create: 'Create',
|
||||
setAmount: 'Modtag med beløb',
|
||||
},
|
||||
scan_lnurl: 'Scan to receive'
|
||||
},
|
||||
buyBitcoin: {
|
||||
header: 'Køb Bitcoin',
|
||||
|
|
|
@ -167,6 +167,7 @@ module.exports = {
|
|||
create: 'Create',
|
||||
setAmount: 'Zu erhaltender Betrag',
|
||||
},
|
||||
scan_lnurl: 'Scan to receive'
|
||||
},
|
||||
buyBitcoin: {
|
||||
header: 'Kaufe Bitcoin',
|
||||
|
|
|
@ -168,6 +168,7 @@ module.exports = {
|
|||
create: 'Δημιούργησε',
|
||||
setAmount: 'Λάβε με ποσό',
|
||||
},
|
||||
scan_lnurl: 'Scan to receive'
|
||||
},
|
||||
buyBitcoin: {
|
||||
header: 'Αγόρασε Bitcoin',
|
||||
|
|
|
@ -166,6 +166,7 @@ module.exports = {
|
|||
create: 'Create',
|
||||
setAmount: 'Receive with amount',
|
||||
},
|
||||
scan_lnurl: 'Scan to receive'
|
||||
},
|
||||
buyBitcoin: {
|
||||
header: 'Buy Bitcoin',
|
||||
|
|
|
@ -167,6 +167,7 @@ module.exports = {
|
|||
create: 'Create',
|
||||
setAmount: 'Receive with amount',
|
||||
},
|
||||
scan_lnurl: 'Scan to receive'
|
||||
},
|
||||
buyBitcoin: {
|
||||
header: 'Buy Bitcoin',
|
||||
|
|
|
@ -168,6 +168,7 @@ module.exports = {
|
|||
create: 'Luo',
|
||||
setAmount: 'Vastaanotettava summa',
|
||||
},
|
||||
scan_lnurl: 'Scan to receive'
|
||||
},
|
||||
buyBitcoin: {
|
||||
header: 'Osta Bitcoinia',
|
||||
|
|
|
@ -167,6 +167,7 @@ module.exports = {
|
|||
create: 'Create',
|
||||
setAmount: 'Revevoir avec montant',
|
||||
},
|
||||
scan_lnurl: 'Scan to receive'
|
||||
},
|
||||
buyBitcoin: {
|
||||
header: 'Acheter du Bitcoin',
|
||||
|
|
|
@ -163,6 +163,7 @@ module.exports = {
|
|||
create: 'Stvori',
|
||||
setAmount: 'Odredi iznos za primiti',
|
||||
},
|
||||
scan_lnurl: 'Scan to receive'
|
||||
},
|
||||
buyBitcoin: {
|
||||
header: 'Kupovina Bitcoina',
|
||||
|
|
|
@ -165,6 +165,7 @@ module.exports = {
|
|||
create: 'Létrehoz',
|
||||
setAmount: 'Fogadandó összeg',
|
||||
},
|
||||
scan_lnurl: 'Scan to receive'
|
||||
},
|
||||
buyBitcoin: {
|
||||
header: 'Bitcoin vásárlása',
|
||||
|
|
|
@ -165,6 +165,7 @@ module.exports = {
|
|||
create: 'Buat',
|
||||
setAmount: 'Terima sejumlah',
|
||||
},
|
||||
scan_lnurl: 'Scan to receive'
|
||||
},
|
||||
buyBitcoin: {
|
||||
header: 'Beli bitcoin',
|
||||
|
|
|
@ -168,6 +168,7 @@ module.exports = {
|
|||
create: 'Crea',
|
||||
setAmount: 'Ricevi con importo',
|
||||
},
|
||||
scan_lnurl: 'Scan to receive'
|
||||
},
|
||||
buyBitcoin: {
|
||||
header: 'Compra Bitcoin',
|
||||
|
|
|
@ -165,6 +165,7 @@ module.exports = {
|
|||
create: '作成',
|
||||
setAmount: '入金額',
|
||||
},
|
||||
scan_lnurl: 'Scan to receive'
|
||||
},
|
||||
buyBitcoin: {
|
||||
header: 'Bitcoin の購入',
|
||||
|
|
|
@ -166,6 +166,7 @@ module.exports = {
|
|||
create: 'Lag',
|
||||
setAmount: 'Motta med beløp',
|
||||
},
|
||||
scan_lnurl: 'Scan to receive'
|
||||
},
|
||||
buyBitcoin: {
|
||||
header: 'Kjøp Bitcoin',
|
||||
|
|
|
@ -166,6 +166,7 @@ module.exports = {
|
|||
create: 'Create',
|
||||
setAmount: 'Ontvang met bedrag',
|
||||
},
|
||||
scan_lnurl: 'Scan to receive'
|
||||
},
|
||||
buyBitcoin: {
|
||||
header: 'Koop Bitcoin',
|
||||
|
|
|
@ -169,6 +169,7 @@ module.exports = {
|
|||
create: 'Create',
|
||||
setAmount: 'Valor a receber',
|
||||
},
|
||||
scan_lnurl: 'Receber lendo QR'
|
||||
},
|
||||
buyBitcoin: {
|
||||
header: 'Comprar Bitcoin',
|
||||
|
|
|
@ -172,6 +172,7 @@ module.exports = {
|
|||
create: 'Create',
|
||||
setAmount: 'Receive with amount',
|
||||
},
|
||||
scan_lnurl: 'Receber lendo QR'
|
||||
},
|
||||
settings: {
|
||||
tabBarLabel: 'Definições',
|
||||
|
|
|
@ -171,6 +171,7 @@ module.exports = {
|
|||
create: 'Создать',
|
||||
setAmount: 'Получить сумму',
|
||||
},
|
||||
scan_lnurl: 'Scan to receive'
|
||||
},
|
||||
settings: {
|
||||
tabBarLabel: 'Настройки',
|
||||
|
|
|
@ -165,6 +165,7 @@ module.exports = {
|
|||
create: 'Skapa',
|
||||
setAmount: 'Ta emot med belopp',
|
||||
},
|
||||
scan_lnurl: 'Scan to receive'
|
||||
},
|
||||
buyBitcoin: {
|
||||
header: 'Köp bitcoin',
|
||||
|
|
|
@ -165,6 +165,7 @@ module.exports = {
|
|||
create: 'สร้าง',
|
||||
setAmount: 'รับด้วยจำนวน',
|
||||
},
|
||||
scan_lnurl: 'Scan to receive'
|
||||
},
|
||||
buyBitcoin: {
|
||||
header: 'ซื้อบิตคอยน์',
|
||||
|
|
|
@ -166,6 +166,7 @@ module.exports = {
|
|||
create: 'Oluştur',
|
||||
setAmount: 'Miktar ile al',
|
||||
},
|
||||
scan_lnurl: 'Scan to receive'
|
||||
},
|
||||
buyBitcoin: {
|
||||
header: 'Bitcoin Satın al',
|
||||
|
|
|
@ -166,6 +166,7 @@ module.exports = {
|
|||
create: 'Create',
|
||||
setAmount: 'Receive with amount',
|
||||
},
|
||||
scan_lnurl: 'Scan to receive'
|
||||
},
|
||||
buyBitcoin: {
|
||||
header: 'Buy Bitcoin',
|
||||
|
|
|
@ -163,6 +163,7 @@ module.exports = {
|
|||
create: '创建',
|
||||
setAmount: '收款金额',
|
||||
},
|
||||
scan_lnurl: 'Scan to receive'
|
||||
},
|
||||
buyBitcoin: {
|
||||
header: '购买比特币',
|
||||
|
|
|
@ -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 (
|
||||
<View style={{ marginHorizontal: 0, marginVertical: 16, minHeight: 25, alignContent: 'center' }}>
|
||||
<BlueReadQR
|
||||
onBarScanned={this.processLnurl}
|
||||
suffix="lnurl"
|
||||
/>
|
||||
<TouchableOpacity
|
||||
onPress={() => NavigationService.navigate('ScanQrAddress', { onBarScanned: this.processLnurl }) }
|
||||
style={{
|
||||
flex: 1,
|
||||
flexDirection: 'row',
|
||||
minWidth: width,
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center'
|
||||
}}
|
||||
>
|
||||
<Text style={{color: BlueApp.settings.buttonTextColor, textAlign: 'center'}}>
|
||||
{loc.receive.scan_lnurl}
|
||||
</Text>
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
);
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue