mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-02-22 15:04:50 +01:00
REF
This commit is contained in:
parent
d40ac66bf1
commit
f3e35e7bba
27 changed files with 50 additions and 60 deletions
|
@ -165,7 +165,7 @@ module.exports = {
|
||||||
create: 'Create',
|
create: 'Create',
|
||||||
setAmount: 'Přijmout částku...',
|
setAmount: 'Přijmout částku...',
|
||||||
},
|
},
|
||||||
scan_lnurl: 'Scan to receive'
|
scan_lnurl: 'Scan to receive',
|
||||||
},
|
},
|
||||||
buyBitcoin: {
|
buyBitcoin: {
|
||||||
header: 'Koupit Bitcoin',
|
header: 'Koupit Bitcoin',
|
||||||
|
|
|
@ -165,7 +165,7 @@ module.exports = {
|
||||||
create: 'Create',
|
create: 'Create',
|
||||||
setAmount: 'Modtag med beløb',
|
setAmount: 'Modtag med beløb',
|
||||||
},
|
},
|
||||||
scan_lnurl: 'Scan to receive'
|
scan_lnurl: 'Scan to receive',
|
||||||
},
|
},
|
||||||
buyBitcoin: {
|
buyBitcoin: {
|
||||||
header: 'Køb Bitcoin',
|
header: 'Køb Bitcoin',
|
||||||
|
|
|
@ -167,7 +167,7 @@ module.exports = {
|
||||||
create: 'Create',
|
create: 'Create',
|
||||||
setAmount: 'Zu erhaltender Betrag',
|
setAmount: 'Zu erhaltender Betrag',
|
||||||
},
|
},
|
||||||
scan_lnurl: 'Scan to receive'
|
scan_lnurl: 'Scan to receive',
|
||||||
},
|
},
|
||||||
buyBitcoin: {
|
buyBitcoin: {
|
||||||
header: 'Kaufe Bitcoin',
|
header: 'Kaufe Bitcoin',
|
||||||
|
|
|
@ -168,7 +168,7 @@ module.exports = {
|
||||||
create: 'Δημιούργησε',
|
create: 'Δημιούργησε',
|
||||||
setAmount: 'Λάβε με ποσό',
|
setAmount: 'Λάβε με ποσό',
|
||||||
},
|
},
|
||||||
scan_lnurl: 'Scan to receive'
|
scan_lnurl: 'Scan to receive',
|
||||||
},
|
},
|
||||||
buyBitcoin: {
|
buyBitcoin: {
|
||||||
header: 'Αγόρασε Bitcoin',
|
header: 'Αγόρασε Bitcoin',
|
||||||
|
|
|
@ -166,7 +166,7 @@ module.exports = {
|
||||||
create: 'Create',
|
create: 'Create',
|
||||||
setAmount: 'Receive with amount',
|
setAmount: 'Receive with amount',
|
||||||
},
|
},
|
||||||
scan_lnurl: 'Scan to receive'
|
scan_lnurl: 'Scan to receive',
|
||||||
},
|
},
|
||||||
buyBitcoin: {
|
buyBitcoin: {
|
||||||
header: 'Buy Bitcoin',
|
header: 'Buy Bitcoin',
|
||||||
|
|
|
@ -167,7 +167,7 @@ module.exports = {
|
||||||
create: 'Create',
|
create: 'Create',
|
||||||
setAmount: 'Receive with amount',
|
setAmount: 'Receive with amount',
|
||||||
},
|
},
|
||||||
scan_lnurl: 'Scan to receive'
|
scan_lnurl: 'Scan to receive',
|
||||||
},
|
},
|
||||||
buyBitcoin: {
|
buyBitcoin: {
|
||||||
header: 'Buy Bitcoin',
|
header: 'Buy Bitcoin',
|
||||||
|
|
|
@ -168,7 +168,7 @@ module.exports = {
|
||||||
create: 'Luo',
|
create: 'Luo',
|
||||||
setAmount: 'Vastaanotettava summa',
|
setAmount: 'Vastaanotettava summa',
|
||||||
},
|
},
|
||||||
scan_lnurl: 'Scan to receive'
|
scan_lnurl: 'Scan to receive',
|
||||||
},
|
},
|
||||||
buyBitcoin: {
|
buyBitcoin: {
|
||||||
header: 'Osta Bitcoinia',
|
header: 'Osta Bitcoinia',
|
||||||
|
|
|
@ -167,7 +167,7 @@ module.exports = {
|
||||||
create: 'Create',
|
create: 'Create',
|
||||||
setAmount: 'Revevoir avec montant',
|
setAmount: 'Revevoir avec montant',
|
||||||
},
|
},
|
||||||
scan_lnurl: 'Scan to receive'
|
scan_lnurl: 'Scan to receive',
|
||||||
},
|
},
|
||||||
buyBitcoin: {
|
buyBitcoin: {
|
||||||
header: 'Acheter du Bitcoin',
|
header: 'Acheter du Bitcoin',
|
||||||
|
|
|
@ -163,7 +163,7 @@ module.exports = {
|
||||||
create: 'Stvori',
|
create: 'Stvori',
|
||||||
setAmount: 'Odredi iznos za primiti',
|
setAmount: 'Odredi iznos za primiti',
|
||||||
},
|
},
|
||||||
scan_lnurl: 'Scan to receive'
|
scan_lnurl: 'Scan to receive',
|
||||||
},
|
},
|
||||||
buyBitcoin: {
|
buyBitcoin: {
|
||||||
header: 'Kupovina Bitcoina',
|
header: 'Kupovina Bitcoina',
|
||||||
|
|
|
@ -165,7 +165,7 @@ module.exports = {
|
||||||
create: 'Létrehoz',
|
create: 'Létrehoz',
|
||||||
setAmount: 'Fogadandó összeg',
|
setAmount: 'Fogadandó összeg',
|
||||||
},
|
},
|
||||||
scan_lnurl: 'Scan to receive'
|
scan_lnurl: 'Scan to receive',
|
||||||
},
|
},
|
||||||
buyBitcoin: {
|
buyBitcoin: {
|
||||||
header: 'Bitcoin vásárlása',
|
header: 'Bitcoin vásárlása',
|
||||||
|
|
|
@ -165,7 +165,7 @@ module.exports = {
|
||||||
create: 'Buat',
|
create: 'Buat',
|
||||||
setAmount: 'Terima sejumlah',
|
setAmount: 'Terima sejumlah',
|
||||||
},
|
},
|
||||||
scan_lnurl: 'Scan to receive'
|
scan_lnurl: 'Scan to receive',
|
||||||
},
|
},
|
||||||
buyBitcoin: {
|
buyBitcoin: {
|
||||||
header: 'Beli bitcoin',
|
header: 'Beli bitcoin',
|
||||||
|
|
|
@ -168,7 +168,7 @@ module.exports = {
|
||||||
create: 'Crea',
|
create: 'Crea',
|
||||||
setAmount: 'Ricevi con importo',
|
setAmount: 'Ricevi con importo',
|
||||||
},
|
},
|
||||||
scan_lnurl: 'Scan to receive'
|
scan_lnurl: 'Scan to receive',
|
||||||
},
|
},
|
||||||
buyBitcoin: {
|
buyBitcoin: {
|
||||||
header: 'Compra Bitcoin',
|
header: 'Compra Bitcoin',
|
||||||
|
|
|
@ -165,7 +165,7 @@ module.exports = {
|
||||||
create: '作成',
|
create: '作成',
|
||||||
setAmount: '入金額',
|
setAmount: '入金額',
|
||||||
},
|
},
|
||||||
scan_lnurl: 'Scan to receive'
|
scan_lnurl: 'Scan to receive',
|
||||||
},
|
},
|
||||||
buyBitcoin: {
|
buyBitcoin: {
|
||||||
header: 'Bitcoin の購入',
|
header: 'Bitcoin の購入',
|
||||||
|
|
|
@ -166,7 +166,7 @@ module.exports = {
|
||||||
create: 'Lag',
|
create: 'Lag',
|
||||||
setAmount: 'Motta med beløp',
|
setAmount: 'Motta med beløp',
|
||||||
},
|
},
|
||||||
scan_lnurl: 'Scan to receive'
|
scan_lnurl: 'Scan to receive',
|
||||||
},
|
},
|
||||||
buyBitcoin: {
|
buyBitcoin: {
|
||||||
header: 'Kjøp Bitcoin',
|
header: 'Kjøp Bitcoin',
|
||||||
|
|
|
@ -166,7 +166,7 @@ module.exports = {
|
||||||
create: 'Create',
|
create: 'Create',
|
||||||
setAmount: 'Ontvang met bedrag',
|
setAmount: 'Ontvang met bedrag',
|
||||||
},
|
},
|
||||||
scan_lnurl: 'Scan to receive'
|
scan_lnurl: 'Scan to receive',
|
||||||
},
|
},
|
||||||
buyBitcoin: {
|
buyBitcoin: {
|
||||||
header: 'Koop Bitcoin',
|
header: 'Koop Bitcoin',
|
||||||
|
|
|
@ -169,7 +169,7 @@ module.exports = {
|
||||||
create: 'Create',
|
create: 'Create',
|
||||||
setAmount: 'Valor a receber',
|
setAmount: 'Valor a receber',
|
||||||
},
|
},
|
||||||
scan_lnurl: 'Receber lendo QR'
|
scan_lnurl: 'Receber lendo QR',
|
||||||
},
|
},
|
||||||
buyBitcoin: {
|
buyBitcoin: {
|
||||||
header: 'Comprar Bitcoin',
|
header: 'Comprar Bitcoin',
|
||||||
|
|
|
@ -172,7 +172,7 @@ module.exports = {
|
||||||
create: 'Create',
|
create: 'Create',
|
||||||
setAmount: 'Receive with amount',
|
setAmount: 'Receive with amount',
|
||||||
},
|
},
|
||||||
scan_lnurl: 'Receber lendo QR'
|
scan_lnurl: 'Receber lendo QR',
|
||||||
},
|
},
|
||||||
settings: {
|
settings: {
|
||||||
tabBarLabel: 'Definições',
|
tabBarLabel: 'Definições',
|
||||||
|
|
|
@ -171,7 +171,7 @@ module.exports = {
|
||||||
create: 'Создать',
|
create: 'Создать',
|
||||||
setAmount: 'Получить сумму',
|
setAmount: 'Получить сумму',
|
||||||
},
|
},
|
||||||
scan_lnurl: 'Scan to receive'
|
scan_lnurl: 'Scan to receive',
|
||||||
},
|
},
|
||||||
settings: {
|
settings: {
|
||||||
tabBarLabel: 'Настройки',
|
tabBarLabel: 'Настройки',
|
||||||
|
|
|
@ -165,7 +165,7 @@ module.exports = {
|
||||||
create: 'Skapa',
|
create: 'Skapa',
|
||||||
setAmount: 'Ta emot med belopp',
|
setAmount: 'Ta emot med belopp',
|
||||||
},
|
},
|
||||||
scan_lnurl: 'Scan to receive'
|
scan_lnurl: 'Scan to receive',
|
||||||
},
|
},
|
||||||
buyBitcoin: {
|
buyBitcoin: {
|
||||||
header: 'Köp bitcoin',
|
header: 'Köp bitcoin',
|
||||||
|
|
|
@ -165,7 +165,7 @@ module.exports = {
|
||||||
create: 'สร้าง',
|
create: 'สร้าง',
|
||||||
setAmount: 'รับด้วยจำนวน',
|
setAmount: 'รับด้วยจำนวน',
|
||||||
},
|
},
|
||||||
scan_lnurl: 'Scan to receive'
|
scan_lnurl: 'Scan to receive',
|
||||||
},
|
},
|
||||||
buyBitcoin: {
|
buyBitcoin: {
|
||||||
header: 'ซื้อบิตคอยน์',
|
header: 'ซื้อบิตคอยน์',
|
||||||
|
|
|
@ -166,7 +166,7 @@ module.exports = {
|
||||||
create: 'Oluştur',
|
create: 'Oluştur',
|
||||||
setAmount: 'Miktar ile al',
|
setAmount: 'Miktar ile al',
|
||||||
},
|
},
|
||||||
scan_lnurl: 'Scan to receive'
|
scan_lnurl: 'Scan to receive',
|
||||||
},
|
},
|
||||||
buyBitcoin: {
|
buyBitcoin: {
|
||||||
header: 'Bitcoin Satın al',
|
header: 'Bitcoin Satın al',
|
||||||
|
|
|
@ -166,7 +166,7 @@ module.exports = {
|
||||||
create: 'Create',
|
create: 'Create',
|
||||||
setAmount: 'Receive with amount',
|
setAmount: 'Receive with amount',
|
||||||
},
|
},
|
||||||
scan_lnurl: 'Scan to receive'
|
scan_lnurl: 'Scan to receive',
|
||||||
},
|
},
|
||||||
buyBitcoin: {
|
buyBitcoin: {
|
||||||
header: 'Buy Bitcoin',
|
header: 'Buy Bitcoin',
|
||||||
|
|
|
@ -163,7 +163,7 @@ module.exports = {
|
||||||
create: '创建',
|
create: '创建',
|
||||||
setAmount: '收款金额',
|
setAmount: '收款金额',
|
||||||
},
|
},
|
||||||
scan_lnurl: 'Scan to receive'
|
scan_lnurl: 'Scan to receive',
|
||||||
},
|
},
|
||||||
buyBitcoin: {
|
buyBitcoin: {
|
||||||
header: '购买比特币',
|
header: '购买比特币',
|
||||||
|
|
|
@ -65,7 +65,7 @@
|
||||||
"coinselect": "3.1.11",
|
"coinselect": "3.1.11",
|
||||||
"crypto-js": "3.1.9-1",
|
"crypto-js": "3.1.9-1",
|
||||||
"dayjs": "1.8.14",
|
"dayjs": "1.8.14",
|
||||||
"electrum-client": "git+https://github.com/Overtorment/rn-electrum-client.git",
|
"electrum-client": "git+https://github.com/BlueWallet/rn-electrum-client.git",
|
||||||
"eslint-config-prettier": "6.0.0",
|
"eslint-config-prettier": "6.0.0",
|
||||||
"eslint-config-standard": "12.0.0",
|
"eslint-config-standard": "12.0.0",
|
||||||
"eslint-config-standard-react": "7.0.2",
|
"eslint-config-standard-react": "7.0.2",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
module.exports = {
|
module.exports = {
|
||||||
dependencies: {
|
dependencies: {
|
||||||
'appcenter': {
|
appcenter: {
|
||||||
platforms: {
|
platforms: {
|
||||||
android: null, // disable Android platform, other platforms will still autolink if provided
|
android: null, // disable Android platform, other platforms will still autolink if provided
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,6 +1,16 @@
|
||||||
/* global alert */
|
/* global alert */
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import { Dimensions, ActivityIndicator, View, TextInput, KeyboardAvoidingView, Keyboard, TouchableWithoutFeedback, TouchableOpacity, Text } from 'react-native';
|
import {
|
||||||
|
Dimensions,
|
||||||
|
ActivityIndicator,
|
||||||
|
View,
|
||||||
|
TextInput,
|
||||||
|
KeyboardAvoidingView,
|
||||||
|
Keyboard,
|
||||||
|
TouchableWithoutFeedback,
|
||||||
|
TouchableOpacity,
|
||||||
|
Text,
|
||||||
|
} from 'react-native';
|
||||||
import { BlueNavigationStyle, BlueButton, BlueBitcoinAmount, BlueDismissKeyboardInputAccessory } from '../../BlueComponents';
|
import { BlueNavigationStyle, BlueButton, BlueBitcoinAmount, BlueDismissKeyboardInputAccessory } from '../../BlueComponents';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import bech32 from 'bech32';
|
import bech32 from 'bech32';
|
||||||
|
@ -42,9 +52,9 @@ export default class LNDCreateInvoice extends Component {
|
||||||
|
|
||||||
// send to lnurl-withdraw callback url if that exists
|
// send to lnurl-withdraw callback url if that exists
|
||||||
if (this.state.lnurlParams) {
|
if (this.state.lnurlParams) {
|
||||||
let {callback, k1} = this.state.lnurlParams;
|
let { callback, k1 } = this.state.lnurlParams;
|
||||||
let callbackUrl = callback + (callback.indexOf('?') !== -1 ? '&' : '?') + 'k1=' + k1 + '&pr=' + invoiceRequest;
|
let callbackUrl = callback + (callback.indexOf('?') !== -1 ? '&' : '?') + 'k1=' + k1 + '&pr=' + invoiceRequest;
|
||||||
let resp = await fetch(callbackUrl, {method: 'GET'});
|
let resp = await fetch(callbackUrl, { method: 'GET' });
|
||||||
if (resp.status >= 300) {
|
if (resp.status >= 300) {
|
||||||
let text = await resp.text();
|
let text = await resp.text();
|
||||||
throw new Error(text);
|
throw new Error(text);
|
||||||
|
@ -91,9 +101,9 @@ export default class LNDCreateInvoice extends Component {
|
||||||
|
|
||||||
// calling the url
|
// calling the url
|
||||||
try {
|
try {
|
||||||
let resp = await fetch(url, {method: 'GET'})
|
let resp = await fetch(url, { method: 'GET' });
|
||||||
if (resp.status >= 300) {
|
if (resp.status >= 300) {
|
||||||
throw new Error("Bad response from server");
|
throw new Error('Bad response from server');
|
||||||
}
|
}
|
||||||
let reply = await resp.json();
|
let reply = await resp.json();
|
||||||
if (reply.status === 'ERROR') {
|
if (reply.status === 'ERROR') {
|
||||||
|
@ -112,7 +122,7 @@ export default class LNDCreateInvoice extends Component {
|
||||||
callback: reply.callback,
|
callback: reply.callback,
|
||||||
fixed: reply.minWithdrawable === reply.maxWithdrawable,
|
fixed: reply.minWithdrawable === reply.maxWithdrawable,
|
||||||
min: (reply.minWithdrawable || 0) / 1000,
|
min: (reply.minWithdrawable || 0) / 1000,
|
||||||
max: reply.maxWithdrawable / 1000
|
max: reply.maxWithdrawable / 1000,
|
||||||
},
|
},
|
||||||
amount: (reply.maxWithdrawable / 1000).toString(),
|
amount: (reply.maxWithdrawable / 1000).toString(),
|
||||||
description: reply.defaultDescription,
|
description: reply.defaultDescription,
|
||||||
|
@ -124,7 +134,7 @@ export default class LNDCreateInvoice extends Component {
|
||||||
alert(Err.message);
|
alert(Err.message);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
renderCreateButton = () => {
|
renderCreateButton = () => {
|
||||||
return (
|
return (
|
||||||
|
@ -142,18 +152,16 @@ export default class LNDCreateInvoice extends Component {
|
||||||
return (
|
return (
|
||||||
<View style={{ marginHorizontal: 0, marginVertical: 16, minHeight: 25, alignContent: 'center' }}>
|
<View style={{ marginHorizontal: 0, marginVertical: 16, minHeight: 25, alignContent: 'center' }}>
|
||||||
<TouchableOpacity
|
<TouchableOpacity
|
||||||
onPress={() => NavigationService.navigate('ScanQrAddress', { onBarScanned: this.processLnurl }) }
|
onPress={() => NavigationService.navigate('ScanQrAddress', { onBarScanned: this.processLnurl })}
|
||||||
style={{
|
style={{
|
||||||
flex: 1,
|
flex: 1,
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
minWidth: width,
|
minWidth: width,
|
||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
alignItems: 'center'
|
alignItems: 'center',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Text style={{color: BlueApp.settings.buttonTextColor, textAlign: 'center'}}>
|
<Text style={{ color: BlueApp.settings.buttonTextColor, textAlign: 'center' }}>{loc.receive.scan_lnurl}</Text>
|
||||||
{loc.receive.scan_lnurl}
|
|
||||||
</Text>
|
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
|
@ -179,12 +187,12 @@ export default class LNDCreateInvoice extends Component {
|
||||||
onChangeText={text => {
|
onChangeText={text => {
|
||||||
if (this.state.lnurlParams) {
|
if (this.state.lnurlParams) {
|
||||||
// in this case we prevent the user from changing the amount to < min or > max
|
// in this case we prevent the user from changing the amount to < min or > max
|
||||||
let {min, max} = this.state.lnurlParams;
|
let { min, max } = this.state.lnurlParams;
|
||||||
let nextAmount = parseInt(text)
|
let nextAmount = parseInt(text);
|
||||||
if (nextAmount < min) {
|
if (nextAmount < min) {
|
||||||
text = min.toString()
|
text = min.toString();
|
||||||
} else if (nextAmount > max) {
|
} else if (nextAmount > max) {
|
||||||
text = max.toString()
|
text = max.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,16 +1,6 @@
|
||||||
/* global alert */
|
/* global alert */
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import {
|
import { Text, View, ActivityIndicator, InteractionManager, FlatList, RefreshControl, TouchableOpacity, StatusBar } from 'react-native';
|
||||||
Text,
|
|
||||||
View,
|
|
||||||
ActivityIndicator,
|
|
||||||
InteractionManager,
|
|
||||||
FlatList,
|
|
||||||
RefreshControl,
|
|
||||||
TouchableOpacity,
|
|
||||||
StatusBar,
|
|
||||||
StyleSheet,
|
|
||||||
} from 'react-native';
|
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { NavigationEvents } from 'react-navigation';
|
import { NavigationEvents } from 'react-navigation';
|
||||||
import { BlueSendButtonIcon, BlueReceiveButtonIcon, BlueTransactionListItem, BlueWalletNavigationHeader } from '../../BlueComponents';
|
import { BlueSendButtonIcon, BlueReceiveButtonIcon, BlueTransactionListItem, BlueWalletNavigationHeader } from '../../BlueComponents';
|
||||||
|
@ -392,11 +382,3 @@ WalletTransactions.propTypes = {
|
||||||
setParams: PropTypes.func,
|
setParams: PropTypes.func,
|
||||||
}),
|
}),
|
||||||
};
|
};
|
||||||
|
|
||||||
const styles = StyleSheet.create({
|
|
||||||
balance: {
|
|
||||||
flexDirection: 'row',
|
|
||||||
alignItems: 'center',
|
|
||||||
marginTop: 8,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue