mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-03-12 02:08:22 +01:00
FIX: Many layout bug fixes.
ADD: Autofocus on number inputs OPS: Upgraded to React Native 0.58
This commit is contained in:
parent
6860f6f052
commit
0dccc4782d
29 changed files with 1200 additions and 800 deletions
|
@ -67,4 +67,4 @@ suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
|
||||||
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
|
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
|
||||||
|
|
||||||
[version]
|
[version]
|
||||||
^0.78.0
|
^0.85.0
|
||||||
|
|
|
@ -41,13 +41,14 @@ if (aspectRatio > 1.6) {
|
||||||
|
|
||||||
export class BlueButton extends Component {
|
export class BlueButton extends Component {
|
||||||
render() {
|
render() {
|
||||||
|
const backgroundColor = this.props.disabled ? '#99a0ab' : '#ccddf9';
|
||||||
return (
|
return (
|
||||||
<TouchableOpacity
|
<TouchableOpacity
|
||||||
style={{
|
style={{
|
||||||
flex: 1,
|
flex: 1,
|
||||||
borderWidth: 0.7,
|
borderWidth: 0.7,
|
||||||
borderColor: 'transparent',
|
borderColor: 'transparent',
|
||||||
backgroundColor: '#ccddf9',
|
backgroundColor: backgroundColor,
|
||||||
minHeight: 45,
|
minHeight: 45,
|
||||||
height: 45,
|
height: 45,
|
||||||
borderRadius: 25,
|
borderRadius: 25,
|
||||||
|
@ -59,7 +60,7 @@ export class BlueButton extends Component {
|
||||||
>
|
>
|
||||||
<View style={{ flexDirection: 'row', justifyContent: 'center', alignItems: 'center' }}>
|
<View style={{ flexDirection: 'row', justifyContent: 'center', alignItems: 'center' }}>
|
||||||
{this.props.icon && <Icon name={this.props.icon.name} type={this.props.icon.type} color={this.props.icon.color} />}
|
{this.props.icon && <Icon name={this.props.icon.name} type={this.props.icon.type} color={this.props.icon.color} />}
|
||||||
<Text style={{ marginHorizontal: 8, fontSize: 16, color: '#0c2550' }}>{this.props.title}</Text>
|
{this.props.title && <Text style={{ marginHorizontal: 8, fontSize: 16, color: '#0c2550' }}>{this.props.title}</Text>}
|
||||||
</View>
|
</View>
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
);
|
);
|
||||||
|
@ -203,7 +204,7 @@ export class BlueCopyTextToClipboard extends Component {
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
UIManager.setLayoutAnimationEnabledExperimental && UIManager.setLayoutAnimationEnabledExperimental(true);
|
if (Platform.OS === 'android') UIManager.setLayoutAnimationEnabledExperimental && UIManager.setLayoutAnimationEnabledExperimental(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
copyToClipboard = () => {
|
copyToClipboard = () => {
|
||||||
|
@ -1230,6 +1231,7 @@ export class BlueBitcoinAmount extends Component {
|
||||||
ref={textInput => (this.textInput = textInput)}
|
ref={textInput => (this.textInput = textInput)}
|
||||||
editable={!this.props.isLoading && !this.props.disabled}
|
editable={!this.props.isLoading && !this.props.disabled}
|
||||||
value={amount}
|
value={amount}
|
||||||
|
autoFocus={this.props.pointerEvents !== 'none'}
|
||||||
placeholderTextColor={this.props.disabled ? '#99a0ab' : '#0f5cc0'}
|
placeholderTextColor={this.props.disabled ? '#99a0ab' : '#0f5cc0'}
|
||||||
style={{
|
style={{
|
||||||
color: this.props.disabled ? '#99a0ab' : '#0f5cc0',
|
color: this.props.disabled ? '#99a0ab' : '#0f5cc0',
|
||||||
|
|
|
@ -8,23 +8,13 @@
|
||||||
# - `buck install -r android/app` - compile, install and run application
|
# - `buck install -r android/app` - compile, install and run application
|
||||||
#
|
#
|
||||||
|
|
||||||
|
load(":build_defs.bzl", "create_aar_targets", "create_jar_targets")
|
||||||
|
|
||||||
lib_deps = []
|
lib_deps = []
|
||||||
|
|
||||||
for jarfile in glob(['libs/*.jar']):
|
create_aar_targets(glob(["libs/*.aar"]))
|
||||||
name = 'jars__' + jarfile[jarfile.rindex('/') + 1: jarfile.rindex('.jar')]
|
|
||||||
lib_deps.append(':' + name)
|
|
||||||
prebuilt_jar(
|
|
||||||
name = name,
|
|
||||||
binary_jar = jarfile,
|
|
||||||
)
|
|
||||||
|
|
||||||
for aarfile in glob(['libs/*.aar']):
|
create_jar_targets(glob(["libs/*.jar"]))
|
||||||
name = 'aars__' + aarfile[aarfile.rindex('/') + 1: aarfile.rindex('.aar')]
|
|
||||||
lib_deps.append(':' + name)
|
|
||||||
android_prebuilt_aar(
|
|
||||||
name = name,
|
|
||||||
aar = aarfile,
|
|
||||||
)
|
|
||||||
|
|
||||||
android_library(
|
android_library(
|
||||||
name = "all-libs",
|
name = "all-libs",
|
||||||
|
|
|
@ -133,7 +133,6 @@
|
||||||
<orderEntry type="jdk" jdkName="Android API 27 Platform" jdkType="Android SDK" />
|
<orderEntry type="jdk" jdkName="Android API 27 Platform" jdkType="Android SDK" />
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
<orderEntry type="library" name="Gradle: org.webkit:android-jsc:r174650@aar" level="project" />
|
<orderEntry type="library" name="Gradle: org.webkit:android-jsc:r174650@aar" level="project" />
|
||||||
<orderEntry type="library" name="Gradle: com.google.android.gms:play-services-ads-identifier:16.0.0@aar" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: com.android.support:support-vector-drawable:27.1.1@aar" level="project" />
|
<orderEntry type="library" name="Gradle: com.android.support:support-vector-drawable:27.1.1@aar" level="project" />
|
||||||
<orderEntry type="library" name="Gradle: com.facebook.fresco:fresco:1.10.0@aar" level="project" />
|
<orderEntry type="library" name="Gradle: com.facebook.fresco:fresco:1.10.0@aar" level="project" />
|
||||||
<orderEntry type="library" name="Gradle: com.facebook.react:react-native:0.57.8@aar" level="project" />
|
<orderEntry type="library" name="Gradle: com.facebook.react:react-native:0.57.8@aar" level="project" />
|
||||||
|
@ -147,26 +146,21 @@
|
||||||
<orderEntry type="library" name="Gradle: com.squareup.okhttp3:okhttp:3.11.0@jar" level="project" />
|
<orderEntry type="library" name="Gradle: com.squareup.okhttp3:okhttp:3.11.0@jar" level="project" />
|
||||||
<orderEntry type="library" name="Gradle: com.parse.bolts:bolts-tasks:1.4.0@jar" level="project" />
|
<orderEntry type="library" name="Gradle: com.parse.bolts:bolts-tasks:1.4.0@jar" level="project" />
|
||||||
<orderEntry type="library" name="Gradle: com.android.support:exifinterface:28.0.0@aar" level="project" />
|
<orderEntry type="library" name="Gradle: com.android.support:exifinterface:28.0.0@aar" level="project" />
|
||||||
<orderEntry type="library" name="Gradle: com.google.android.gms:play-services-analytics-impl:16.0.6@aar" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: com.android.support:support-v4:27.1.1@aar" level="project" />
|
<orderEntry type="library" name="Gradle: com.android.support:support-v4:27.1.1@aar" level="project" />
|
||||||
<orderEntry type="library" name="Gradle: android.arch.core:runtime:1.1.0@aar" level="project" />
|
<orderEntry type="library" name="Gradle: android.arch.core:runtime:1.1.0@aar" level="project" />
|
||||||
<orderEntry type="library" name="Gradle: com.squareup.okhttp3:okhttp-urlconnection:3.11.0@jar" level="project" />
|
<orderEntry type="library" name="Gradle: com.squareup.okhttp3:okhttp-urlconnection:3.11.0@jar" level="project" />
|
||||||
<orderEntry type="library" name="Gradle: com.android.support:animated-vector-drawable:27.1.1@aar" level="project" />
|
<orderEntry type="library" name="Gradle: com.android.support:animated-vector-drawable:27.1.1@aar" level="project" />
|
||||||
<orderEntry type="library" name="Gradle: com.facebook.fresco:imagepipeline-okhttp3:1.10.0@aar" level="project" />
|
<orderEntry type="library" name="Gradle: com.facebook.fresco:imagepipeline-okhttp3:1.10.0@aar" level="project" />
|
||||||
<orderEntry type="library" name="Gradle: com.google.android.gms:play-services-tagmanager-v4-impl:16.0.6@aar" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: com.facebook.fresco:imagepipeline-base:1.10.0@aar" level="project" />
|
<orderEntry type="library" name="Gradle: com.facebook.fresco:imagepipeline-base:1.10.0@aar" level="project" />
|
||||||
<orderEntry type="library" name="Gradle: io.sentry:sentry:1.7.5@jar" level="project" />
|
<orderEntry type="library" name="Gradle: io.sentry:sentry:1.7.5@jar" level="project" />
|
||||||
<orderEntry type="library" name="Gradle: com.google.android.gms:play-services-stats:16.0.1@aar" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: com.squareup.okio:okio:1.14.0@jar" level="project" />
|
<orderEntry type="library" name="Gradle: com.squareup.okio:okio:1.14.0@jar" level="project" />
|
||||||
<orderEntry type="library" name="Gradle: javax.inject:javax.inject:1@jar" level="project" />
|
<orderEntry type="library" name="Gradle: javax.inject:javax.inject:1@jar" level="project" />
|
||||||
<orderEntry type="library" name="Gradle: com.google.android.gms:play-services-base:16.0.1@aar" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: com.android.support:support-core-ui:27.1.1@aar" level="project" />
|
<orderEntry type="library" name="Gradle: com.android.support:support-core-ui:27.1.1@aar" level="project" />
|
||||||
<orderEntry type="library" name="Gradle: com.android.support:support-compat:27.1.1@aar" level="project" />
|
<orderEntry type="library" name="Gradle: com.android.support:support-compat:27.1.1@aar" level="project" />
|
||||||
<orderEntry type="library" name="Gradle: com.facebook.infer.annotation:infer-annotation:0.11.2@jar" level="project" />
|
<orderEntry type="library" name="Gradle: com.facebook.infer.annotation:infer-annotation:0.11.2@jar" level="project" />
|
||||||
<orderEntry type="library" name="Gradle: com.facebook.fresco:imagepipeline:1.10.0@aar" level="project" />
|
<orderEntry type="library" name="Gradle: com.facebook.fresco:imagepipeline:1.10.0@aar" level="project" />
|
||||||
<orderEntry type="library" name="Gradle: org.slf4j:slf4j-api:1.7.24@jar" level="project" />
|
<orderEntry type="library" name="Gradle: org.slf4j:slf4j-api:1.7.24@jar" level="project" />
|
||||||
<orderEntry type="library" name="Gradle: com.android.support:support-media-compat:27.1.1@aar" level="project" />
|
<orderEntry type="library" name="Gradle: com.android.support:support-media-compat:27.1.1@aar" level="project" />
|
||||||
<orderEntry type="library" name="Gradle: com.google.android.gms:play-services-basement:16.0.1@aar" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: com.google.code.findbugs:jsr305:3.0.2@jar" level="project" />
|
<orderEntry type="library" name="Gradle: com.google.code.findbugs:jsr305:3.0.2@jar" level="project" />
|
||||||
<orderEntry type="library" name="Gradle: com.android.support:support-fragment:27.1.1@aar" level="project" />
|
<orderEntry type="library" name="Gradle: com.android.support:support-fragment:27.1.1@aar" level="project" />
|
||||||
<orderEntry type="library" name="Gradle: io.sentry:sentry-android:1.7.5@jar" level="project" />
|
<orderEntry type="library" name="Gradle: io.sentry:sentry-android:1.7.5@jar" level="project" />
|
||||||
|
@ -174,10 +168,7 @@
|
||||||
<orderEntry type="library" name="Gradle: com.android.support:appcompat-v7:27.1.1@aar" level="project" />
|
<orderEntry type="library" name="Gradle: com.android.support:appcompat-v7:27.1.1@aar" level="project" />
|
||||||
<orderEntry type="library" name="Gradle: android.arch.core:common:1.1.0@jar" level="project" />
|
<orderEntry type="library" name="Gradle: android.arch.core:common:1.1.0@jar" level="project" />
|
||||||
<orderEntry type="library" name="Gradle: com.fasterxml.jackson.core:jackson-core:2.8.7@jar" level="project" />
|
<orderEntry type="library" name="Gradle: com.fasterxml.jackson.core:jackson-core:2.8.7@jar" level="project" />
|
||||||
<orderEntry type="library" name="Gradle: com.google.android.gms:play-services-measurement-base:16.0.5@aar" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: com.facebook.soloader:soloader:0.5.1@aar" level="project" />
|
<orderEntry type="library" name="Gradle: com.facebook.soloader:soloader:0.5.1@aar" level="project" />
|
||||||
<orderEntry type="library" name="Gradle: com.google.android.gms:play-services-tasks:16.0.1@aar" level="project" />
|
|
||||||
<orderEntry type="library" name="Gradle: com.google.android.gms:play-services-analytics:16.0.6@aar" level="project" />
|
|
||||||
<orderEntry type="module" module-name="react-native-webview" />
|
<orderEntry type="module" module-name="react-native-webview" />
|
||||||
<orderEntry type="module" module-name="react-native-linear-gradient" />
|
<orderEntry type="module" module-name="react-native-linear-gradient" />
|
||||||
<orderEntry type="module" module-name="react-native-svg" />
|
<orderEntry type="module" module-name="react-native-svg" />
|
||||||
|
|
|
@ -126,7 +126,7 @@ android {
|
||||||
variant.outputs.each { output ->
|
variant.outputs.each { output ->
|
||||||
// For each separate APK per architecture, set a unique version code as described here:
|
// For each separate APK per architecture, set a unique version code as described here:
|
||||||
// http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
|
// http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
|
||||||
def versionCodes = ["armeabi-v7a":1, "x86":2]
|
def versionCodes = ["armeabi-v7a":1, "x86":2, "arm64-v8a": 3]
|
||||||
def abi = output.getFilter(OutputFile.ABI)
|
def abi = output.getFilter(OutputFile.ABI)
|
||||||
if (abi != null) { // null for the universal-debug, universal-release variants
|
if (abi != null) { // null for the universal-debug, universal-release variants
|
||||||
output.versionCodeOverride =
|
output.versionCodeOverride =
|
||||||
|
@ -137,22 +137,19 @@ android {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile project(':react-native-webview')
|
implementation project(':react-native-webview')
|
||||||
compile project(':react-native-vector-icons')
|
implementation project(':react-native-svg')
|
||||||
compile project(':react-native-svg')
|
implementation project(':react-native-vector-icons')
|
||||||
compile project(':react-native-camera')
|
implementation project(':react-native-sentry')
|
||||||
compile project(':react-native-sentry')
|
implementation project(':react-native-randombytes')
|
||||||
compile project(':react-native-randombytes')
|
implementation project(':react-native-prompt-android')
|
||||||
compile project(':react-native-prompt-android')
|
implementation project(':react-native-linear-gradient')
|
||||||
compile project(':react-native-linear-gradient')
|
implementation project(':react-native-haptic-feedback')
|
||||||
compile project(':react-native-haptic-feedback')
|
implementation project(':react-native-google-analytics-bridge')
|
||||||
compile project(':react-native-google-analytics-bridge')
|
implementation project(':react-native-gesture-handler')
|
||||||
compile project(':react-native-gesture-handler')
|
implementation project(':react-native-fs')
|
||||||
compile project(':react-native-fs')
|
implementation project(':react-native-device-info')
|
||||||
compile project(':react-native-device-info')
|
implementation project(':react-native-camera')
|
||||||
implementation "com.android.support:exifinterface:+"
|
|
||||||
implementation "com.android.support:support-annotations:+"
|
|
||||||
implementation "com.android.support:support-v4:27.1.1"
|
|
||||||
implementation fileTree(dir: "libs", include: ["*.jar"])
|
implementation fileTree(dir: "libs", include: ["*.jar"])
|
||||||
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
|
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
|
||||||
implementation "com.facebook.react:react-native:+" // From node_modules
|
implementation "com.facebook.react:react-native:+" // From node_modules
|
||||||
|
|
19
android/app/build_defs.bzl
Normal file
19
android/app/build_defs.bzl
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
"""Helper definitions to glob .aar and .jar targets"""
|
||||||
|
|
||||||
|
def create_aar_targets(aarfiles):
|
||||||
|
for aarfile in aarfiles:
|
||||||
|
name = "aars__" + aarfile[aarfile.rindex("/") + 1:aarfile.rindex(".aar")]
|
||||||
|
lib_deps.append(":" + name)
|
||||||
|
android_prebuilt_aar(
|
||||||
|
name = name,
|
||||||
|
aar = aarfile,
|
||||||
|
)
|
||||||
|
|
||||||
|
def create_jar_targets(jarfiles):
|
||||||
|
for jarfile in jarfiles:
|
||||||
|
name = "jars__" + jarfile[jarfile.rindex("/") + 1:jarfile.rindex(".jar")]
|
||||||
|
lib_deps.append(":" + name)
|
||||||
|
prebuilt_jar(
|
||||||
|
name = name,
|
||||||
|
binary_jar = jarfile,
|
||||||
|
)
|
|
@ -4,11 +4,11 @@
|
||||||
<uses-permission android:name="android.permission.INTERNET" />
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
|
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
|
||||||
<uses-permission android:name="android.permission.CAMERA"/>
|
<uses-permission android:name="android.permission.CAMERA"/>
|
||||||
|
|
||||||
<application
|
<application
|
||||||
android:name=".MainApplication"
|
android:name=".MainApplication"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:icon="@mipmap/ic_launcher"
|
android:icon="@mipmap/ic_launcher"
|
||||||
|
android:roundIcon="@mipmap/ic_launcher_round"
|
||||||
android:allowBackup="false"
|
android:allowBackup="false"
|
||||||
android:theme="@style/AppTheme">
|
android:theme="@style/AppTheme">
|
||||||
<activity
|
<activity
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -3,6 +3,17 @@ package io.bluewallet.bluewallet;
|
||||||
import android.app.Application;
|
import android.app.Application;
|
||||||
|
|
||||||
import com.facebook.react.ReactApplication;
|
import com.facebook.react.ReactApplication;
|
||||||
|
import com.reactnativecommunity.webview.RNCWebViewPackage;
|
||||||
|
import io.sentry.RNSentryPackage;
|
||||||
|
import com.bitgo.randombytes.RandomBytesPackage;
|
||||||
|
import im.shimo.react.prompt.RNPromptPackage;
|
||||||
|
import com.BV.LinearGradient.LinearGradientPackage;
|
||||||
|
import com.mkuczera.RNReactNativeHapticFeedbackPackage;
|
||||||
|
import com.idehub.GoogleAnalyticsBridge.GoogleAnalyticsBridgePackage;
|
||||||
|
import com.swmansion.gesturehandler.react.RNGestureHandlerPackage;
|
||||||
|
import com.rnfs.RNFSPackage;
|
||||||
|
import com.learnium.RNDeviceInfo.RNDeviceInfo;
|
||||||
|
import org.reactnative.camera.RNCameraPackage;
|
||||||
import io.sentry.RNSentryPackage;
|
import io.sentry.RNSentryPackage;
|
||||||
import com.bitgo.randombytes.RandomBytesPackage;
|
import com.bitgo.randombytes.RandomBytesPackage;
|
||||||
import im.shimo.react.prompt.RNPromptPackage;
|
import im.shimo.react.prompt.RNPromptPackage;
|
||||||
|
@ -42,19 +53,18 @@ public class MainApplication extends Application implements ReactApplication {
|
||||||
protected List<ReactPackage> getPackages() {
|
protected List<ReactPackage> getPackages() {
|
||||||
return Arrays.<ReactPackage>asList(
|
return Arrays.<ReactPackage>asList(
|
||||||
new MainReactPackage(),
|
new MainReactPackage(),
|
||||||
|
new RNCWebViewPackage(),
|
||||||
new RNSentryPackage(),
|
new RNSentryPackage(),
|
||||||
new RandomBytesPackage(),
|
new RandomBytesPackage(),
|
||||||
new RNPromptPackage(),
|
new RNPromptPackage(),
|
||||||
new LinearGradientPackage(),
|
|
||||||
new RNReactNativeHapticFeedbackPackage(),
|
new RNReactNativeHapticFeedbackPackage(),
|
||||||
new GoogleAnalyticsBridgePackage(),
|
new GoogleAnalyticsBridgePackage(),
|
||||||
new RNCWebViewPackage(),
|
new RNDeviceInfo(),
|
||||||
|
new LinearGradientPackage(),
|
||||||
new RNFSPackage() ,
|
new RNFSPackage() ,
|
||||||
new VectorIconsPackage(),
|
new VectorIconsPackage(),
|
||||||
new SvgPackage(),
|
new SvgPackage(),
|
||||||
new LinearGradientPackage(),
|
new RNCameraPackage(),
|
||||||
new RNDeviceInfo(),
|
|
||||||
new RNCameraPackage(),
|
|
||||||
new RNGestureHandlerPackage()
|
new RNGestureHandlerPackage()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
ext {
|
ext {
|
||||||
buildToolsVersion = "28.0.3"
|
buildToolsVersion = "28.0.2"
|
||||||
minSdkVersion = 16
|
minSdkVersion = 16
|
||||||
compileSdkVersion = 27
|
compileSdkVersion = 28
|
||||||
targetSdkVersion = 26
|
targetSdkVersion = 27
|
||||||
supportLibVersion = "27.1.1"
|
supportLibVersion = "28.0.0"
|
||||||
}
|
}
|
||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
|
@ -34,6 +34,6 @@ allprojects {
|
||||||
|
|
||||||
|
|
||||||
task wrapper(type: Wrapper) {
|
task wrapper(type: Wrapper) {
|
||||||
gradleVersion = '4.4'
|
gradleVersion = '4.7'
|
||||||
distributionUrl = distributionUrl.replace("bin", "all")
|
distributionUrl = distributionUrl.replace("bin", "all")
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
#Sat Jan 19 02:29:20 GMT 2019
|
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-4.7-all.zip
|
||||||
|
|
|
@ -3,10 +3,6 @@ include ':react-native-webview'
|
||||||
project(':react-native-webview').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-webview/android')
|
project(':react-native-webview').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-webview/android')
|
||||||
include ':react-native-svg'
|
include ':react-native-svg'
|
||||||
project(':react-native-svg').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-svg/android')
|
project(':react-native-svg').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-svg/android')
|
||||||
include ':react-native-fs'
|
|
||||||
project(':react-native-fs').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-fs/android')
|
|
||||||
include ':react-native-gesture-handler'
|
|
||||||
project(':react-native-gesture-handler').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-gesture-handler/android')
|
|
||||||
include ':react-native-vector-icons'
|
include ':react-native-vector-icons'
|
||||||
project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android')
|
project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android')
|
||||||
include ':react-native-sentry'
|
include ':react-native-sentry'
|
||||||
|
@ -21,6 +17,10 @@ include ':react-native-haptic-feedback'
|
||||||
project(':react-native-haptic-feedback').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-haptic-feedback/android')
|
project(':react-native-haptic-feedback').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-haptic-feedback/android')
|
||||||
include ':react-native-google-analytics-bridge'
|
include ':react-native-google-analytics-bridge'
|
||||||
project(':react-native-google-analytics-bridge').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-google-analytics-bridge/android')
|
project(':react-native-google-analytics-bridge').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-google-analytics-bridge/android')
|
||||||
|
include ':react-native-gesture-handler'
|
||||||
|
project(':react-native-gesture-handler').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-gesture-handler/android')
|
||||||
|
include ':react-native-fs'
|
||||||
|
project(':react-native-fs').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-fs/android')
|
||||||
include ':react-native-device-info'
|
include ':react-native-device-info'
|
||||||
project(':react-native-device-info').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-device-info/android')
|
project(':react-native-device-info').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-device-info/android')
|
||||||
include ':react-native-camera'
|
include ':react-native-camera'
|
||||||
|
|
3
babel.config.js
Normal file
3
babel.config.js
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
module.exports = {
|
||||||
|
presets: ['module:metro-react-native-babel-preset'],
|
||||||
|
};
|
File diff suppressed because it is too large
Load diff
|
@ -1,5 +1,5 @@
|
||||||
/**
|
/**
|
||||||
* Copyright (c) 2015-present, Facebook, Inc.
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
*
|
*
|
||||||
* This source code is licensed under the MIT license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/**
|
/**
|
||||||
* Copyright (c) 2015-present, Facebook, Inc.
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
*
|
*
|
||||||
* This source code is licensed under the MIT license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
@ -22,18 +22,14 @@
|
||||||
{
|
{
|
||||||
NSURL *jsCodeLocation;
|
NSURL *jsCodeLocation;
|
||||||
|
|
||||||
#ifdef DEBUG
|
jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
|
||||||
jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
|
|
||||||
#else
|
|
||||||
jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
|
|
||||||
#endif
|
|
||||||
|
|
||||||
RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
|
RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
|
||||||
moduleName:@"BlueWallet"
|
moduleName:@"BlueWallet"
|
||||||
initialProperties:nil
|
initialProperties:nil
|
||||||
launchOptions:launchOptions];
|
launchOptions:launchOptions];
|
||||||
rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
|
rootView.backgroundColor = [UIColor blackColor];
|
||||||
[RNSentry installWithRootView:rootView];
|
|
||||||
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
|
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
|
||||||
UIViewController *rootViewController = [UIViewController new];
|
UIViewController *rootViewController = [UIViewController new];
|
||||||
rootViewController.view = rootView;
|
rootViewController.view = rootView;
|
||||||
|
|
|
@ -56,7 +56,7 @@
|
||||||
<key>NSCalendarsUsageDescription</key>
|
<key>NSCalendarsUsageDescription</key>
|
||||||
<string>This alert should not show up as we do not require this data</string>
|
<string>This alert should not show up as we do not require this data</string>
|
||||||
<key>NSCameraUsageDescription</key>
|
<key>NSCameraUsageDescription</key>
|
||||||
<string>In order to quickly scan the recipient's address, we need your permission to use the camera to scan their QR Code.</string>
|
<string>In order to quickly scan the recipient's address, we need your permission to use the camera to scan their QR Code.</string>
|
||||||
<key>NSLocationWhenInUseUsageDescription</key>
|
<key>NSLocationWhenInUseUsageDescription</key>
|
||||||
<string>This alert should not show up as we do not require this data</string>
|
<string>This alert should not show up as we do not require this data</string>
|
||||||
<key>NSMotionUsageDescription</key>
|
<key>NSMotionUsageDescription</key>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/**
|
/**
|
||||||
* Copyright (c) 2015-present, Facebook, Inc.
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
*
|
*
|
||||||
* This source code is licensed under the MIT license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/**
|
/**
|
||||||
* Copyright (c) 2015-present, Facebook, Inc.
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
*
|
*
|
||||||
* This source code is licensed under the MIT license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
|
649
package-lock.json
generated
649
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -59,7 +59,7 @@
|
||||||
"prop-types": "^15.6.2",
|
"prop-types": "^15.6.2",
|
||||||
"react": "^16.7.0",
|
"react": "^16.7.0",
|
||||||
"react-localization": "^1.0.10",
|
"react-localization": "^1.0.10",
|
||||||
"react-native": "^0.57.8",
|
"react-native": "^0.58.0",
|
||||||
"react-native-camera": "^1.9.1",
|
"react-native-camera": "^1.9.1",
|
||||||
"react-native-custom-qr-codes": "^2.0.0",
|
"react-native-custom-qr-codes": "^2.0.0",
|
||||||
"react-native-device-info": "^0.25.1",
|
"react-native-device-info": "^0.25.1",
|
||||||
|
@ -80,9 +80,9 @@
|
||||||
"react-native-sentry": "^0.40.2",
|
"react-native-sentry": "^0.40.2",
|
||||||
"react-native-snap-carousel": "^3.7.4",
|
"react-native-snap-carousel": "^3.7.4",
|
||||||
"react-native-sortable-list": "0.0.22",
|
"react-native-sortable-list": "0.0.22",
|
||||||
"react-native-svg": "^9.0.3",
|
"react-native-svg": "^9.0.4",
|
||||||
"react-native-vector-icons": "^6.2.0",
|
"react-native-vector-icons": "^6.2.0",
|
||||||
"react-native-webview": "2.8.0",
|
"react-native-webview": "^3.2.1",
|
||||||
"react-native-wkwebview-reborn": "^2.0.0",
|
"react-native-wkwebview-reborn": "^2.0.0",
|
||||||
"react-navigation": "^3.0.9",
|
"react-navigation": "^3.0.9",
|
||||||
"react-test-render": "^1.1.1",
|
"react-test-render": "^1.1.1",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* global alert */
|
/* global alert */
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Text, Dimensions, ActivityIndicator, View, TouchableWithoutFeedback, Keyboard } from 'react-native';
|
import { Text, ActivityIndicator, View, TouchableWithoutFeedback, Keyboard } from 'react-native';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import {
|
import {
|
||||||
BlueSpacing20,
|
BlueSpacing20,
|
||||||
|
@ -17,7 +17,6 @@ import { BitcoinUnit } from '../../models/bitcoinUnits';
|
||||||
let BlueApp = require('../../BlueApp');
|
let BlueApp = require('../../BlueApp');
|
||||||
let EV = require('../../events');
|
let EV = require('../../events');
|
||||||
let loc = require('../../loc');
|
let loc = require('../../loc');
|
||||||
const { width } = Dimensions.get('window');
|
|
||||||
|
|
||||||
export default class ScanLndInvoice extends React.Component {
|
export default class ScanLndInvoice extends React.Component {
|
||||||
static navigationOptions = ({ navigation }) => ({
|
static navigationOptions = ({ navigation }) => ({
|
||||||
|
@ -36,7 +35,7 @@ export default class ScanLndInvoice extends React.Component {
|
||||||
|
|
||||||
if (!BlueApp.getWallets().some(item => item.type === LightningCustodianWallet.type)) {
|
if (!BlueApp.getWallets().some(item => item.type === LightningCustodianWallet.type)) {
|
||||||
alert('Before paying a Lightning invoice, you must first add a Lightning wallet.');
|
alert('Before paying a Lightning invoice, you must first add a Lightning wallet.');
|
||||||
props.navigation.dismiss();
|
// props.navigation.dismiss();
|
||||||
} else {
|
} else {
|
||||||
let fromSecret;
|
let fromSecret;
|
||||||
if (props.navigation.state.params.fromSecret) fromSecret = props.navigation.state.params.fromSecret;
|
if (props.navigation.state.params.fromSecret) fromSecret = props.navigation.state.params.fromSecret;
|
||||||
|
@ -72,7 +71,6 @@ export default class ScanLndInvoice extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
processInvoice = data => {
|
processInvoice = data => {
|
||||||
this.props.navigation.goBack(null);
|
|
||||||
this.setState({ isLoading: true }, async () => {
|
this.setState({ isLoading: true }, async () => {
|
||||||
if (this.ignoreRead) return;
|
if (this.ignoreRead) return;
|
||||||
this.ignoreRead = true;
|
this.ignoreRead = true;
|
||||||
|
@ -237,27 +235,26 @@ export default class ScanLndInvoice extends React.Component {
|
||||||
{this.state.expiresIn !== undefined && (
|
{this.state.expiresIn !== undefined && (
|
||||||
<Text style={{ color: '#81868e', fontSize: 12, left: 20, top: 10 }}>Expires in: {this.state.expiresIn}</Text>
|
<Text style={{ color: '#81868e', fontSize: 12, left: 20, top: 10 }}>Expires in: {this.state.expiresIn}</Text>
|
||||||
)}
|
)}
|
||||||
|
<BlueSpacing20 />
|
||||||
|
{this.state.isLoading ? (
|
||||||
|
<View>
|
||||||
|
<ActivityIndicator />
|
||||||
|
</View>
|
||||||
|
) : (
|
||||||
|
<BlueButton
|
||||||
|
icon={{
|
||||||
|
name: 'bolt',
|
||||||
|
type: 'font-awesome',
|
||||||
|
color: BlueApp.settings.buttonTextColor,
|
||||||
|
}}
|
||||||
|
title={'Pay'}
|
||||||
|
onPress={() => {
|
||||||
|
this.pay();
|
||||||
|
}}
|
||||||
|
disabled={this.shouldDisablePayButton()}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
</BlueCard>
|
</BlueCard>
|
||||||
<BlueSpacing20 />
|
|
||||||
{this.state.isLoading ? (
|
|
||||||
<View>
|
|
||||||
<ActivityIndicator />
|
|
||||||
</View>
|
|
||||||
) : (
|
|
||||||
<BlueButton
|
|
||||||
icon={{
|
|
||||||
name: 'bolt',
|
|
||||||
type: 'font-awesome',
|
|
||||||
color: BlueApp.settings.buttonTextColor,
|
|
||||||
}}
|
|
||||||
title={'Pay'}
|
|
||||||
buttonStyle={{ width: 150, left: (width - 150) / 2 - 20 }}
|
|
||||||
onPress={() => {
|
|
||||||
this.pay();
|
|
||||||
}}
|
|
||||||
disabled={this.shouldDisablePayButton()}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
</SafeBlueArea>
|
</SafeBlueArea>
|
||||||
</TouchableWithoutFeedback>
|
</TouchableWithoutFeedback>
|
||||||
);
|
);
|
||||||
|
|
|
@ -97,7 +97,7 @@ export default class ReceiveDetails extends Component {
|
||||||
/>
|
/>
|
||||||
<BlueCopyTextToClipboard text={this.state.addressText} />
|
<BlueCopyTextToClipboard text={this.state.addressText} />
|
||||||
</View>
|
</View>
|
||||||
<View style={{ marginBottom: 24, alignItems: 'center' }}>
|
<View style={{ flex: 0.2, marginBottom: 24, alignItems: 'center' }}>
|
||||||
<BlueButtonLink
|
<BlueButtonLink
|
||||||
title={loc.receive.details.setAmount}
|
title={loc.receive.details.setAmount}
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
|
|
|
@ -3,7 +3,15 @@ import { View, Share, TextInput, KeyboardAvoidingView, Platform, Dimensions, Scr
|
||||||
import { QRCode as QRSlow } from 'react-native-custom-qr-codes';
|
import { QRCode as QRSlow } from 'react-native-custom-qr-codes';
|
||||||
import QRFast from 'react-native-qrcode';
|
import QRFast from 'react-native-qrcode';
|
||||||
import bip21 from 'bip21';
|
import bip21 from 'bip21';
|
||||||
import { SafeBlueArea, BlueButton, BlueNavigationStyle, BlueBitcoinAmount, BlueText, BlueCopyTextToClipboard } from '../../BlueComponents';
|
import {
|
||||||
|
SafeBlueArea,
|
||||||
|
BlueCard,
|
||||||
|
BlueButton,
|
||||||
|
BlueNavigationStyle,
|
||||||
|
BlueBitcoinAmount,
|
||||||
|
BlueText,
|
||||||
|
BlueCopyTextToClipboard,
|
||||||
|
} from '../../BlueComponents';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
/** @type {AppStorage} */
|
/** @type {AppStorage} */
|
||||||
let BlueApp = require('../../BlueApp');
|
let BlueApp = require('../../BlueApp');
|
||||||
|
@ -75,15 +83,17 @@ export default class ReceiveAmount extends Component {
|
||||||
editable={!this.state.isLoading}
|
editable={!this.state.isLoading}
|
||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
<BlueButton
|
<BlueCard>
|
||||||
title={loc.receive.create}
|
<BlueButton
|
||||||
onPress={() => {
|
title={loc.receive.details.create}
|
||||||
this.setState({
|
onPress={() => {
|
||||||
amountSet: true,
|
this.setState({
|
||||||
bip21: bip21.encode(this.state.address, { amount: this.state.amount, label: this.state.label }),
|
amountSet: true,
|
||||||
});
|
bip21: bip21.encode(this.state.address, { amount: this.state.amount, label: this.state.label }),
|
||||||
}}
|
});
|
||||||
/>
|
}}
|
||||||
|
/>
|
||||||
|
</BlueCard>
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -113,7 +123,7 @@ export default class ReceiveAmount extends Component {
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</View>
|
</View>
|
||||||
<View style={{ marginBottom: 24, alignItems: 'center', justifyContent: 'space-between' }}>
|
<View style={{ alignItems: 'center', justifyContent: 'space-between' }}>
|
||||||
<BlueCopyTextToClipboard text={this.state.bip21} />
|
<BlueCopyTextToClipboard text={this.state.bip21} />
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
@ -134,23 +144,21 @@ export default class ReceiveAmount extends Component {
|
||||||
{this.state.amountSet ? this.renderWithSetAmount() : this.renderDefault()}
|
{this.state.amountSet ? this.renderWithSetAmount() : this.renderDefault()}
|
||||||
</KeyboardAvoidingView>
|
</KeyboardAvoidingView>
|
||||||
{this.state.amountSet && (
|
{this.state.amountSet && (
|
||||||
<BlueButton
|
<BlueCard>
|
||||||
buttonStyle={{
|
<BlueButton
|
||||||
alignSelf: 'center',
|
icon={{
|
||||||
marginBottom: 24,
|
name: 'share-alternative',
|
||||||
}}
|
type: 'entypo',
|
||||||
icon={{
|
color: BlueApp.settings.buttonTextColor,
|
||||||
name: 'share-alternative',
|
}}
|
||||||
type: 'entypo',
|
onPress={async () => {
|
||||||
color: BlueApp.settings.buttonTextColor,
|
Share.share({
|
||||||
}}
|
message: this.state.bip21,
|
||||||
onPress={async () => {
|
});
|
||||||
Share.share({
|
}}
|
||||||
message: this.state.bip21,
|
title={loc.receive.details.share}
|
||||||
});
|
/>
|
||||||
}}
|
</BlueCard>
|
||||||
title={loc.receive.details.share}
|
|
||||||
/>
|
|
||||||
)}
|
)}
|
||||||
</View>
|
</View>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
|
|
@ -25,6 +25,7 @@ export default class CameraExample extends React.Component {
|
||||||
|
|
||||||
const onBarScanned = this.props.navigation.getParam('onBarScanned');
|
const onBarScanned = this.props.navigation.getParam('onBarScanned');
|
||||||
onBarScanned(ret.data);
|
onBarScanned(ret.data);
|
||||||
|
this.props.navigation.goBack(null);
|
||||||
} // end
|
} // end
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
|
|
|
@ -120,88 +120,88 @@ export default class WalletDetails extends Component {
|
||||||
{loc.wallets.details.type.toLowerCase()}
|
{loc.wallets.details.type.toLowerCase()}
|
||||||
</Text>
|
</Text>
|
||||||
<Text style={{ color: '#81868e', fontWeight: '500', fontSize: 14 }}>{this.state.wallet.typeReadable}</Text>
|
<Text style={{ color: '#81868e', fontWeight: '500', fontSize: 14 }}>{this.state.wallet.typeReadable}</Text>
|
||||||
</BlueCard>
|
<View>
|
||||||
<View>
|
<BlueSpacing20 />
|
||||||
<BlueSpacing20 />
|
|
||||||
<BlueButton
|
|
||||||
onPress={() =>
|
|
||||||
this.props.navigation.navigate('WalletExport', {
|
|
||||||
address: this.state.wallet.getAddress(),
|
|
||||||
secret: this.state.wallet.getSecret(),
|
|
||||||
})
|
|
||||||
}
|
|
||||||
title={loc.wallets.details.export_backup}
|
|
||||||
/>
|
|
||||||
|
|
||||||
<BlueSpacing20 />
|
|
||||||
|
|
||||||
{(this.state.wallet.type === HDLegacyBreadwalletWallet.type ||
|
|
||||||
this.state.wallet.type === HDLegacyP2PKHWallet.type ||
|
|
||||||
this.state.wallet.type === HDSegwitP2SHWallet.type) && (
|
|
||||||
<React.Fragment>
|
|
||||||
<BlueButton
|
|
||||||
onPress={() =>
|
|
||||||
this.props.navigation.navigate('WalletXpub', {
|
|
||||||
secret: this.state.wallet.getSecret(),
|
|
||||||
})
|
|
||||||
}
|
|
||||||
title={loc.wallets.details.show_xpub}
|
|
||||||
/>
|
|
||||||
|
|
||||||
<BlueSpacing20 />
|
|
||||||
</React.Fragment>
|
|
||||||
)}
|
|
||||||
|
|
||||||
{this.state.wallet.type !== LightningCustodianWallet.type && (
|
|
||||||
<BlueButton
|
<BlueButton
|
||||||
icon={{
|
|
||||||
name: 'shopping-cart',
|
|
||||||
type: 'font-awesome',
|
|
||||||
color: BlueApp.settings.buttonTextColor,
|
|
||||||
}}
|
|
||||||
onPress={() =>
|
onPress={() =>
|
||||||
this.props.navigation.navigate('BuyBitcoin', {
|
this.props.navigation.navigate('WalletExport', {
|
||||||
address: this.state.wallet.getAddress(),
|
address: this.state.wallet.getAddress(),
|
||||||
secret: this.state.wallet.getSecret(),
|
secret: this.state.wallet.getSecret(),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
title={loc.wallets.details.buy_bitcoin}
|
title={loc.wallets.details.export_backup}
|
||||||
/>
|
/>
|
||||||
)}
|
|
||||||
<BlueSpacing20 />
|
|
||||||
|
|
||||||
<TouchableOpacity
|
<BlueSpacing20 />
|
||||||
style={{ alignItems: 'center' }}
|
|
||||||
onPress={() => {
|
{(this.state.wallet.type === HDLegacyBreadwalletWallet.type ||
|
||||||
ReactNativeHapticFeedback.trigger('notificationWarning', false);
|
this.state.wallet.type === HDLegacyP2PKHWallet.type ||
|
||||||
Alert.alert(
|
this.state.wallet.type === HDSegwitP2SHWallet.type) && (
|
||||||
loc.wallets.details.delete + ' ' + loc.wallets.details.title,
|
<React.Fragment>
|
||||||
loc.wallets.details.are_you_sure,
|
<BlueButton
|
||||||
[
|
onPress={() =>
|
||||||
{
|
this.props.navigation.navigate('WalletXpub', {
|
||||||
text: loc.wallets.details.yes_delete,
|
secret: this.state.wallet.getSecret(),
|
||||||
onPress: async () => {
|
})
|
||||||
this.props.navigation.setParams({ isLoading: true });
|
}
|
||||||
this.setState({ isLoading: true }, async () => {
|
title={loc.wallets.details.show_xpub}
|
||||||
BlueApp.deleteWallet(this.state.wallet);
|
/>
|
||||||
ReactNativeHapticFeedback.trigger('notificationSuccess', false);
|
|
||||||
await BlueApp.saveToDisk();
|
<BlueSpacing20 />
|
||||||
EV(EV.enum.TRANSACTIONS_COUNT_CHANGED);
|
</React.Fragment>
|
||||||
EV(EV.enum.WALLETS_COUNT_CHANGED);
|
)}
|
||||||
this.props.navigation.navigate('Wallets');
|
|
||||||
});
|
{this.state.wallet.type !== LightningCustodianWallet.type && (
|
||||||
|
<BlueButton
|
||||||
|
icon={{
|
||||||
|
name: 'shopping-cart',
|
||||||
|
type: 'font-awesome',
|
||||||
|
color: BlueApp.settings.buttonTextColor,
|
||||||
|
}}
|
||||||
|
onPress={() =>
|
||||||
|
this.props.navigation.navigate('BuyBitcoin', {
|
||||||
|
address: this.state.wallet.getAddress(),
|
||||||
|
secret: this.state.wallet.getSecret(),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
title={loc.wallets.details.buy_bitcoin}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
<BlueSpacing20 />
|
||||||
|
|
||||||
|
<TouchableOpacity
|
||||||
|
style={{ alignItems: 'center' }}
|
||||||
|
onPress={() => {
|
||||||
|
ReactNativeHapticFeedback.trigger('notificationWarning', false);
|
||||||
|
Alert.alert(
|
||||||
|
loc.wallets.details.delete + ' ' + loc.wallets.details.title,
|
||||||
|
loc.wallets.details.are_you_sure,
|
||||||
|
[
|
||||||
|
{
|
||||||
|
text: loc.wallets.details.yes_delete,
|
||||||
|
onPress: async () => {
|
||||||
|
this.props.navigation.setParams({ isLoading: true });
|
||||||
|
this.setState({ isLoading: true }, async () => {
|
||||||
|
BlueApp.deleteWallet(this.state.wallet);
|
||||||
|
ReactNativeHapticFeedback.trigger('notificationSuccess', false);
|
||||||
|
await BlueApp.saveToDisk();
|
||||||
|
EV(EV.enum.TRANSACTIONS_COUNT_CHANGED);
|
||||||
|
EV(EV.enum.WALLETS_COUNT_CHANGED);
|
||||||
|
this.props.navigation.navigate('Wallets');
|
||||||
|
});
|
||||||
|
},
|
||||||
|
style: 'destructive',
|
||||||
},
|
},
|
||||||
style: 'destructive',
|
{ text: loc.wallets.details.no_cancel, onPress: () => {}, style: 'cancel' },
|
||||||
},
|
],
|
||||||
{ text: loc.wallets.details.no_cancel, onPress: () => {}, style: 'cancel' },
|
{ cancelable: false },
|
||||||
],
|
);
|
||||||
{ cancelable: false },
|
}}
|
||||||
);
|
>
|
||||||
}}
|
<Text style={{ color: '#d0021b', fontSize: 15, fontWeight: '500' }}>{loc.wallets.details.delete}</Text>
|
||||||
>
|
</TouchableOpacity>
|
||||||
<Text style={{ color: '#d0021b', fontSize: 15, fontWeight: '500' }}>{loc.wallets.details.delete}</Text>
|
</View>
|
||||||
</TouchableOpacity>
|
</BlueCard>
|
||||||
</View>
|
|
||||||
</View>
|
</View>
|
||||||
</TouchableWithoutFeedback>
|
</TouchableWithoutFeedback>
|
||||||
</SafeBlueArea>
|
</SafeBlueArea>
|
||||||
|
|
|
@ -82,7 +82,7 @@ export default class WalletMigrate extends Component {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<View style={{ flex: 1, justifyContent: 'center', alignContent: 'center' }}>
|
<View style={{ flex: 1, justifyContent: 'center', alignContent: 'center', backgroundColor: '#ffffff' }}>
|
||||||
<ActivityIndicator />
|
<ActivityIndicator />
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Reference in a new issue