mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-02-23 23:27:26 +01:00
Merge branch 'master' into limpbrains-cc
This commit is contained in:
commit
11dfee5124
14 changed files with 90 additions and 46 deletions
|
@ -1644,7 +1644,13 @@ export const BlueTransactionListItem = React.memo(({ item, itemPriceUnit = Bitco
|
||||||
[colors.lightBorder],
|
[colors.lightBorder],
|
||||||
);
|
);
|
||||||
|
|
||||||
const title = useMemo(() => transactionTimeToReadable(item.received), [item.received]);
|
const title = useMemo(() => {
|
||||||
|
if (item.confirmations === 0) {
|
||||||
|
return loc.transactions.pending;
|
||||||
|
} else {
|
||||||
|
return transactionTimeToReadable(item.received);
|
||||||
|
}
|
||||||
|
}, [item.confirmations, item.received]);
|
||||||
const txMemo = txMetadata[item.hash]?.memo ?? '';
|
const txMemo = txMetadata[item.hash]?.memo ?? '';
|
||||||
const subtitle = useMemo(() => {
|
const subtitle = useMemo(() => {
|
||||||
let sub = item.confirmations < 7 ? loc.formatString(loc.transactions.list_conf, { number: item.confirmations }) : '';
|
let sub = item.confirmations < 7 ? loc.formatString(loc.transactions.list_conf, { number: item.confirmations }) : '';
|
||||||
|
|
|
@ -349,7 +349,7 @@ PODS:
|
||||||
- React
|
- React
|
||||||
- RNCAsyncStorage (1.12.1):
|
- RNCAsyncStorage (1.12.1):
|
||||||
- React-Core
|
- React-Core
|
||||||
- RNCClipboard (1.4.0):
|
- RNCClipboard (1.5.0):
|
||||||
- React-Core
|
- React-Core
|
||||||
- RNCMaskedView (0.1.10):
|
- RNCMaskedView (0.1.10):
|
||||||
- React
|
- React
|
||||||
|
@ -719,7 +719,7 @@ SPEC CHECKSUMS:
|
||||||
RealmJS: 899b4839a8bee46e248bc277995ad58da855e41f
|
RealmJS: 899b4839a8bee46e248bc277995ad58da855e41f
|
||||||
RemobileReactNativeQrcodeLocalImage: 57aadc12896b148fb5e04bc7c6805f3565f5c3fa
|
RemobileReactNativeQrcodeLocalImage: 57aadc12896b148fb5e04bc7c6805f3565f5c3fa
|
||||||
RNCAsyncStorage: cb9a623793918c6699586281f0b51cbc38f046f9
|
RNCAsyncStorage: cb9a623793918c6699586281f0b51cbc38f046f9
|
||||||
RNCClipboard: ce9b77f2881948e9e04af84bd70262ab37adb1c1
|
RNCClipboard: 8f9f12fabf3c06e976f19f87a62c89e28dfedfca
|
||||||
RNCMaskedView: f5c7d14d6847b7b44853f7acb6284c1da30a3459
|
RNCMaskedView: f5c7d14d6847b7b44853f7acb6284c1da30a3459
|
||||||
RNCPushNotificationIOS: eaf01f848a0b872b194d31bcad94bb864299e01e
|
RNCPushNotificationIOS: eaf01f848a0b872b194d31bcad94bb864299e01e
|
||||||
RNDefaultPreference: 21816c0a6f61a2829ccc0cef034392e9b509ee5f
|
RNDefaultPreference: 21816c0a6f61a2829ccc0cef034392e9b509ee5f
|
||||||
|
|
|
@ -35,7 +35,8 @@ struct WalletData {
|
||||||
var balance: Double
|
var balance: Double
|
||||||
var latestTransactionTime: Int = 0
|
var latestTransactionTime: Int = 0
|
||||||
var formattedBalanceBTC: String {
|
var formattedBalanceBTC: String {
|
||||||
return "\(balance / 100000000) BTC"
|
let value = NSNumber(value: balance / 100000000);
|
||||||
|
return "\(value.decimalValue) BTC"
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,9 +36,8 @@ extension WidgetAPI {
|
||||||
if let response = String(bytes: data, encoding: .utf8), let nextBlockResponse = response.components(separatedBy: #"result":"#).last?.components(separatedBy: ",").first, let nextBlockResponseDouble = Double(nextBlockResponse.filter({characterSet.contains($0)}).trimmingCharacters(in: .whitespacesAndNewlines)) {
|
if let response = String(bytes: data, encoding: .utf8), let nextBlockResponse = response.components(separatedBy: #"result":"#).last?.components(separatedBy: ",").first, let nextBlockResponseDouble = Double(nextBlockResponse.filter({characterSet.contains($0)}).trimmingCharacters(in: .whitespacesAndNewlines)) {
|
||||||
print("Successfully obtained response from Electrum sever")
|
print("Successfully obtained response from Electrum sever")
|
||||||
print(userElectrumSettings)
|
print(userElectrumSettings)
|
||||||
let marketData = MarketData(nextBlock: String(format: "%.0f", (nextBlockResponseDouble / 1024) * 100000000), sats: "0", price: "0", rate: 0)
|
|
||||||
client.close()
|
client.close()
|
||||||
completion(MarketData(nextBlock: String(format: "%.0f", (nextBlockResponseDouble / 1024) * 100000000), sats: "0", price: "0", rate: 0), nil)
|
let marketData = MarketData(nextBlock: String(format: "%.0f", (nextBlockResponseDouble / 1024) * 100000000), sats: "0", price: "0", rate: 0)
|
||||||
completion(marketData, nil)
|
completion(marketData, nil)
|
||||||
} else {
|
} else {
|
||||||
client.close()
|
client.close()
|
||||||
|
|
|
@ -310,8 +310,9 @@
|
||||||
"details_title": "Transaction",
|
"details_title": "Transaction",
|
||||||
"details_to": "Output",
|
"details_to": "Output",
|
||||||
"details_transaction_details": "Transaction details",
|
"details_transaction_details": "Transaction details",
|
||||||
"enable_hw": "This wallet is not being used in conjunction with a hardwarde wallet. Would you like to enable hardware wallet use?",
|
"enable_hw": "This wallet is not being used in conjunction with a hardware wallet. Would you like to enable hardware wallet use?",
|
||||||
"list_conf": "conf: {number}",
|
"list_conf": "conf: {number}",
|
||||||
|
"pending": "Pending",
|
||||||
"list_title": "transactions",
|
"list_title": "transactions",
|
||||||
"rbf_explain": "We will replace this transaction with the one with a higher fee, so it should be mined faster. This is called RBF - Replace By Fee.",
|
"rbf_explain": "We will replace this transaction with the one with a higher fee, so it should be mined faster. This is called RBF - Replace By Fee.",
|
||||||
"rbf_title": "Bump fee (RBF)",
|
"rbf_title": "Bump fee (RBF)",
|
||||||
|
|
6
package-lock.json
generated
6
package-lock.json
generated
|
@ -6316,9 +6316,9 @@
|
||||||
"integrity": "sha512-ael2f1onoPF3vF7YqHGWy7NnafzGu+yp88BbFbP0ydoCP2xGSUzmZVw0zakPTC040Id+JQ9WeFczujMkDy6jYQ=="
|
"integrity": "sha512-ael2f1onoPF3vF7YqHGWy7NnafzGu+yp88BbFbP0ydoCP2xGSUzmZVw0zakPTC040Id+JQ9WeFczujMkDy6jYQ=="
|
||||||
},
|
},
|
||||||
"@react-native-community/clipboard": {
|
"@react-native-community/clipboard": {
|
||||||
"version": "1.4.0",
|
"version": "1.5.0",
|
||||||
"resolved": "https://registry.npmjs.org/@react-native-community/clipboard/-/clipboard-1.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/@react-native-community/clipboard/-/clipboard-1.5.0.tgz",
|
||||||
"integrity": "sha512-71P3SgbWxwzQo/i+tHospcLdvjF9iMlPxgjWP2LgIMDY0gbwuSrtYtdnxaCraZ0S/K7FiBI7SmUrY8kl2lTDVg=="
|
"integrity": "sha512-XoujTQuXhPgQLVLn7HPt7615jBEGzJm1Nhos0COdreBIz3qWIi5noYZth8jBFctf8FG5tpe24XTZNDz5udgqQQ=="
|
||||||
},
|
},
|
||||||
"@react-native-community/eslint-config": {
|
"@react-native-community/eslint-config": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
|
|
|
@ -67,7 +67,7 @@
|
||||||
"@babel/preset-env": "7.12.1",
|
"@babel/preset-env": "7.12.1",
|
||||||
"@react-native-community/async-storage": "1.12.1",
|
"@react-native-community/async-storage": "1.12.1",
|
||||||
"@react-native-community/blur": "3.6.0",
|
"@react-native-community/blur": "3.6.0",
|
||||||
"@react-native-community/clipboard": "1.4.0",
|
"@react-native-community/clipboard": "1.5.0",
|
||||||
"@react-native-community/geolocation": "2.0.2",
|
"@react-native-community/geolocation": "2.0.2",
|
||||||
"@react-native-community/masked-view": "0.1.10",
|
"@react-native-community/masked-view": "0.1.10",
|
||||||
"@react-native-community/push-notification-ios": "1.7.1",
|
"@react-native-community/push-notification-ios": "1.7.1",
|
||||||
|
|
|
@ -1,5 +1,15 @@
|
||||||
import React, { useState, useRef, useEffect, useContext } from 'react';
|
import React, { useState, useRef, useEffect, useContext } from 'react';
|
||||||
import { Keyboard, KeyboardAvoidingView, Platform, StatusBar, StyleSheet, Text, TouchableOpacity, View } from 'react-native';
|
import {
|
||||||
|
Keyboard,
|
||||||
|
KeyboardAvoidingView,
|
||||||
|
Platform,
|
||||||
|
StatusBar,
|
||||||
|
StyleSheet,
|
||||||
|
Text,
|
||||||
|
TouchableOpacity,
|
||||||
|
useWindowDimensions,
|
||||||
|
View,
|
||||||
|
} from 'react-native';
|
||||||
import LottieView from 'lottie-react-native';
|
import LottieView from 'lottie-react-native';
|
||||||
import { Icon } from 'react-native-elements';
|
import { Icon } from 'react-native-elements';
|
||||||
import { BlueButton, BlueListItem, BlueNavigationStyle, BlueSpacing20 } from '../../BlueComponents';
|
import { BlueButton, BlueListItem, BlueNavigationStyle, BlueSpacing20 } from '../../BlueComponents';
|
||||||
|
@ -21,6 +31,8 @@ const WalletsAddMultisig = () => {
|
||||||
const [format, setFormat] = useState(MultisigHDWallet.FORMAT_P2WSH);
|
const [format, setFormat] = useState(MultisigHDWallet.FORMAT_P2WSH);
|
||||||
const { isAdancedModeEnabled } = useContext(BlueStorageContext);
|
const { isAdancedModeEnabled } = useContext(BlueStorageContext);
|
||||||
const [isAdvancedModeEnabledRender, setIsAdvancedModeEnabledRender] = useState(false);
|
const [isAdvancedModeEnabledRender, setIsAdvancedModeEnabledRender] = useState(false);
|
||||||
|
const windowHeight = useWindowDimensions().height;
|
||||||
|
const windowWidth = useWindowDimensions().width;
|
||||||
|
|
||||||
const stylesHook = StyleSheet.create({
|
const stylesHook = StyleSheet.create({
|
||||||
root: {
|
root: {
|
||||||
|
@ -101,6 +113,8 @@ const WalletsAddMultisig = () => {
|
||||||
Keyboard.dismiss();
|
Keyboard.dismiss();
|
||||||
setIsModalVisible(false);
|
setIsModalVisible(false);
|
||||||
}}
|
}}
|
||||||
|
deviceHeight={windowHeight}
|
||||||
|
deviceWidth={windowWidth}
|
||||||
>
|
>
|
||||||
<KeyboardAvoidingView behavior={Platform.OS === 'ios' ? 'position' : null}>
|
<KeyboardAvoidingView behavior={Platform.OS === 'ios' ? 'position' : null}>
|
||||||
<View style={[styles.modalContentShort, stylesHook.modalContentShort]}>
|
<View style={[styles.modalContentShort, stylesHook.modalContentShort]}>
|
||||||
|
|
|
@ -11,6 +11,7 @@ import {
|
||||||
StyleSheet,
|
StyleSheet,
|
||||||
Text,
|
Text,
|
||||||
TouchableOpacity,
|
TouchableOpacity,
|
||||||
|
useWindowDimensions,
|
||||||
View,
|
View,
|
||||||
} from 'react-native';
|
} from 'react-native';
|
||||||
import {
|
import {
|
||||||
|
@ -53,6 +54,8 @@ const staticCache = {};
|
||||||
const WalletsAddMultisigStep2 = () => {
|
const WalletsAddMultisigStep2 = () => {
|
||||||
const { addWallet, saveToDisk, setNewWalletAdded } = useContext(BlueStorageContext);
|
const { addWallet, saveToDisk, setNewWalletAdded } = useContext(BlueStorageContext);
|
||||||
const { colors } = useTheme();
|
const { colors } = useTheme();
|
||||||
|
const windowHeight = useWindowDimensions().height;
|
||||||
|
const windowWidth = useWindowDimensions().width;
|
||||||
|
|
||||||
const navigation = useNavigation();
|
const navigation = useNavigation();
|
||||||
const { m, n, format } = useRoute().params;
|
const { m, n, format } = useRoute().params;
|
||||||
|
@ -393,7 +396,7 @@ const WalletsAddMultisigStep2 = () => {
|
||||||
checked={isChecked}
|
checked={isChecked}
|
||||||
rightButton={{
|
rightButton={{
|
||||||
disabled: vaultKeyData.isLoading,
|
disabled: vaultKeyData.isLoading,
|
||||||
text: loc.multisig.view_key,
|
text: loc.multisig.share,
|
||||||
onPress: () => {
|
onPress: () => {
|
||||||
viewKey(cosigners[el.index]);
|
viewKey(cosigners[el.index]);
|
||||||
},
|
},
|
||||||
|
@ -497,7 +500,13 @@ const WalletsAddMultisigStep2 = () => {
|
||||||
|
|
||||||
const renderMnemonicsModal = () => {
|
const renderMnemonicsModal = () => {
|
||||||
return (
|
return (
|
||||||
<Modal isVisible={isMnemonicsModalVisible} style={styles.bottomModal} onBackdropPress={Keyboard.dismiss}>
|
<Modal
|
||||||
|
deviceHeight={windowHeight}
|
||||||
|
deviceWidth={windowWidth}
|
||||||
|
isVisible={isMnemonicsModalVisible}
|
||||||
|
style={styles.bottomModal}
|
||||||
|
onBackdropPress={Keyboard.dismiss}
|
||||||
|
>
|
||||||
<View style={[styles.newKeyModalContent, stylesHook.modalContent]}>
|
<View style={[styles.newKeyModalContent, stylesHook.modalContent]}>
|
||||||
<View style={styles.itemKeyUnprovidedWrapper}>
|
<View style={styles.itemKeyUnprovidedWrapper}>
|
||||||
<View style={[styles.vaultKeyCircleSuccess, stylesHook.vaultKeyCircleSuccess]}>
|
<View style={[styles.vaultKeyCircleSuccess, stylesHook.vaultKeyCircleSuccess]}>
|
||||||
|
@ -525,6 +534,8 @@ const WalletsAddMultisigStep2 = () => {
|
||||||
const renderProvideMnemonicsModal = () => {
|
const renderProvideMnemonicsModal = () => {
|
||||||
return (
|
return (
|
||||||
<Modal
|
<Modal
|
||||||
|
deviceHeight={windowHeight}
|
||||||
|
deviceWidth={windowWidth}
|
||||||
isVisible={isProvideMnemonicsModalVisible}
|
isVisible={isProvideMnemonicsModalVisible}
|
||||||
style={styles.bottomModal}
|
style={styles.bottomModal}
|
||||||
onBackdropPress={() => {
|
onBackdropPress={() => {
|
||||||
|
@ -559,6 +570,8 @@ const WalletsAddMultisigStep2 = () => {
|
||||||
const renderCosignersXpubModal = () => {
|
const renderCosignersXpubModal = () => {
|
||||||
return (
|
return (
|
||||||
<Modal
|
<Modal
|
||||||
|
deviceHeight={windowHeight}
|
||||||
|
deviceWidth={windowWidth}
|
||||||
isVisible={isRenderCosignersXpubModalVisible}
|
isVisible={isRenderCosignersXpubModalVisible}
|
||||||
style={styles.bottomModal}
|
style={styles.bottomModal}
|
||||||
onBackdropPress={() => {
|
onBackdropPress={() => {
|
||||||
|
@ -619,7 +632,7 @@ const WalletsAddMultisigStep2 = () => {
|
||||||
const styles = StyleSheet.create({
|
const styles = StyleSheet.create({
|
||||||
root: {
|
root: {
|
||||||
flex: 1,
|
flex: 1,
|
||||||
marginHorizontal: 20,
|
paddingHorizontal: 20,
|
||||||
},
|
},
|
||||||
mainBlock: {
|
mainBlock: {
|
||||||
height: '100%',
|
height: '100%',
|
||||||
|
|
|
@ -475,7 +475,7 @@ const WalletDetails = () => {
|
||||||
<BlueSpacing20 />
|
<BlueSpacing20 />
|
||||||
<BlueSpacing20 />
|
<BlueSpacing20 />
|
||||||
<TouchableOpacity onPress={handleDeleteButtonTapped}>
|
<TouchableOpacity onPress={handleDeleteButtonTapped}>
|
||||||
<Text style={styles.delete}>{loc.wallets.details_delete}</Text>
|
<Text textBreakStrategy="simple" style={styles.delete}>{`${loc.wallets.details_delete}${' '}`}</Text>
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
</View>
|
</View>
|
||||||
</BlueCard>
|
</BlueCard>
|
||||||
|
|
|
@ -193,7 +193,9 @@ const WalletsList = () => {
|
||||||
const style = { opacity: isLoading ? 1.0 : 0.5 };
|
const style = { opacity: isLoading ? 1.0 : 0.5 };
|
||||||
return (
|
return (
|
||||||
<View style={[styles.listHeaderBack, stylesHook.listHeaderBack]}>
|
<View style={[styles.listHeaderBack, stylesHook.listHeaderBack]}>
|
||||||
<Text style={[styles.listHeaderText, stylesHook.listHeaderText]}>{loc.transactions.list_title}</Text>
|
<Text textBreakStrategy="simple" style={[styles.listHeaderText, stylesHook.listHeaderText]}>
|
||||||
|
{`${loc.transactions.list_title}${' '}`}
|
||||||
|
</Text>
|
||||||
{isDesktop && (
|
{isDesktop && (
|
||||||
<TouchableOpacity style={style} onPress={refreshTransactions} disabled={isLoading}>
|
<TouchableOpacity style={style} onPress={refreshTransactions} disabled={isLoading}>
|
||||||
<Icon name="refresh" type="font-awesome" color={colors.feeText} />
|
<Icon name="refresh" type="font-awesome" color={colors.feeText} />
|
||||||
|
|
|
@ -117,7 +117,19 @@ Coin.propTypes = {
|
||||||
|
|
||||||
const Dice = ({ push, sides }) => {
|
const Dice = ({ push, sides }) => {
|
||||||
const { width } = useWindowDimensions();
|
const { width } = useWindowDimensions();
|
||||||
|
const { colors } = useTheme();
|
||||||
const diceWidth = width / 4;
|
const diceWidth = width / 4;
|
||||||
|
const stylesHook = StyleSheet.create({
|
||||||
|
dice: {
|
||||||
|
borderColor: colors.buttonBackgroundColor,
|
||||||
|
},
|
||||||
|
diceText: {
|
||||||
|
color: colors.foregroundColor,
|
||||||
|
},
|
||||||
|
diceContainer: {
|
||||||
|
backgroundColor: colors.elevated,
|
||||||
|
},
|
||||||
|
});
|
||||||
const diceIcon = i => {
|
const diceIcon = i => {
|
||||||
switch (i) {
|
switch (i) {
|
||||||
case 1:
|
case 1:
|
||||||
|
@ -136,15 +148,15 @@ const Dice = ({ push, sides }) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ScrollView contentContainerStyle={styles.diceContainer}>
|
<ScrollView contentContainerStyle={[styles.diceContainer, stylesHook.diceContainer]}>
|
||||||
{[...Array(sides)].map((_, i) => (
|
{[...Array(sides)].map((_, i) => (
|
||||||
<TouchableOpacity key={i} onPress={() => push(getEntropy(i, sides))}>
|
<TouchableOpacity key={i} onPress={() => push(getEntropy(i, sides))}>
|
||||||
<View style={[styles.diceRoot, { width: diceWidth }]}>
|
<View style={[styles.diceRoot, { width: diceWidth }]}>
|
||||||
{sides === 6 ? (
|
{sides === 6 ? (
|
||||||
<Icon style={styles.diceIcon} name={diceIcon(i + 1)} size={70} color="grey" type="font-awesome-5" />
|
<Icon style={styles.diceIcon} name={diceIcon(i + 1)} size={70} color="grey" type="font-awesome-5" />
|
||||||
) : (
|
) : (
|
||||||
<View style={styles.dice}>
|
<View style={[styles.dice, stylesHook.dice]}>
|
||||||
<Text style={styles.diceText}>{i + 1}</Text>
|
<Text style={stylesHook.diceText}>{i + 1}</Text>
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
</View>
|
</View>
|
||||||
|
@ -164,13 +176,13 @@ const buttonFontSize =
|
||||||
? 22
|
? 22
|
||||||
: PixelRatio.roundToNearestPixel(Dimensions.get('window').width / 26);
|
: PixelRatio.roundToNearestPixel(Dimensions.get('window').width / 26);
|
||||||
|
|
||||||
const Buttons = ({ pop, save }) => (
|
const Buttons = ({ pop, save, colors }) => (
|
||||||
<FContainer>
|
<FContainer>
|
||||||
<FButton
|
<FButton
|
||||||
onPress={pop}
|
onPress={pop}
|
||||||
icon={
|
icon={
|
||||||
<View style={styles.buttonsIcon}>
|
<View style={styles.buttonsIcon}>
|
||||||
<Icon name="undo" size={buttonFontSize} type="font-awesome" color={BlueCurrentTheme.colors.buttonAlternativeTextColor} />
|
<Icon name="undo" size={buttonFontSize} type="font-awesome" color={colors.buttonAlternativeTextColor} />
|
||||||
</View>
|
</View>
|
||||||
}
|
}
|
||||||
text={loc.entropy.undo}
|
text={loc.entropy.undo}
|
||||||
|
@ -179,7 +191,7 @@ const Buttons = ({ pop, save }) => (
|
||||||
onPress={save}
|
onPress={save}
|
||||||
icon={
|
icon={
|
||||||
<View style={styles.buttonsIcon}>
|
<View style={styles.buttonsIcon}>
|
||||||
<Icon name="arrow-down" size={buttonFontSize} type="font-awesome" color={BlueCurrentTheme.colors.buttonAlternativeTextColor} />
|
<Icon name="arrow-down" size={buttonFontSize} type="font-awesome" color={colors.buttonAlternativeTextColor} />
|
||||||
</View>
|
</View>
|
||||||
}
|
}
|
||||||
text={loc.entropy.save}
|
text={loc.entropy.save}
|
||||||
|
@ -190,6 +202,7 @@ const Buttons = ({ pop, save }) => (
|
||||||
Buttons.propTypes = {
|
Buttons.propTypes = {
|
||||||
pop: PropTypes.func.isRequired,
|
pop: PropTypes.func.isRequired,
|
||||||
save: PropTypes.func.isRequired,
|
save: PropTypes.func.isRequired,
|
||||||
|
colors: PropTypes.shape.isRequired,
|
||||||
};
|
};
|
||||||
|
|
||||||
const Entropy = () => {
|
const Entropy = () => {
|
||||||
|
@ -199,6 +212,17 @@ const Entropy = () => {
|
||||||
const [tab, setTab] = useState(1);
|
const [tab, setTab] = useState(1);
|
||||||
const [show, setShow] = useState(false);
|
const [show, setShow] = useState(false);
|
||||||
const { colors } = useTheme();
|
const { colors } = useTheme();
|
||||||
|
const stylesHook = StyleSheet.create({
|
||||||
|
entropy: {
|
||||||
|
backgroundColor: colors.inputBackgroundColor,
|
||||||
|
},
|
||||||
|
entropyText: {
|
||||||
|
color: colors.foregroundColor,
|
||||||
|
},
|
||||||
|
coinBody: {
|
||||||
|
borderColor: colors.lightButton,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
const push = v => v && dispatch({ type: 'push', value: v.value, bits: v.bits });
|
const push = v => v && dispatch({ type: 'push', value: v.value, bits: v.bits });
|
||||||
const pop = () => dispatch({ type: 'pop' });
|
const pop = () => dispatch({ type: 'pop' });
|
||||||
|
@ -216,8 +240,8 @@ const Entropy = () => {
|
||||||
<SafeBlueArea>
|
<SafeBlueArea>
|
||||||
<BlueSpacing20 />
|
<BlueSpacing20 />
|
||||||
<TouchableOpacity onPress={() => setShow(!show)}>
|
<TouchableOpacity onPress={() => setShow(!show)}>
|
||||||
<View style={styles.entropy}>
|
<View style={[styles.entropy, stylesHook.entropy]}>
|
||||||
<Text style={styles.entropyText}>{show ? hex : `${bits} of 256 bits`}</Text>
|
<Text style={[styles.entropyText, stylesHook.entropyText]}>{show ? hex : `${bits} of 256 bits`}</Text>
|
||||||
</View>
|
</View>
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
|
|
||||||
|
@ -241,7 +265,7 @@ const Entropy = () => {
|
||||||
{tab === 1 && <Dice sides={6} push={push} />}
|
{tab === 1 && <Dice sides={6} push={push} />}
|
||||||
{tab === 2 && <Dice sides={20} push={push} />}
|
{tab === 2 && <Dice sides={20} push={push} />}
|
||||||
|
|
||||||
<Buttons pop={pop} save={save} />
|
<Buttons pop={pop} save={save} colors={colors} />
|
||||||
</SafeBlueArea>
|
</SafeBlueArea>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -263,7 +287,6 @@ const styles = StyleSheet.create({
|
||||||
padding: 5,
|
padding: 5,
|
||||||
marginLeft: 10,
|
marginLeft: 10,
|
||||||
marginRight: 10,
|
marginRight: 10,
|
||||||
backgroundColor: BlueCurrentTheme.colors.inputBackgroundColor,
|
|
||||||
borderRadius: 9,
|
borderRadius: 9,
|
||||||
minHeight: 49,
|
minHeight: 49,
|
||||||
paddingHorizontal: 8,
|
paddingHorizontal: 8,
|
||||||
|
@ -274,7 +297,6 @@ const styles = StyleSheet.create({
|
||||||
entropyText: {
|
entropyText: {
|
||||||
fontSize: 15,
|
fontSize: 15,
|
||||||
fontFamily: 'Courier',
|
fontFamily: 'Courier',
|
||||||
color: BlueCurrentTheme.colors.foregroundColor,
|
|
||||||
},
|
},
|
||||||
coinRoot: {
|
coinRoot: {
|
||||||
flex: 1,
|
flex: 1,
|
||||||
|
@ -322,9 +344,6 @@ const styles = StyleSheet.create({
|
||||||
aspectRatio: 1,
|
aspectRatio: 1,
|
||||||
borderColor: BlueCurrentTheme.colors.buttonBackgroundColor,
|
borderColor: BlueCurrentTheme.colors.buttonBackgroundColor,
|
||||||
},
|
},
|
||||||
diceText: {
|
|
||||||
color: BlueCurrentTheme.colors.foregroundColor,
|
|
||||||
},
|
|
||||||
diceIcon: {
|
diceIcon: {
|
||||||
margin: 3,
|
margin: 3,
|
||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
|
|
|
@ -31,7 +31,6 @@ import HandoffSettings from '../../class/handoff';
|
||||||
import Handoff from 'react-native-handoff';
|
import Handoff from 'react-native-handoff';
|
||||||
import ActionSheet from '../ActionSheet';
|
import ActionSheet from '../ActionSheet';
|
||||||
import loc from '../../loc';
|
import loc from '../../loc';
|
||||||
import { BlueCurrentTheme } from '../../components/themes';
|
|
||||||
import { FContainer, FButton } from '../../components/FloatButtons';
|
import { FContainer, FButton } from '../../components/FloatButtons';
|
||||||
import { getSystemName } from 'react-native-device-info';
|
import { getSystemName } from 'react-native-device-info';
|
||||||
import { useRoute, useNavigation, useTheme, useFocusEffect } from '@react-navigation/native';
|
import { useRoute, useNavigation, useTheme, useFocusEffect } from '@react-navigation/native';
|
||||||
|
@ -656,12 +655,7 @@ const WalletTransactions = () => {
|
||||||
}}
|
}}
|
||||||
icon={
|
icon={
|
||||||
<View style={styles.receiveIcon}>
|
<View style={styles.receiveIcon}>
|
||||||
<Icon
|
<Icon name="arrow-down" size={buttonFontSize} type="font-awesome" color={colors.buttonAlternativeTextColor} />
|
||||||
name="arrow-down"
|
|
||||||
size={buttonFontSize}
|
|
||||||
type="font-awesome"
|
|
||||||
color={BlueCurrentTheme.colors.buttonAlternativeTextColor}
|
|
||||||
/>
|
|
||||||
</View>
|
</View>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
@ -675,12 +669,7 @@ const WalletTransactions = () => {
|
||||||
testID="SendButton"
|
testID="SendButton"
|
||||||
icon={
|
icon={
|
||||||
<View style={styles.sendIcon}>
|
<View style={styles.sendIcon}>
|
||||||
<Icon
|
<Icon name="arrow-down" size={buttonFontSize} type="font-awesome" color={colors.buttonAlternativeTextColor} />
|
||||||
name="arrow-down"
|
|
||||||
size={buttonFontSize}
|
|
||||||
type="font-awesome"
|
|
||||||
color={BlueCurrentTheme.colors.buttonAlternativeTextColor}
|
|
||||||
/>
|
|
||||||
</View>
|
</View>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -230,7 +230,7 @@ const ViewEditMultisigCosigners = () => {
|
||||||
button={{
|
button={{
|
||||||
buttonType: MultipleStepsListItemButtohType.partial,
|
buttonType: MultipleStepsListItemButtohType.partial,
|
||||||
leftText,
|
leftText,
|
||||||
text: loc.multisig.view_key,
|
text: loc.multisig.share,
|
||||||
disabled: vaultKeyData.isLoading,
|
disabled: vaultKeyData.isLoading,
|
||||||
onPress: () => {
|
onPress: () => {
|
||||||
setVaultKeyData({
|
setVaultKeyData({
|
||||||
|
@ -268,7 +268,7 @@ const ViewEditMultisigCosigners = () => {
|
||||||
showActivityIndicator={vaultKeyData.keyIndex === el.index + 1 && vaultKeyData.isLoading}
|
showActivityIndicator={vaultKeyData.keyIndex === el.index + 1 && vaultKeyData.isLoading}
|
||||||
button={{
|
button={{
|
||||||
leftText,
|
leftText,
|
||||||
text: loc.multisig.view_key,
|
text: loc.multisig.share,
|
||||||
disabled: vaultKeyData.isLoading,
|
disabled: vaultKeyData.isLoading,
|
||||||
buttonType: MultipleStepsListItemButtohType.partial,
|
buttonType: MultipleStepsListItemButtohType.partial,
|
||||||
onPress: () => {
|
onPress: () => {
|
||||||
|
|
Loading…
Add table
Reference in a new issue