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 triggerHapticFeedback, { HapticFeedbackTypes } from '../blue_modules/hapticFeedback';
|
||||
import loc from '../loc';
|
||||
|
||||
export enum AlertType {
|
||||
Alert,
|
||||
@ -29,7 +28,7 @@ const presentAlert = ({
|
||||
ToastAndroid.show(message, ToastAndroid.LONG);
|
||||
break;
|
||||
default:
|
||||
RNAlert.alert(title ?? loc.alert.default, message);
|
||||
RNAlert.alert(title ?? message, title && message ? message : undefined);
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
@ -1,5 +1,5 @@
|
||||
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 { useTheme } from '../components/themes';
|
||||
import loc from '../loc';
|
||||
@ -46,6 +46,7 @@ const PromptPasswordConfirmationModal = forwardRef<PromptPasswordConfirmationMod
|
||||
const { colors } = useTheme();
|
||||
const passwordInputRef = useRef<TextInput>(null);
|
||||
const confirmPasswordInputRef = useRef<TextInput>(null);
|
||||
const scrollView = useRef<ScrollView>(null);
|
||||
|
||||
const stylesHook = StyleSheet.create({
|
||||
modalContent: {
|
||||
@ -260,8 +261,11 @@ const PromptPasswordConfirmationModal = forwardRef<PromptPasswordConfirmationMod
|
||||
ref={modalRef}
|
||||
onDismiss={onModalDismiss}
|
||||
grabber={false}
|
||||
showCloseButton={!isSuccess}
|
||||
onCloseModalPressed={handleCancel}
|
||||
backgroundColor={colors.modal}
|
||||
scrollRef={scrollView}
|
||||
dismissible={false}
|
||||
footer={
|
||||
!isSuccess ? (
|
||||
showExplanation && modalType === MODAL_TYPES.CREATE_PASSWORD ? (
|
||||
@ -294,19 +298,21 @@ const PromptPasswordConfirmationModal = forwardRef<PromptPasswordConfirmationMod
|
||||
{modalType === MODAL_TYPES.CREATE_PASSWORD && showExplanation && (
|
||||
<Animated.View style={{ opacity: explanationOpacity }}>
|
||||
<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]}>
|
||||
{loc.settings.encrypt_storage_explanation_description_line1}
|
||||
</Text>
|
||||
<Text style={[styles.description, stylesHook.feeModalCustomText]}>
|
||||
{loc.settings.encrypt_storage_explanation_description_line2}
|
||||
</Text>
|
||||
</Animated.ScrollView>
|
||||
<View style={styles.feeModalFooter} />
|
||||
</Animated.View>
|
||||
)}
|
||||
{(modalType === MODAL_TYPES.ENTER_PASSWORD ||
|
||||
((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
|
||||
? loc.settings.password_explain
|
||||
: modalType === MODAL_TYPES.CREATE_FAKE_STORAGE
|
||||
@ -393,13 +399,13 @@ const styles = StyleSheet.create({
|
||||
alignItems: 'center',
|
||||
},
|
||||
minHeight: {
|
||||
minHeight: 350,
|
||||
minHeight: 260,
|
||||
},
|
||||
feeModalFooter: {
|
||||
paddingHorizontal: 16,
|
||||
},
|
||||
feeModalFooterSpacing: {
|
||||
paddingHorizontal: 24,
|
||||
paddingHorizontal: 16,
|
||||
},
|
||||
inputContainer: {
|
||||
marginBottom: 10,
|
||||
@ -440,4 +446,7 @@ const styles = StyleSheet.create({
|
||||
color: 'white',
|
||||
fontSize: 30,
|
||||
},
|
||||
explanationScrollView: {
|
||||
maxHeight: 200,
|
||||
},
|
||||
});
|
||||
|
@ -27,9 +27,6 @@
|
||||
"qr_custom_input_button": "10x antippen für individuelle Eingabe",
|
||||
"unlock": "Entsperren"
|
||||
},
|
||||
"alert": {
|
||||
"default": "Warnung"
|
||||
},
|
||||
"azteco": {
|
||||
"codeIs": "Dein Gutscheincode lautet",
|
||||
"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",
|
||||
"unlock": "Unlock"
|
||||
},
|
||||
"alert": {
|
||||
"default": "Alert"
|
||||
},
|
||||
"azteco": {
|
||||
"codeIs": "Your voucher code is",
|
||||
"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",
|
||||
"unlock": "Desbloquear"
|
||||
},
|
||||
"alert": {
|
||||
"default": "Alerta"
|
||||
},
|
||||
"azteco": {
|
||||
"codeIs": "Tu código de cupón es",
|
||||
"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",
|
||||
"unlock": "Odblokuj"
|
||||
},
|
||||
"alert": {
|
||||
"default": "Powiadomienie"
|
||||
},
|
||||
"azteco": {
|
||||
"codeIs": "Kod twojego vouchera to",
|
||||
"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",
|
||||
"crypto-js": "4.2.0",
|
||||
"dayjs": "1.11.13",
|
||||
"detox": "20.27.1",
|
||||
"detox": "20.27.2",
|
||||
"ecpair": "2.0.1",
|
||||
"ecurve": "1.0.6",
|
||||
"electrum-client": "github:BlueWallet/rn-electrum-client#1bfe3cc",
|
||||
@ -71,7 +71,7 @@
|
||||
"react-native-document-picker": "9.3.1",
|
||||
"react-native-draggable-flatlist": "github:BlueWallet/react-native-draggable-flatlist#3a61627",
|
||||
"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-haptic-feedback": "2.3.3",
|
||||
"react-native-idle-timer": "github:BlueWallet/react-native-idle-timer#v2.2.3",
|
||||
@ -9772,9 +9772,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/detox": {
|
||||
"version": "20.27.1",
|
||||
"resolved": "https://registry.npmjs.org/detox/-/detox-20.27.1.tgz",
|
||||
"integrity": "sha512-3IAGB4dRyUlTB3PQa3xgjMYbpaMh2NwmqlYHfwTua7KK1aMZ3P/0gCnafd04Nj0ODX9tXviEyNe6FDVfDZ4fUA==",
|
||||
"version": "20.27.2",
|
||||
"resolved": "https://registry.npmjs.org/detox/-/detox-20.27.2.tgz",
|
||||
"integrity": "sha512-cC6S40v7ix+uA5jYzG8eazSs7YtOWgc2aCwWLZIIzfE5Kvo0gfHgtqeRhrYWCMZaj/irKKs39h2B070oNQOIrA==",
|
||||
"hasInstallScript": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@ -9784,7 +9784,7 @@
|
||||
"caf": "^15.0.1",
|
||||
"chalk": "^4.0.0",
|
||||
"child-process-promise": "^2.2.0",
|
||||
"detox-copilot": "^0.0.8",
|
||||
"detox-copilot": "^0.0.9",
|
||||
"execa": "^5.1.1",
|
||||
"find-up": "^5.0.0",
|
||||
"fs-extra": "^11.0.0",
|
||||
@ -9831,9 +9831,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/detox-copilot": {
|
||||
"version": "0.0.8",
|
||||
"resolved": "https://registry.npmjs.org/detox-copilot/-/detox-copilot-0.0.8.tgz",
|
||||
"integrity": "sha512-C656nQW4HiAbhFyEboL4MdwTg65WNaCPd14KRvNV+CRXBjWphA0iggCF5tRZxXhCAx9ZjKpk7ajvZZcc47WOTg==",
|
||||
"version": "0.0.9",
|
||||
"resolved": "https://registry.npmjs.org/detox-copilot/-/detox-copilot-0.0.9.tgz",
|
||||
"integrity": "sha512-Wk2fuisD8EH+349b0ysNWvZ7UEsThAChbYFlLqOR1jWkDaonEvgf6IOUlmxjvyTl9ENtl8ckd1U7k94yCBYwqw==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/detox/node_modules/ansi-styles": {
|
||||
@ -20665,9 +20665,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/react-native-gesture-handler": {
|
||||
"version": "2.19.0",
|
||||
"resolved": "https://registry.npmjs.org/react-native-gesture-handler/-/react-native-gesture-handler-2.19.0.tgz",
|
||||
"integrity": "sha512-Cc6DnSnn5hhgiuJOtlOJmXkbBBOZkW9UnJJG+DrWPq2jJuNvM4g5qq2plsywhxQj9xT7FyXZwVVblaXabfGZvQ==",
|
||||
"version": "2.20.0",
|
||||
"resolved": "https://registry.npmjs.org/react-native-gesture-handler/-/react-native-gesture-handler-2.20.0.tgz",
|
||||
"integrity": "sha512-rFKqgHRfxQ7uSAivk8vxCiW4SB3G0U7jnv7kZD4Y90K5kp6YrU8Q3tWhxe3Rx55BIvSd3mBe9ZWbWVJ0FsSHPA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@egjs/hammerjs": "^2.0.17",
|
||||
|
@ -111,7 +111,7 @@
|
||||
"coinselect": "3.1.13",
|
||||
"crypto-js": "4.2.0",
|
||||
"dayjs": "1.11.13",
|
||||
"detox": "20.27.1",
|
||||
"detox": "20.27.2",
|
||||
"ecpair": "2.0.1",
|
||||
"ecurve": "1.0.6",
|
||||
"electrum-client": "github:BlueWallet/rn-electrum-client#1bfe3cc",
|
||||
@ -135,7 +135,7 @@
|
||||
"react-native-document-picker": "9.3.1",
|
||||
"react-native-draggable-flatlist": "github:BlueWallet/react-native-draggable-flatlist#3a61627",
|
||||
"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-haptic-feedback": "2.3.3",
|
||||
"react-native-idle-timer": "github:BlueWallet/react-native-idle-timer#v2.2.3",
|
||||
|
@ -615,6 +615,8 @@ const styles = StyleSheet.create({
|
||||
paddingVertical: 14,
|
||||
borderRadius: 50,
|
||||
fontWeight: '700',
|
||||
flex: 0.5,
|
||||
alignItems: 'center',
|
||||
},
|
||||
modalButtonContainer: {
|
||||
flexDirection: 'row',
|
||||
|
Loading…
Reference in New Issue
Block a user