mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-02-22 06:52:41 +01:00
FIX: Remove Lightning wallet creation limitation
This commit is contained in:
parent
204e4ba867
commit
aee5f407ee
3 changed files with 4 additions and 14 deletions
|
@ -33,7 +33,7 @@
|
|||
</dict>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>227</string>
|
||||
<string>228</string>
|
||||
<key>ITSAppUsesNonExemptEncryption</key>
|
||||
<false/>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
|
|
|
@ -14,7 +14,8 @@ module.exports = {
|
|||
wallets: {
|
||||
select_wallet: 'Select Wallet',
|
||||
options: 'options',
|
||||
createBitcoinWallet: 'In order to use a Lightning wallet, a Bitcoin wallet is needed to fund it. Would you like to continue anyway?',
|
||||
createBitcoinWallet:
|
||||
'You currently do not have a Bitcoin wallet. In order to fund a Lightning wallet, a Bitcoin wallet needs to be created or imported. Would you like to continue anyway?',
|
||||
list: {
|
||||
app_name: 'Blue Wallet',
|
||||
title: 'wallets',
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* global alert */
|
||||
import React, { Component } from 'react';
|
||||
import { Alert, AsyncStorage, ActivityIndicator, Keyboard, Dimensions, View, TextInput, TouchableWithoutFeedback } from 'react-native';
|
||||
import {
|
||||
|
@ -194,16 +193,6 @@ export default class WalletsAdd extends Component {
|
|||
|
||||
if (this.state.activeLightning) {
|
||||
// eslint-disable-next-line
|
||||
let hasBitcoinWallet = false;
|
||||
for (let t of BlueApp.getWallets()) {
|
||||
if (t.type === LightningCustodianWallet.type) {
|
||||
// already exist
|
||||
this.setState({ isLoading: false });
|
||||
return alert('Only 1 Lightning wallet allowed for now');
|
||||
} else if (t.type !== LightningCustodianWallet.type) {
|
||||
hasBitcoinWallet = true;
|
||||
}
|
||||
}
|
||||
|
||||
this.createLightningWallet = async () => {
|
||||
w = new LightningCustodianWallet();
|
||||
|
@ -232,7 +221,7 @@ export default class WalletsAdd extends Component {
|
|||
this.props.navigation.dismiss();
|
||||
};
|
||||
|
||||
if (!hasBitcoinWallet) {
|
||||
if (!BlueApp.getWallets().some(wallet => wallet.type !== LightningCustodianWallet.type)) {
|
||||
Alert.alert(
|
||||
loc.wallets.add.lightning,
|
||||
loc.wallets.createBitcoinWallet,
|
||||
|
|
Loading…
Add table
Reference in a new issue