mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2024-11-19 18:00:17 +01:00
Merge branch 'master' into elecd
This commit is contained in:
commit
bc21d53a60
@ -1,6 +1,5 @@
|
|||||||
import { Alert as RNAlert, Platform, ToastAndroid } from 'react-native';
|
import { Alert as RNAlert, Platform, ToastAndroid } from 'react-native';
|
||||||
import triggerHapticFeedback, { HapticFeedbackTypes } from '../blue_modules/hapticFeedback';
|
import triggerHapticFeedback, { HapticFeedbackTypes } from '../blue_modules/hapticFeedback';
|
||||||
import loc from '../loc';
|
|
||||||
|
|
||||||
export enum AlertType {
|
export enum AlertType {
|
||||||
Alert,
|
Alert,
|
||||||
@ -29,7 +28,7 @@ const presentAlert = ({
|
|||||||
ToastAndroid.show(message, ToastAndroid.LONG);
|
ToastAndroid.show(message, ToastAndroid.LONG);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
RNAlert.alert(title ?? loc.alert.default, message);
|
RNAlert.alert(title ?? message, title && message ? message : undefined);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import React, { useState, useRef, forwardRef, useImperativeHandle, useEffect } from 'react';
|
import React, { useState, useRef, forwardRef, useImperativeHandle, useEffect } from 'react';
|
||||||
import { View, Text, TextInput, StyleSheet, Animated, Easing, ViewStyle, Keyboard, Platform, UIManager } from 'react-native';
|
import { View, Text, TextInput, StyleSheet, Animated, Easing, ViewStyle, Keyboard, Platform, UIManager, ScrollView } from 'react-native';
|
||||||
import BottomModal, { BottomModalHandle } from './BottomModal';
|
import BottomModal, { BottomModalHandle } from './BottomModal';
|
||||||
import { useTheme } from '../components/themes';
|
import { useTheme } from '../components/themes';
|
||||||
import loc from '../loc';
|
import loc from '../loc';
|
||||||
@ -46,6 +46,7 @@ const PromptPasswordConfirmationModal = forwardRef<PromptPasswordConfirmationMod
|
|||||||
const { colors } = useTheme();
|
const { colors } = useTheme();
|
||||||
const passwordInputRef = useRef<TextInput>(null);
|
const passwordInputRef = useRef<TextInput>(null);
|
||||||
const confirmPasswordInputRef = useRef<TextInput>(null);
|
const confirmPasswordInputRef = useRef<TextInput>(null);
|
||||||
|
const scrollView = useRef<ScrollView>(null);
|
||||||
|
|
||||||
const stylesHook = StyleSheet.create({
|
const stylesHook = StyleSheet.create({
|
||||||
modalContent: {
|
modalContent: {
|
||||||
@ -260,8 +261,11 @@ const PromptPasswordConfirmationModal = forwardRef<PromptPasswordConfirmationMod
|
|||||||
ref={modalRef}
|
ref={modalRef}
|
||||||
onDismiss={onModalDismiss}
|
onDismiss={onModalDismiss}
|
||||||
grabber={false}
|
grabber={false}
|
||||||
|
showCloseButton={!isSuccess}
|
||||||
onCloseModalPressed={handleCancel}
|
onCloseModalPressed={handleCancel}
|
||||||
backgroundColor={colors.modal}
|
backgroundColor={colors.modal}
|
||||||
|
scrollRef={scrollView}
|
||||||
|
dismissible={false}
|
||||||
footer={
|
footer={
|
||||||
!isSuccess ? (
|
!isSuccess ? (
|
||||||
showExplanation && modalType === MODAL_TYPES.CREATE_PASSWORD ? (
|
showExplanation && modalType === MODAL_TYPES.CREATE_PASSWORD ? (
|
||||||
@ -294,19 +298,21 @@ const PromptPasswordConfirmationModal = forwardRef<PromptPasswordConfirmationMod
|
|||||||
{modalType === MODAL_TYPES.CREATE_PASSWORD && showExplanation && (
|
{modalType === MODAL_TYPES.CREATE_PASSWORD && showExplanation && (
|
||||||
<Animated.View style={{ opacity: explanationOpacity }}>
|
<Animated.View style={{ opacity: explanationOpacity }}>
|
||||||
<Text style={[styles.textLabel, stylesHook.feeModalLabel]}>{loc.settings.encrypt_storage_explanation_headline}</Text>
|
<Text style={[styles.textLabel, stylesHook.feeModalLabel]}>{loc.settings.encrypt_storage_explanation_headline}</Text>
|
||||||
|
<Animated.ScrollView style={styles.explanationScrollView} ref={scrollView}>
|
||||||
<Text style={[styles.description, stylesHook.feeModalCustomText]}>
|
<Text style={[styles.description, stylesHook.feeModalCustomText]}>
|
||||||
{loc.settings.encrypt_storage_explanation_description_line1}
|
{loc.settings.encrypt_storage_explanation_description_line1}
|
||||||
</Text>
|
</Text>
|
||||||
<Text style={[styles.description, stylesHook.feeModalCustomText]}>
|
<Text style={[styles.description, stylesHook.feeModalCustomText]}>
|
||||||
{loc.settings.encrypt_storage_explanation_description_line2}
|
{loc.settings.encrypt_storage_explanation_description_line2}
|
||||||
</Text>
|
</Text>
|
||||||
|
</Animated.ScrollView>
|
||||||
<View style={styles.feeModalFooter} />
|
<View style={styles.feeModalFooter} />
|
||||||
</Animated.View>
|
</Animated.View>
|
||||||
)}
|
)}
|
||||||
{(modalType === MODAL_TYPES.ENTER_PASSWORD ||
|
{(modalType === MODAL_TYPES.ENTER_PASSWORD ||
|
||||||
((modalType === MODAL_TYPES.CREATE_PASSWORD || modalType === MODAL_TYPES.CREATE_FAKE_STORAGE) && !showExplanation)) && (
|
((modalType === MODAL_TYPES.CREATE_PASSWORD || modalType === MODAL_TYPES.CREATE_FAKE_STORAGE) && !showExplanation)) && (
|
||||||
<>
|
<>
|
||||||
<Text style={[styles.textLabel, stylesHook.feeModalLabel]}>
|
<Text adjustsFontSizeToFit style={[styles.textLabel, stylesHook.feeModalLabel]}>
|
||||||
{modalType === MODAL_TYPES.CREATE_PASSWORD
|
{modalType === MODAL_TYPES.CREATE_PASSWORD
|
||||||
? loc.settings.password_explain
|
? loc.settings.password_explain
|
||||||
: modalType === MODAL_TYPES.CREATE_FAKE_STORAGE
|
: modalType === MODAL_TYPES.CREATE_FAKE_STORAGE
|
||||||
@ -393,13 +399,13 @@ const styles = StyleSheet.create({
|
|||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
},
|
},
|
||||||
minHeight: {
|
minHeight: {
|
||||||
minHeight: 350,
|
minHeight: 260,
|
||||||
},
|
},
|
||||||
feeModalFooter: {
|
feeModalFooter: {
|
||||||
paddingHorizontal: 16,
|
paddingHorizontal: 16,
|
||||||
},
|
},
|
||||||
feeModalFooterSpacing: {
|
feeModalFooterSpacing: {
|
||||||
paddingHorizontal: 24,
|
paddingHorizontal: 16,
|
||||||
},
|
},
|
||||||
inputContainer: {
|
inputContainer: {
|
||||||
marginBottom: 10,
|
marginBottom: 10,
|
||||||
@ -440,4 +446,7 @@ const styles = StyleSheet.create({
|
|||||||
color: 'white',
|
color: 'white',
|
||||||
fontSize: 30,
|
fontSize: 30,
|
||||||
},
|
},
|
||||||
|
explanationScrollView: {
|
||||||
|
maxHeight: 200,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
@ -27,9 +27,6 @@
|
|||||||
"qr_custom_input_button": "10x antippen für individuelle Eingabe",
|
"qr_custom_input_button": "10x antippen für individuelle Eingabe",
|
||||||
"unlock": "Entsperren"
|
"unlock": "Entsperren"
|
||||||
},
|
},
|
||||||
"alert": {
|
|
||||||
"default": "Warnung"
|
|
||||||
},
|
|
||||||
"azteco": {
|
"azteco": {
|
||||||
"codeIs": "Dein Gutscheincode lautet",
|
"codeIs": "Dein Gutscheincode lautet",
|
||||||
"errorBeforeRefeem": "Vor dem Einlösen zuerst eine Bitcoin Wallet hinzufügen.",
|
"errorBeforeRefeem": "Vor dem Einlösen zuerst eine Bitcoin Wallet hinzufügen.",
|
||||||
|
@ -27,9 +27,6 @@
|
|||||||
"qr_custom_input_button": "Tap 10 times to enter custom input",
|
"qr_custom_input_button": "Tap 10 times to enter custom input",
|
||||||
"unlock": "Unlock"
|
"unlock": "Unlock"
|
||||||
},
|
},
|
||||||
"alert": {
|
|
||||||
"default": "Alert"
|
|
||||||
},
|
|
||||||
"azteco": {
|
"azteco": {
|
||||||
"codeIs": "Your voucher code is",
|
"codeIs": "Your voucher code is",
|
||||||
"errorBeforeRefeem": "Before redeeming, you must first add a Bitcoin wallet.",
|
"errorBeforeRefeem": "Before redeeming, you must first add a Bitcoin wallet.",
|
||||||
|
@ -27,9 +27,6 @@
|
|||||||
"qr_custom_input_button": "Pulsa 10 veces para ingresar una entrada personalizada",
|
"qr_custom_input_button": "Pulsa 10 veces para ingresar una entrada personalizada",
|
||||||
"unlock": "Desbloquear"
|
"unlock": "Desbloquear"
|
||||||
},
|
},
|
||||||
"alert": {
|
|
||||||
"default": "Alerta"
|
|
||||||
},
|
|
||||||
"azteco": {
|
"azteco": {
|
||||||
"codeIs": "Tu código de cupón es",
|
"codeIs": "Tu código de cupón es",
|
||||||
"errorBeforeRefeem": "Antes de canjear, primero debes agregar una billetera Bitcoin.",
|
"errorBeforeRefeem": "Antes de canjear, primero debes agregar una billetera Bitcoin.",
|
||||||
|
@ -27,9 +27,6 @@
|
|||||||
"qr_custom_input_button": "Tapnij 10 razy aby wprowadzić własne dane",
|
"qr_custom_input_button": "Tapnij 10 razy aby wprowadzić własne dane",
|
||||||
"unlock": "Odblokuj"
|
"unlock": "Odblokuj"
|
||||||
},
|
},
|
||||||
"alert": {
|
|
||||||
"default": "Powiadomienie"
|
|
||||||
},
|
|
||||||
"azteco": {
|
"azteco": {
|
||||||
"codeIs": "Kod twojego vouchera to",
|
"codeIs": "Kod twojego vouchera to",
|
||||||
"errorBeforeRefeem": "Zanim wykorzystasz kod rabatowy, musisz dodać najpierw portfel Bitcoinowy",
|
"errorBeforeRefeem": "Zanim wykorzystasz kod rabatowy, musisz dodać najpierw portfel Bitcoinowy",
|
||||||
|
24
package-lock.json
generated
24
package-lock.json
generated
@ -47,7 +47,7 @@
|
|||||||
"coinselect": "3.1.13",
|
"coinselect": "3.1.13",
|
||||||
"crypto-js": "4.2.0",
|
"crypto-js": "4.2.0",
|
||||||
"dayjs": "1.11.13",
|
"dayjs": "1.11.13",
|
||||||
"detox": "20.27.1",
|
"detox": "20.27.2",
|
||||||
"ecpair": "2.0.1",
|
"ecpair": "2.0.1",
|
||||||
"ecurve": "1.0.6",
|
"ecurve": "1.0.6",
|
||||||
"electrum-client": "github:BlueWallet/rn-electrum-client#1bfe3cc",
|
"electrum-client": "github:BlueWallet/rn-electrum-client#1bfe3cc",
|
||||||
@ -71,7 +71,7 @@
|
|||||||
"react-native-document-picker": "9.3.1",
|
"react-native-document-picker": "9.3.1",
|
||||||
"react-native-draggable-flatlist": "github:BlueWallet/react-native-draggable-flatlist#3a61627",
|
"react-native-draggable-flatlist": "github:BlueWallet/react-native-draggable-flatlist#3a61627",
|
||||||
"react-native-fs": "2.20.0",
|
"react-native-fs": "2.20.0",
|
||||||
"react-native-gesture-handler": "2.19.0",
|
"react-native-gesture-handler": "2.20.0",
|
||||||
"react-native-handoff": "github:BlueWallet/react-native-handoff#v0.0.4",
|
"react-native-handoff": "github:BlueWallet/react-native-handoff#v0.0.4",
|
||||||
"react-native-haptic-feedback": "2.3.3",
|
"react-native-haptic-feedback": "2.3.3",
|
||||||
"react-native-idle-timer": "github:BlueWallet/react-native-idle-timer#v2.2.3",
|
"react-native-idle-timer": "github:BlueWallet/react-native-idle-timer#v2.2.3",
|
||||||
@ -9772,9 +9772,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/detox": {
|
"node_modules/detox": {
|
||||||
"version": "20.27.1",
|
"version": "20.27.2",
|
||||||
"resolved": "https://registry.npmjs.org/detox/-/detox-20.27.1.tgz",
|
"resolved": "https://registry.npmjs.org/detox/-/detox-20.27.2.tgz",
|
||||||
"integrity": "sha512-3IAGB4dRyUlTB3PQa3xgjMYbpaMh2NwmqlYHfwTua7KK1aMZ3P/0gCnafd04Nj0ODX9tXviEyNe6FDVfDZ4fUA==",
|
"integrity": "sha512-cC6S40v7ix+uA5jYzG8eazSs7YtOWgc2aCwWLZIIzfE5Kvo0gfHgtqeRhrYWCMZaj/irKKs39h2B070oNQOIrA==",
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@ -9784,7 +9784,7 @@
|
|||||||
"caf": "^15.0.1",
|
"caf": "^15.0.1",
|
||||||
"chalk": "^4.0.0",
|
"chalk": "^4.0.0",
|
||||||
"child-process-promise": "^2.2.0",
|
"child-process-promise": "^2.2.0",
|
||||||
"detox-copilot": "^0.0.8",
|
"detox-copilot": "^0.0.9",
|
||||||
"execa": "^5.1.1",
|
"execa": "^5.1.1",
|
||||||
"find-up": "^5.0.0",
|
"find-up": "^5.0.0",
|
||||||
"fs-extra": "^11.0.0",
|
"fs-extra": "^11.0.0",
|
||||||
@ -9831,9 +9831,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/detox-copilot": {
|
"node_modules/detox-copilot": {
|
||||||
"version": "0.0.8",
|
"version": "0.0.9",
|
||||||
"resolved": "https://registry.npmjs.org/detox-copilot/-/detox-copilot-0.0.8.tgz",
|
"resolved": "https://registry.npmjs.org/detox-copilot/-/detox-copilot-0.0.9.tgz",
|
||||||
"integrity": "sha512-C656nQW4HiAbhFyEboL4MdwTg65WNaCPd14KRvNV+CRXBjWphA0iggCF5tRZxXhCAx9ZjKpk7ajvZZcc47WOTg==",
|
"integrity": "sha512-Wk2fuisD8EH+349b0ysNWvZ7UEsThAChbYFlLqOR1jWkDaonEvgf6IOUlmxjvyTl9ENtl8ckd1U7k94yCBYwqw==",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/detox/node_modules/ansi-styles": {
|
"node_modules/detox/node_modules/ansi-styles": {
|
||||||
@ -20665,9 +20665,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/react-native-gesture-handler": {
|
"node_modules/react-native-gesture-handler": {
|
||||||
"version": "2.19.0",
|
"version": "2.20.0",
|
||||||
"resolved": "https://registry.npmjs.org/react-native-gesture-handler/-/react-native-gesture-handler-2.19.0.tgz",
|
"resolved": "https://registry.npmjs.org/react-native-gesture-handler/-/react-native-gesture-handler-2.20.0.tgz",
|
||||||
"integrity": "sha512-Cc6DnSnn5hhgiuJOtlOJmXkbBBOZkW9UnJJG+DrWPq2jJuNvM4g5qq2plsywhxQj9xT7FyXZwVVblaXabfGZvQ==",
|
"integrity": "sha512-rFKqgHRfxQ7uSAivk8vxCiW4SB3G0U7jnv7kZD4Y90K5kp6YrU8Q3tWhxe3Rx55BIvSd3mBe9ZWbWVJ0FsSHPA==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@egjs/hammerjs": "^2.0.17",
|
"@egjs/hammerjs": "^2.0.17",
|
||||||
|
@ -111,7 +111,7 @@
|
|||||||
"coinselect": "3.1.13",
|
"coinselect": "3.1.13",
|
||||||
"crypto-js": "4.2.0",
|
"crypto-js": "4.2.0",
|
||||||
"dayjs": "1.11.13",
|
"dayjs": "1.11.13",
|
||||||
"detox": "20.27.1",
|
"detox": "20.27.2",
|
||||||
"ecpair": "2.0.1",
|
"ecpair": "2.0.1",
|
||||||
"ecurve": "1.0.6",
|
"ecurve": "1.0.6",
|
||||||
"electrum-client": "github:BlueWallet/rn-electrum-client#1bfe3cc",
|
"electrum-client": "github:BlueWallet/rn-electrum-client#1bfe3cc",
|
||||||
@ -135,7 +135,7 @@
|
|||||||
"react-native-document-picker": "9.3.1",
|
"react-native-document-picker": "9.3.1",
|
||||||
"react-native-draggable-flatlist": "github:BlueWallet/react-native-draggable-flatlist#3a61627",
|
"react-native-draggable-flatlist": "github:BlueWallet/react-native-draggable-flatlist#3a61627",
|
||||||
"react-native-fs": "2.20.0",
|
"react-native-fs": "2.20.0",
|
||||||
"react-native-gesture-handler": "2.19.0",
|
"react-native-gesture-handler": "2.20.0",
|
||||||
"react-native-handoff": "github:BlueWallet/react-native-handoff#v0.0.4",
|
"react-native-handoff": "github:BlueWallet/react-native-handoff#v0.0.4",
|
||||||
"react-native-haptic-feedback": "2.3.3",
|
"react-native-haptic-feedback": "2.3.3",
|
||||||
"react-native-idle-timer": "github:BlueWallet/react-native-idle-timer#v2.2.3",
|
"react-native-idle-timer": "github:BlueWallet/react-native-idle-timer#v2.2.3",
|
||||||
|
@ -615,6 +615,8 @@ const styles = StyleSheet.create({
|
|||||||
paddingVertical: 14,
|
paddingVertical: 14,
|
||||||
borderRadius: 50,
|
borderRadius: 50,
|
||||||
fontWeight: '700',
|
fontWeight: '700',
|
||||||
|
flex: 0.5,
|
||||||
|
alignItems: 'center',
|
||||||
},
|
},
|
||||||
modalButtonContainer: {
|
modalButtonContainer: {
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
|
Loading…
Reference in New Issue
Block a user