mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-02-24 07:28:07 +01:00
Merge pull request #4436 from BlueWallet/limpbrains-ref-bluecomponents
REF: BlueComponents and inline styles
This commit is contained in:
commit
49847d8bce
51 changed files with 441 additions and 1238 deletions
|
@ -18,6 +18,8 @@
|
|||
"react/jsx-handler-names": "off", // activated by standard-react config
|
||||
"react/display-name": "off",
|
||||
"react-native/no-inline-styles": "error",
|
||||
"react-native/no-unused-styles": "error",
|
||||
"react-native/no-single-element-style-arrays": "error",
|
||||
"prettier/prettier": [
|
||||
"warn",
|
||||
{
|
||||
|
|
19
App.js
19
App.js
|
@ -386,25 +386,6 @@ const styles = StyleSheet.create({
|
|||
root: {
|
||||
flex: 1,
|
||||
},
|
||||
space: {
|
||||
marginHorizontal: 8,
|
||||
},
|
||||
modalContent: {
|
||||
padding: 22,
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
borderTopLeftRadius: 16,
|
||||
borderTopRightRadius: 16,
|
||||
borderColor: 'rgba(0, 0, 0, 0.1)',
|
||||
minHeight: 200,
|
||||
height: 200,
|
||||
},
|
||||
modelContentButtonLayout: {
|
||||
flexDirection: 'row',
|
||||
margin: 16,
|
||||
justifyContent: 'space-between',
|
||||
alignItems: 'flex-end',
|
||||
},
|
||||
});
|
||||
|
||||
export default App;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* eslint react/prop-types: "off", react-native/no-inline-styles: "off" */
|
||||
import React, { Component, forwardRef } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { Icon, Input, Text, Header, ListItem, Avatar } from 'react-native-elements';
|
||||
import { Icon, Text, Header, ListItem, Avatar } from 'react-native-elements';
|
||||
import {
|
||||
ActivityIndicator,
|
||||
Alert,
|
||||
|
@ -11,7 +11,6 @@ import {
|
|||
InputAccessoryView,
|
||||
Keyboard,
|
||||
KeyboardAvoidingView,
|
||||
PixelRatio,
|
||||
Platform,
|
||||
PlatformColor,
|
||||
SafeAreaView,
|
||||
|
@ -28,6 +27,7 @@ import NetworkTransactionFees, { NetworkTransactionFee, NetworkTransactionFeeTyp
|
|||
import AsyncStorage from '@react-native-async-storage/async-storage';
|
||||
import { useTheme } from '@react-navigation/native';
|
||||
import { BlueCurrentTheme } from './components/themes';
|
||||
import PlusIcon from './components/icons/PlusIcon';
|
||||
import loc, { formatStringAddTwoWhiteSpaces } from './loc';
|
||||
|
||||
const { height, width } = Dimensions.get('window');
|
||||
|
@ -389,6 +389,7 @@ export const BlueTextCentered = props => {
|
|||
const { colors } = useTheme();
|
||||
return <Text {...props} style={{ color: colors.foregroundColor, textAlign: 'center' }} />;
|
||||
};
|
||||
|
||||
export const BlueListItem = React.memo(props => {
|
||||
const { colors } = useTheme();
|
||||
|
||||
|
@ -472,24 +473,6 @@ export const BlueFormLabel = props => {
|
|||
);
|
||||
};
|
||||
|
||||
export const BlueFormInput = props => {
|
||||
const { colors } = useTheme();
|
||||
return (
|
||||
<Input
|
||||
{...props}
|
||||
inputStyle={{ color: colors.foregroundColor, maxWidth: width - 105 }}
|
||||
containerStyle={{
|
||||
marginTop: 5,
|
||||
borderColor: colors.inputBorderColor,
|
||||
borderBottomColor: colors.inputBorderColor,
|
||||
borderWidth: 0.5,
|
||||
borderBottomWidth: 0.5,
|
||||
backgroundColor: colors.inputBackgroundColor,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
export const BlueFormMultiInput = props => {
|
||||
const { colors } = useTheme();
|
||||
|
||||
|
@ -523,19 +506,6 @@ export const BlueFormMultiInput = props => {
|
|||
);
|
||||
};
|
||||
|
||||
export const BlueHeader = props => {
|
||||
return (
|
||||
<Header
|
||||
{...props}
|
||||
backgroundColor="transparent"
|
||||
outerContainerStyles={{
|
||||
borderBottomColor: 'transparent',
|
||||
borderBottomWidth: 0,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
export const BlueHeaderDefaultSub = props => {
|
||||
const { colors } = useTheme();
|
||||
|
||||
|
@ -592,7 +562,7 @@ export const BlueHeaderDefaultMain = props => {
|
|||
>
|
||||
{props.leftText}
|
||||
</Text>
|
||||
<BluePlusIcon onPress={props.onNewWalletPress} Component={TouchableOpacity} />
|
||||
<PlusIcon onPress={props.onNewWalletPress} Component={TouchableOpacity} />
|
||||
</View>
|
||||
);
|
||||
};
|
||||
|
@ -605,14 +575,6 @@ export const BlueSpacing40 = props => {
|
|||
return <View {...props} style={{ height: 50 }} />;
|
||||
};
|
||||
|
||||
export const BlueSpacingVariable = props => {
|
||||
if (isIpad) {
|
||||
return <BlueSpacing40 {...props} />;
|
||||
} else {
|
||||
return <BlueSpacing {...props} />;
|
||||
}
|
||||
};
|
||||
|
||||
export class is {
|
||||
static ipad() {
|
||||
return isIpad;
|
||||
|
@ -690,299 +652,6 @@ export const BlueLoading = props => {
|
|||
);
|
||||
};
|
||||
|
||||
const stylesBlueIcon = StyleSheet.create({
|
||||
container: {
|
||||
flex: 1,
|
||||
},
|
||||
box1: {
|
||||
position: 'relative',
|
||||
top: 15,
|
||||
},
|
||||
box: {
|
||||
alignSelf: 'flex-end',
|
||||
paddingHorizontal: 14,
|
||||
paddingTop: 8,
|
||||
},
|
||||
boxIncoming: {
|
||||
position: 'relative',
|
||||
},
|
||||
ball: {
|
||||
width: 30,
|
||||
height: 30,
|
||||
borderRadius: 15,
|
||||
},
|
||||
ballIncoming: {
|
||||
width: 30,
|
||||
height: 30,
|
||||
borderRadius: 15,
|
||||
transform: [{ rotate: '-45deg' }],
|
||||
justifyContent: 'center',
|
||||
},
|
||||
ballIncomingWithoutRotate: {
|
||||
width: 30,
|
||||
height: 30,
|
||||
borderRadius: 15,
|
||||
},
|
||||
ballReceive: {
|
||||
width: 30,
|
||||
height: 30,
|
||||
borderBottomLeftRadius: 15,
|
||||
transform: [{ rotate: '-45deg' }],
|
||||
},
|
||||
ballOutgoing: {
|
||||
width: 30,
|
||||
height: 30,
|
||||
borderRadius: 15,
|
||||
transform: [{ rotate: '225deg' }],
|
||||
justifyContent: 'center',
|
||||
},
|
||||
ballOutgoingWithoutRotate: {
|
||||
width: 30,
|
||||
height: 30,
|
||||
borderRadius: 15,
|
||||
},
|
||||
ballOutgoingExpired: {
|
||||
width: 30,
|
||||
height: 30,
|
||||
borderRadius: 15,
|
||||
justifyContent: 'center',
|
||||
},
|
||||
ballTransparrent: {
|
||||
width: 30,
|
||||
height: 30,
|
||||
borderRadius: 15,
|
||||
backgroundColor: 'transparent',
|
||||
},
|
||||
ballDimmed: {
|
||||
width: 30,
|
||||
height: 30,
|
||||
borderRadius: 15,
|
||||
backgroundColor: 'gray',
|
||||
},
|
||||
});
|
||||
|
||||
export const BluePlusIcon = props => {
|
||||
const { colors } = useTheme();
|
||||
const stylesBlueIconHooks = StyleSheet.create({
|
||||
ball: {
|
||||
backgroundColor: colors.buttonBackgroundColor,
|
||||
},
|
||||
});
|
||||
return (
|
||||
<Avatar
|
||||
rounded
|
||||
containerStyle={[stylesBlueIcon.ball, stylesBlueIconHooks.ball]}
|
||||
icon={{ name: 'add', size: 22, type: 'ionicons', color: colors.foregroundColor }}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
export const BlueTransactionIncomingIcon = props => {
|
||||
const { colors } = useTheme();
|
||||
const stylesBlueIconHooks = StyleSheet.create({
|
||||
ballIncoming: {
|
||||
backgroundColor: colors.ballReceive,
|
||||
},
|
||||
});
|
||||
return (
|
||||
<View {...props}>
|
||||
<View style={stylesBlueIcon.boxIncoming}>
|
||||
<View style={[stylesBlueIcon.ballIncoming, stylesBlueIconHooks.ballIncoming]}>
|
||||
<Icon {...props} name="arrow-down" size={16} type="font-awesome" color={colors.incomingForegroundColor} />
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
};
|
||||
|
||||
export const BlueTransactionPendingIcon = props => {
|
||||
const { colors } = useTheme();
|
||||
|
||||
const stylesBlueIconHooks = StyleSheet.create({
|
||||
ball: {
|
||||
backgroundColor: colors.buttonBackgroundColor,
|
||||
},
|
||||
});
|
||||
return (
|
||||
<View {...props}>
|
||||
<View style={stylesBlueIcon.boxIncoming}>
|
||||
<View style={[stylesBlueIcon.ball, stylesBlueIconHooks.ball]}>
|
||||
<Icon
|
||||
{...props}
|
||||
name="kebab-horizontal"
|
||||
size={16}
|
||||
type="octicon"
|
||||
color={colors.foregroundColor}
|
||||
iconStyle={{ left: 0, top: 7 }}
|
||||
/>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
};
|
||||
|
||||
export const BlueTransactionExpiredIcon = props => {
|
||||
const { colors } = useTheme();
|
||||
const stylesBlueIconHooks = StyleSheet.create({
|
||||
ballOutgoingExpired: {
|
||||
backgroundColor: colors.ballOutgoingExpired,
|
||||
},
|
||||
});
|
||||
return (
|
||||
<View {...props}>
|
||||
<View style={stylesBlueIcon.boxIncoming}>
|
||||
<View style={[stylesBlueIcon.ballOutgoingExpired, stylesBlueIconHooks.ballOutgoingExpired]}>
|
||||
<Icon {...props} name="clock" size={16} type="octicon" color="#9AA0AA" iconStyle={{ left: 0, top: 0 }} />
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
};
|
||||
|
||||
export const BlueTransactionOnchainIcon = props => {
|
||||
const { colors } = useTheme();
|
||||
const stylesBlueIconHooks = StyleSheet.create({
|
||||
ballIncoming: {
|
||||
backgroundColor: colors.ballReceive,
|
||||
},
|
||||
});
|
||||
return (
|
||||
<View {...props}>
|
||||
<View style={stylesBlueIcon.boxIncoming}>
|
||||
<View style={[stylesBlueIcon.ballIncoming, stylesBlueIconHooks.ballIncoming]}>
|
||||
<Icon
|
||||
{...props}
|
||||
name="link"
|
||||
size={16}
|
||||
type="font-awesome"
|
||||
color={colors.incomingForegroundColor}
|
||||
iconStyle={{ left: 0, top: 0, transform: [{ rotate: '-45deg' }] }}
|
||||
/>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
};
|
||||
|
||||
export const BlueTransactionOffchainIcon = props => {
|
||||
const { colors } = useTheme();
|
||||
const stylesBlueIconHooks = StyleSheet.create({
|
||||
ballOutgoingWithoutRotate: {
|
||||
backgroundColor: colors.ballOutgoing,
|
||||
},
|
||||
});
|
||||
return (
|
||||
<View {...props}>
|
||||
<View style={stylesBlueIcon.boxIncoming}>
|
||||
<View style={[stylesBlueIcon.ballOutgoingWithoutRotate, stylesBlueIconHooks.ballOutgoingWithoutRotate]}>
|
||||
<Icon
|
||||
{...props}
|
||||
name="bolt"
|
||||
size={16}
|
||||
type="font-awesome"
|
||||
color={colors.outgoingForegroundColor}
|
||||
iconStyle={{ left: 0, marginTop: 6 }}
|
||||
/>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
};
|
||||
|
||||
export const BlueTransactionOffchainIncomingIcon = props => {
|
||||
const { colors } = useTheme();
|
||||
const stylesBlueIconHooks = StyleSheet.create({
|
||||
ballIncomingWithoutRotate: {
|
||||
backgroundColor: colors.ballReceive,
|
||||
},
|
||||
});
|
||||
return (
|
||||
<View {...props}>
|
||||
<View style={stylesBlueIcon.boxIncoming}>
|
||||
<View style={[stylesBlueIcon.ballIncomingWithoutRotate, stylesBlueIconHooks.ballIncomingWithoutRotate]}>
|
||||
<Icon
|
||||
{...props}
|
||||
name="bolt"
|
||||
size={16}
|
||||
type="font-awesome"
|
||||
color={colors.incomingForegroundColor}
|
||||
iconStyle={{ left: 0, marginTop: 6 }}
|
||||
/>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
};
|
||||
|
||||
export const BlueTransactionOutgoingIcon = props => {
|
||||
const { colors } = useTheme();
|
||||
const stylesBlueIconHooks = StyleSheet.create({
|
||||
ballOutgoing: {
|
||||
backgroundColor: colors.ballOutgoing,
|
||||
},
|
||||
});
|
||||
return (
|
||||
<View {...props}>
|
||||
<View style={stylesBlueIcon.boxIncoming}>
|
||||
<View style={[stylesBlueIcon.ballOutgoing, stylesBlueIconHooks.ballOutgoing]}>
|
||||
<Icon {...props} name="arrow-down" size={16} type="font-awesome" color={colors.outgoingForegroundColor} />
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
};
|
||||
|
||||
const sendReceiveScanButtonFontSize =
|
||||
PixelRatio.roundToNearestPixel(Dimensions.get('window').width / 26) > 22
|
||||
? 22
|
||||
: PixelRatio.roundToNearestPixel(Dimensions.get('window').width / 26);
|
||||
export const BlueReceiveButtonIcon = props => {
|
||||
const { colors } = useTheme();
|
||||
|
||||
return (
|
||||
<TouchableOpacity accessibilityRole="button" {...props} style={{ flex: 1 }}>
|
||||
<View
|
||||
style={{
|
||||
flex: 1,
|
||||
backgroundColor: colors.buttonBackgroundColor,
|
||||
}}
|
||||
>
|
||||
<View style={{ flex: 1, flexDirection: 'row', alignItems: 'center', justifyContent: 'center' }}>
|
||||
<View
|
||||
style={{
|
||||
left: 5,
|
||||
backgroundColor: 'transparent',
|
||||
transform: [{ rotate: '-45deg' }],
|
||||
alignItems: 'center',
|
||||
marginRight: 8,
|
||||
}}
|
||||
>
|
||||
<Icon
|
||||
{...props}
|
||||
name="arrow-down"
|
||||
size={sendReceiveScanButtonFontSize}
|
||||
type="font-awesome"
|
||||
color={colors.buttonAlternativeTextColor}
|
||||
/>
|
||||
</View>
|
||||
<Text
|
||||
style={{
|
||||
color: colors.buttonAlternativeTextColor,
|
||||
fontWeight: '500',
|
||||
fontSize: sendReceiveScanButtonFontSize,
|
||||
left: 5,
|
||||
backgroundColor: 'transparent',
|
||||
}}
|
||||
>
|
||||
{formatStringAddTwoWhiteSpaces(loc.receive.header)}
|
||||
</Text>
|
||||
</View>
|
||||
</View>
|
||||
</TouchableOpacity>
|
||||
);
|
||||
};
|
||||
|
||||
export class BlueReplaceFeeSuggestions extends Component {
|
||||
static propTypes = {
|
||||
onFeeSelected: PropTypes.func.isRequired,
|
||||
|
|
|
@ -31,10 +31,6 @@ const styles = StyleSheet.create({
|
|||
width: 64,
|
||||
height: 64,
|
||||
},
|
||||
encrypted: {
|
||||
width: 0.5,
|
||||
height: 20,
|
||||
},
|
||||
});
|
||||
|
||||
const UnlockWith = () => {
|
||||
|
|
|
@ -338,7 +338,7 @@ const styles = StyleSheet.create({
|
|||
disabledButton: {
|
||||
opacity: 0.5,
|
||||
},
|
||||
enabledButton: {
|
||||
enabledButon: {
|
||||
opacity: 1,
|
||||
},
|
||||
outdatedRateContainer: {
|
||||
|
|
|
@ -61,9 +61,6 @@ const styles = StyleSheet.create({
|
|||
nodeAlias: {
|
||||
marginVertical: 16,
|
||||
},
|
||||
pending: {
|
||||
marginVertical: 8,
|
||||
},
|
||||
canSendBar: {
|
||||
height: 14,
|
||||
maxHeight: 14,
|
||||
|
|
|
@ -16,37 +16,9 @@ const MultipleStepsListItem = props => {
|
|||
checked = false,
|
||||
} = props;
|
||||
const stylesHook = StyleSheet.create({
|
||||
root: {
|
||||
flex: 1,
|
||||
backgroundColor: colors.elevated,
|
||||
},
|
||||
textBtc: {
|
||||
color: colors.buttonAlternativeTextColor,
|
||||
},
|
||||
textDestinationFirstFour: {
|
||||
color: colors.buttonAlternativeTextColor,
|
||||
},
|
||||
textBtcUnitValue: {
|
||||
color: colors.buttonAlternativeTextColor,
|
||||
},
|
||||
textDestination: {
|
||||
color: colors.foregroundColor,
|
||||
},
|
||||
modalContentShort: {
|
||||
backgroundColor: colors.elevated,
|
||||
},
|
||||
modalContent: {
|
||||
backgroundColor: colors.elevated,
|
||||
},
|
||||
textFiat: {
|
||||
color: colors.alternativeTextColor,
|
||||
},
|
||||
provideKeyButton: {
|
||||
backgroundColor: colors.buttonDisabledBackgroundColor,
|
||||
},
|
||||
exportButton: {
|
||||
backgroundColor: colors.buttonDisabledBackgroundColor,
|
||||
},
|
||||
provideKeyButtonText: {
|
||||
color: colors.buttonTextColor,
|
||||
},
|
||||
|
@ -56,15 +28,9 @@ const MultipleStepsListItem = props => {
|
|||
vaultKeyText: {
|
||||
color: colors.alternativeTextColor,
|
||||
},
|
||||
feeFiatText: {
|
||||
color: colors.alternativeTextColor,
|
||||
},
|
||||
vaultKeyCircleSuccess: {
|
||||
backgroundColor: colors.msSuccessBG,
|
||||
},
|
||||
vaultKeyTextSigned: {
|
||||
color: colors.msSuccessBG,
|
||||
},
|
||||
rowPartialLeftText: {
|
||||
color: colors.alternativeTextColor,
|
||||
},
|
||||
|
@ -258,15 +224,6 @@ const styles = StyleSheet.create({
|
|||
alignContent: 'center',
|
||||
justifyContent: 'center',
|
||||
},
|
||||
grayButton: {
|
||||
marginTop: 24,
|
||||
marginLeft: 40,
|
||||
height: 48,
|
||||
borderRadius: 8,
|
||||
justifyContent: 'center',
|
||||
paddingHorizontal: 16,
|
||||
marginBottom: 8,
|
||||
},
|
||||
activityIndicator: {
|
||||
marginLeft: 40,
|
||||
},
|
||||
|
@ -281,15 +238,6 @@ const styles = StyleSheet.create({
|
|||
rowPartialLeftText: {
|
||||
textAlign: 'center',
|
||||
},
|
||||
vaultKeyTextSignedWrapper: { justifyContent: 'center', alignItems: 'center', paddingLeft: 16 },
|
||||
vaultKeyTextSigned: { fontSize: 18, fontWeight: 'bold' },
|
||||
exportButton: {
|
||||
height: 48,
|
||||
borderRadius: 8,
|
||||
flex: 1,
|
||||
justifyContent: 'center',
|
||||
paddingHorizontal: 16,
|
||||
},
|
||||
});
|
||||
|
||||
export default MultipleStepsListItem;
|
||||
|
|
|
@ -2,24 +2,23 @@
|
|||
import React, { useState, useMemo, useCallback, useContext, useEffect, useRef } from 'react';
|
||||
import { Linking, StyleSheet, View } from 'react-native';
|
||||
import Clipboard from '@react-native-clipboard/clipboard';
|
||||
import { BitcoinUnit } from '../models/bitcoinUnits';
|
||||
import * as NavigationService from '../NavigationService';
|
||||
import AsyncStorage from '@react-native-async-storage/async-storage';
|
||||
import { useNavigation, useTheme } from '@react-navigation/native';
|
||||
|
||||
import { BitcoinUnit } from '../models/bitcoinUnits';
|
||||
import * as NavigationService from '../NavigationService';
|
||||
import loc, { formatBalanceWithoutSuffix, transactionTimeToReadable } from '../loc';
|
||||
import Lnurl from '../class/lnurl';
|
||||
import { BlueStorageContext } from '../blue_modules/storage-context';
|
||||
import ToolTipMenu from './TooltipMenu';
|
||||
import {
|
||||
BlueListItem,
|
||||
BlueTransactionExpiredIcon,
|
||||
BlueTransactionIncomingIcon,
|
||||
BlueTransactionOffchainIcon,
|
||||
BlueTransactionOffchainIncomingIcon,
|
||||
BlueTransactionOnchainIcon,
|
||||
BlueTransactionOutgoingIcon,
|
||||
BlueTransactionPendingIcon,
|
||||
} from '../BlueComponents';
|
||||
import { BlueListItem } from '../BlueComponents';
|
||||
import TransactionExpiredIcon from '../components/icons/TransactionExpiredIcon';
|
||||
import TransactionIncomingIcon from '../components/icons/TransactionIncomingIcon';
|
||||
import TransactionOffchainIcon from '../components/icons/TransactionOffchainIcon';
|
||||
import TransactionOffchainIncomingIcon from '../components/icons/TransactionOffchainIncomingIcon';
|
||||
import TransactionOnchainIcon from '../components/icons/TransactionOnchainIcon';
|
||||
import TransactionOutgoingIcon from '../components/icons/TransactionOutgoingIcon';
|
||||
import TransactionPendingIcon from '../components/icons/TransactionPendingIcon';
|
||||
|
||||
export const TransactionListItem = React.memo(({ item, itemPriceUnit = BitcoinUnit.BTC, walletID }) => {
|
||||
const [subtitleNumberOfLines, setSubtitleNumberOfLines] = useState(1);
|
||||
|
@ -114,7 +113,7 @@ export const TransactionListItem = React.memo(({ item, itemPriceUnit = BitcoinUn
|
|||
if (item.category === 'receive' && item.confirmations < 3) {
|
||||
return (
|
||||
<View style={styles.iconWidth}>
|
||||
<BlueTransactionPendingIcon />
|
||||
<TransactionPendingIcon />
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
@ -122,7 +121,7 @@ export const TransactionListItem = React.memo(({ item, itemPriceUnit = BitcoinUn
|
|||
if (item.type && item.type === 'bitcoind_tx') {
|
||||
return (
|
||||
<View style={styles.iconWidth}>
|
||||
<BlueTransactionOnchainIcon />
|
||||
<TransactionOnchainIcon />
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
@ -130,7 +129,7 @@ export const TransactionListItem = React.memo(({ item, itemPriceUnit = BitcoinUn
|
|||
// is it lightning offchain payment?
|
||||
return (
|
||||
<View style={styles.iconWidth}>
|
||||
<BlueTransactionOffchainIcon />
|
||||
<TransactionOffchainIcon />
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
@ -143,14 +142,14 @@ export const TransactionListItem = React.memo(({ item, itemPriceUnit = BitcoinUn
|
|||
if (invoiceExpiration < now) {
|
||||
return (
|
||||
<View style={styles.iconWidth}>
|
||||
<BlueTransactionExpiredIcon />
|
||||
<TransactionExpiredIcon />
|
||||
</View>
|
||||
);
|
||||
}
|
||||
} else {
|
||||
return (
|
||||
<View style={styles.iconWidth}>
|
||||
<BlueTransactionOffchainIncomingIcon />
|
||||
<TransactionOffchainIncomingIcon />
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
@ -159,19 +158,19 @@ export const TransactionListItem = React.memo(({ item, itemPriceUnit = BitcoinUn
|
|||
if (!item.confirmations) {
|
||||
return (
|
||||
<View style={styles.iconWidth}>
|
||||
<BlueTransactionPendingIcon />
|
||||
<TransactionPendingIcon />
|
||||
</View>
|
||||
);
|
||||
} else if (item.value < 0) {
|
||||
return (
|
||||
<View style={styles.iconWidth}>
|
||||
<BlueTransactionOutgoingIcon />
|
||||
<TransactionOutgoingIcon />
|
||||
</View>
|
||||
);
|
||||
} else {
|
||||
return (
|
||||
<View style={styles.iconWidth}>
|
||||
<BlueTransactionIncomingIcon />
|
||||
<TransactionIncomingIcon />
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -24,7 +24,6 @@ import { BlueStorageContext } from '../blue_modules/storage-context';
|
|||
import { isHandset, isTablet, isDesktop } from '../blue_modules/environment';
|
||||
|
||||
const nStyles = StyleSheet.create({
|
||||
root: {},
|
||||
container: {
|
||||
borderRadius: 10,
|
||||
minHeight: Platform.OS === 'ios' ? 164 : 181,
|
||||
|
@ -118,9 +117,6 @@ const iStyles = StyleSheet.create({
|
|||
fontSize: 19,
|
||||
writingDirection: I18nManager.isRTL ? 'rtl' : 'ltr',
|
||||
},
|
||||
activity: {
|
||||
marginTop: 40,
|
||||
},
|
||||
balance: {
|
||||
backgroundColor: 'transparent',
|
||||
fontWeight: 'bold',
|
||||
|
@ -258,17 +254,16 @@ WalletCarouselItem.propTypes = {
|
|||
};
|
||||
|
||||
const cStyles = StyleSheet.create({
|
||||
loading: {
|
||||
position: 'absolute',
|
||||
alignItems: 'center',
|
||||
},
|
||||
content: {
|
||||
paddingTop: 16,
|
||||
},
|
||||
contentLargeScreen: {
|
||||
paddingHorizontal: 16,
|
||||
},
|
||||
separatorStyle: { width: 16, height: 20 },
|
||||
separatorStyle: {
|
||||
width: 16,
|
||||
height: 20,
|
||||
},
|
||||
});
|
||||
|
||||
const WalletsCarousel = forwardRef((props, ref) => {
|
||||
|
|
32
components/icons/PlusIcon.js
Normal file
32
components/icons/PlusIcon.js
Normal file
|
@ -0,0 +1,32 @@
|
|||
import React from 'react';
|
||||
import { StyleSheet } from 'react-native';
|
||||
import { Avatar } from 'react-native-elements';
|
||||
import { useTheme } from '@react-navigation/native';
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
ball: {
|
||||
width: 30,
|
||||
height: 30,
|
||||
borderRadius: 15,
|
||||
},
|
||||
});
|
||||
|
||||
const PlusIcon = props => {
|
||||
const { colors } = useTheme();
|
||||
const stylesHook = StyleSheet.create({
|
||||
ball: {
|
||||
backgroundColor: colors.buttonBackgroundColor,
|
||||
},
|
||||
});
|
||||
|
||||
return (
|
||||
<Avatar
|
||||
rounded
|
||||
containerStyle={[styles.ball, stylesHook.ball]}
|
||||
icon={{ name: 'add', size: 22, type: 'ionicons', color: colors.foregroundColor }}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
export default PlusIcon;
|
39
components/icons/TransactionExpiredIcon.js
Normal file
39
components/icons/TransactionExpiredIcon.js
Normal file
|
@ -0,0 +1,39 @@
|
|||
import React from 'react';
|
||||
import { StyleSheet, View } from 'react-native';
|
||||
import { Icon } from 'react-native-elements';
|
||||
import { useTheme } from '@react-navigation/native';
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
boxIncoming: {
|
||||
position: 'relative',
|
||||
},
|
||||
ballOutgoingExpired: {
|
||||
width: 30,
|
||||
height: 30,
|
||||
borderRadius: 15,
|
||||
justifyContent: 'center',
|
||||
},
|
||||
icon: {
|
||||
left: 0,
|
||||
top: 0,
|
||||
},
|
||||
});
|
||||
|
||||
const TransactionExpiredIcon = props => {
|
||||
const { colors } = useTheme();
|
||||
const stylesHooks = StyleSheet.create({
|
||||
ballOutgoingExpired: {
|
||||
backgroundColor: colors.ballOutgoingExpired,
|
||||
},
|
||||
});
|
||||
|
||||
return (
|
||||
<View style={styles.boxIncoming}>
|
||||
<View style={[styles.ballOutgoingExpired, stylesHooks.ballOutgoingExpired]}>
|
||||
<Icon name="clock" size={16} type="octicon" color="#9AA0AA" iconStyle={styles.icon} />
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
};
|
||||
|
||||
export default TransactionExpiredIcon;
|
36
components/icons/TransactionIncomingIcon.js
Normal file
36
components/icons/TransactionIncomingIcon.js
Normal file
|
@ -0,0 +1,36 @@
|
|||
import React from 'react';
|
||||
import { StyleSheet, View } from 'react-native';
|
||||
import { Icon } from 'react-native-elements';
|
||||
import { useTheme } from '@react-navigation/native';
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
boxIncoming: {
|
||||
position: 'relative',
|
||||
},
|
||||
ballIncoming: {
|
||||
width: 30,
|
||||
height: 30,
|
||||
borderRadius: 15,
|
||||
transform: [{ rotate: '-45deg' }],
|
||||
justifyContent: 'center',
|
||||
},
|
||||
});
|
||||
|
||||
const TransactionIncomingIcon = props => {
|
||||
const { colors } = useTheme();
|
||||
const stylesHooks = StyleSheet.create({
|
||||
ballIncoming: {
|
||||
backgroundColor: colors.ballReceive,
|
||||
},
|
||||
});
|
||||
|
||||
return (
|
||||
<View style={styles.boxIncoming}>
|
||||
<View style={[styles.ballIncoming, stylesHooks.ballIncoming]}>
|
||||
<Icon name="arrow-down" size={16} type="font-awesome" color={colors.incomingForegroundColor} />
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
};
|
||||
|
||||
export default TransactionIncomingIcon;
|
38
components/icons/TransactionOffchainIcon.js
Normal file
38
components/icons/TransactionOffchainIcon.js
Normal file
|
@ -0,0 +1,38 @@
|
|||
import React from 'react';
|
||||
import { StyleSheet, View } from 'react-native';
|
||||
import { Icon } from 'react-native-elements';
|
||||
import { useTheme } from '@react-navigation/native';
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
boxIncoming: {
|
||||
position: 'relative',
|
||||
},
|
||||
ballOutgoingWithoutRotate: {
|
||||
width: 30,
|
||||
height: 30,
|
||||
borderRadius: 15,
|
||||
},
|
||||
icon: {
|
||||
left: 0,
|
||||
marginTop: 6,
|
||||
},
|
||||
});
|
||||
|
||||
const TransactionOffchainIcon = props => {
|
||||
const { colors } = useTheme();
|
||||
const stylesHooks = StyleSheet.create({
|
||||
ballOutgoingWithoutRotate: {
|
||||
backgroundColor: colors.ballOutgoing,
|
||||
},
|
||||
});
|
||||
|
||||
return (
|
||||
<View style={styles.boxIncoming}>
|
||||
<View style={[styles.ballOutgoingWithoutRotate, stylesHooks.ballOutgoingWithoutRotate]}>
|
||||
<Icon name="bolt" size={16} type="font-awesome" color={colors.outgoingForegroundColor} iconStyle={styles.icon} />
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
};
|
||||
|
||||
export default TransactionOffchainIcon;
|
38
components/icons/TransactionOffchainIncomingIcon.js
Normal file
38
components/icons/TransactionOffchainIncomingIcon.js
Normal file
|
@ -0,0 +1,38 @@
|
|||
import React from 'react';
|
||||
import { StyleSheet, View } from 'react-native';
|
||||
import { Icon } from 'react-native-elements';
|
||||
import { useTheme } from '@react-navigation/native';
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
boxIncoming: {
|
||||
position: 'relative',
|
||||
},
|
||||
ballIncomingWithoutRotate: {
|
||||
width: 30,
|
||||
height: 30,
|
||||
borderRadius: 15,
|
||||
},
|
||||
icon: {
|
||||
left: 0,
|
||||
marginTop: 6,
|
||||
},
|
||||
});
|
||||
|
||||
const TransactionOffchainIncomingIcon = props => {
|
||||
const { colors } = useTheme();
|
||||
const stylesHooks = StyleSheet.create({
|
||||
ballIncomingWithoutRotate: {
|
||||
backgroundColor: colors.ballReceive,
|
||||
},
|
||||
});
|
||||
|
||||
return (
|
||||
<View style={styles.boxIncoming}>
|
||||
<View style={[styles.ballIncomingWithoutRotate, stylesHooks.ballIncomingWithoutRotate]}>
|
||||
<Icon name="bolt" size={16} type="font-awesome" color={colors.incomingForegroundColor} iconStyle={styles.icon} />
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
};
|
||||
|
||||
export default TransactionOffchainIncomingIcon;
|
41
components/icons/TransactionOnchainIcon.js
Normal file
41
components/icons/TransactionOnchainIcon.js
Normal file
|
@ -0,0 +1,41 @@
|
|||
import React from 'react';
|
||||
import { StyleSheet, View } from 'react-native';
|
||||
import { Icon } from 'react-native-elements';
|
||||
import { useTheme } from '@react-navigation/native';
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
boxIncoming: {
|
||||
position: 'relative',
|
||||
},
|
||||
ballIncoming: {
|
||||
width: 30,
|
||||
height: 30,
|
||||
borderRadius: 15,
|
||||
transform: [{ rotate: '-45deg' }],
|
||||
justifyContent: 'center',
|
||||
},
|
||||
icon: {
|
||||
left: 0,
|
||||
top: 0,
|
||||
transform: [{ rotate: '-45deg' }],
|
||||
},
|
||||
});
|
||||
|
||||
const TransactionOnchainIcon = props => {
|
||||
const { colors } = useTheme();
|
||||
const stylesBlueIconHooks = StyleSheet.create({
|
||||
ballIncoming: {
|
||||
backgroundColor: colors.ballReceive,
|
||||
},
|
||||
});
|
||||
|
||||
return (
|
||||
<View style={styles.boxIncoming}>
|
||||
<View style={[styles.ballIncoming, stylesBlueIconHooks.ballIncoming]}>
|
||||
<Icon name="link" size={16} type="font-awesome" color={colors.incomingForegroundColor} iconStyle={styles.icon} />
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
};
|
||||
|
||||
export default TransactionOnchainIcon;
|
36
components/icons/TransactionOutgoingIcon.js
Normal file
36
components/icons/TransactionOutgoingIcon.js
Normal file
|
@ -0,0 +1,36 @@
|
|||
import React from 'react';
|
||||
import { StyleSheet, View } from 'react-native';
|
||||
import { Icon } from 'react-native-elements';
|
||||
import { useTheme } from '@react-navigation/native';
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
boxIncoming: {
|
||||
position: 'relative',
|
||||
},
|
||||
ballOutgoing: {
|
||||
width: 30,
|
||||
height: 30,
|
||||
borderRadius: 15,
|
||||
transform: [{ rotate: '225deg' }],
|
||||
justifyContent: 'center',
|
||||
},
|
||||
});
|
||||
|
||||
const TransactionOutgoingIcon = props => {
|
||||
const { colors } = useTheme();
|
||||
const stylesBlueIconHooks = StyleSheet.create({
|
||||
ballOutgoing: {
|
||||
backgroundColor: colors.ballOutgoing,
|
||||
},
|
||||
});
|
||||
|
||||
return (
|
||||
<View style={styles.boxIncoming}>
|
||||
<View style={[styles.ballOutgoing, stylesBlueIconHooks.ballOutgoing]}>
|
||||
<Icon name="arrow-down" size={16} type="font-awesome" color={colors.outgoingForegroundColor} />
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
};
|
||||
|
||||
export default TransactionOutgoingIcon;
|
38
components/icons/TransactionPendingIcon.js
Normal file
38
components/icons/TransactionPendingIcon.js
Normal file
|
@ -0,0 +1,38 @@
|
|||
import React from 'react';
|
||||
import { StyleSheet, View } from 'react-native';
|
||||
import { Icon } from 'react-native-elements';
|
||||
import { useTheme } from '@react-navigation/native';
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
boxIncoming: {
|
||||
position: 'relative',
|
||||
},
|
||||
ball: {
|
||||
width: 30,
|
||||
height: 30,
|
||||
borderRadius: 15,
|
||||
},
|
||||
icon: {
|
||||
left: 0,
|
||||
top: 7,
|
||||
},
|
||||
});
|
||||
|
||||
const TransactionPendingIcon = props => {
|
||||
const { colors } = useTheme();
|
||||
const stylesHook = StyleSheet.create({
|
||||
ball: {
|
||||
backgroundColor: colors.buttonBackgroundColor,
|
||||
},
|
||||
});
|
||||
|
||||
return (
|
||||
<View style={styles.boxIncoming}>
|
||||
<View style={[styles.ball, stylesHook.ball]}>
|
||||
<Icon name="kebab-horizontal" size={16} type="octicon" color={colors.foregroundColor} iconStyle={styles.icon} />
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
};
|
||||
|
||||
export default TransactionPendingIcon;
|
|
@ -31,19 +31,11 @@ type RNGHFlatListProps<T> = Animated.AnimateProps<
|
|||
}
|
||||
>;
|
||||
|
||||
const AnimatedFlatList = (Animated.createAnimatedComponent(FlatList) as unknown) as <T>(props: RNGHFlatListProps<T>) => React.ReactElement;
|
||||
const AnimatedFlatList = Animated.createAnimatedComponent(FlatList) as unknown as <T>(props: RNGHFlatListProps<T>) => React.ReactElement;
|
||||
|
||||
function DraggableFlatListInner<T>(props: DraggableFlatListProps<T>) {
|
||||
const {
|
||||
cellDataRef,
|
||||
containerRef,
|
||||
flatListRef,
|
||||
isTouchActiveRef,
|
||||
keyToIndexRef,
|
||||
panGestureHandlerRef,
|
||||
propsRef,
|
||||
scrollOffsetRef,
|
||||
} = useRefs<T>();
|
||||
const { cellDataRef, containerRef, flatListRef, isTouchActiveRef, keyToIndexRef, panGestureHandlerRef, propsRef, scrollOffsetRef } =
|
||||
useRefs<T>();
|
||||
const {
|
||||
activationDistance,
|
||||
activeCellOffset,
|
||||
|
|
|
@ -229,9 +229,6 @@ const styles = StyleSheet.create({
|
|||
justifyContent: 'space-between',
|
||||
minHeight: 44,
|
||||
},
|
||||
safeBack: {
|
||||
marginHorizontal: 8,
|
||||
},
|
||||
safeURL: {
|
||||
flex: 1,
|
||||
marginHorizontal: 8,
|
||||
|
@ -281,6 +278,7 @@ const styles = StyleSheet.create({
|
|||
colorRed: {
|
||||
color: 'red',
|
||||
},
|
||||
// eslint-disable-next-line react-native/no-unused-styles
|
||||
colorGray: {
|
||||
color: 'gray',
|
||||
},
|
||||
|
|
|
@ -47,14 +47,10 @@ const LdkInfo = () => {
|
|||
// Modals
|
||||
const [selectedChannelIndex, setSelectedChannelIndex] = useState<any>();
|
||||
|
||||
//
|
||||
const stylesHook = StyleSheet.create({
|
||||
root: {
|
||||
backgroundColor: colors.background,
|
||||
},
|
||||
valueText: {
|
||||
color: colors.alternativeTextColor2,
|
||||
},
|
||||
listHeaderText: {
|
||||
color: colors.foregroundColor,
|
||||
backgroundColor: colors.background,
|
||||
|
@ -62,27 +58,9 @@ const LdkInfo = () => {
|
|||
listHeaderBack: {
|
||||
backgroundColor: colors.background,
|
||||
},
|
||||
valueRoot: {
|
||||
backgroundColor: colors.background,
|
||||
},
|
||||
textHeader: {
|
||||
color: colors.outputValue,
|
||||
},
|
||||
valueSats: {
|
||||
color: colors.alternativeTextColor2,
|
||||
},
|
||||
paidMark: {
|
||||
backgroundColor: colors.success,
|
||||
},
|
||||
detailsText: {
|
||||
color: colors.alternativeTextColor,
|
||||
},
|
||||
expired: {
|
||||
backgroundColor: colors.success,
|
||||
},
|
||||
additionalInfo: {
|
||||
backgroundColor: colors.brandingColor,
|
||||
},
|
||||
modalContent: {
|
||||
backgroundColor: colors.elevated,
|
||||
},
|
||||
|
@ -257,10 +235,10 @@ const LdkInfo = () => {
|
|||
return (
|
||||
<BottomModal isVisible={selectedChannelIndex !== undefined} onClose={closeModal} avoidKeyboard>
|
||||
<View style={[styles.modalContent, stylesHook.modalContent]}>
|
||||
<Text style={[stylesHook.detailsText]}>{loc.lnd.node_alias}</Text>
|
||||
<Text style={stylesHook.detailsText}>{loc.lnd.node_alias}</Text>
|
||||
<BlueSpacing10 />
|
||||
{channelData && (
|
||||
<Text style={[stylesHook.detailsText]}>
|
||||
<Text style={stylesHook.detailsText}>
|
||||
{LightningLdkWallet.pubkeyToAlias(channelData.remote_node_id) +
|
||||
' (' +
|
||||
channelData.remote_node_id.substr(0, 10) +
|
||||
|
@ -279,7 +257,7 @@ const LdkInfo = () => {
|
|||
itemPriceUnit={wallet.getPreferredBalanceUnit()}
|
||||
/>
|
||||
|
||||
<Text style={[stylesHook.detailsText]}>
|
||||
<Text style={stylesHook.detailsText}>
|
||||
{status === LdkNodeInfoChannelStatus.PENDING
|
||||
? loc.transactions.pending
|
||||
: channelData?.is_usable
|
||||
|
@ -428,11 +406,11 @@ const LdkInfo = () => {
|
|||
</>
|
||||
) : null}
|
||||
{maturingBalance ? (
|
||||
<Text style={[stylesHook.detailsText]}>
|
||||
<Text style={stylesHook.detailsText}>
|
||||
Balance awaiting confirmations: {formatBalance(Number(maturingBalance), wallet.getPreferredBalanceUnit(), true)}
|
||||
</Text>
|
||||
) : null}
|
||||
{maturingEta ? <Text style={[stylesHook.detailsText]}>ETA: {maturingEta}</Text> : null}
|
||||
{maturingEta ? <Text style={stylesHook.detailsText}>ETA: {maturingEta}</Text> : null}
|
||||
<Button text={loc.lnd.new_channel} onPress={navigateToOpenPrivateChannel} disabled={isLoading} />
|
||||
<BlueSpacing20 />
|
||||
</View>
|
||||
|
@ -445,79 +423,12 @@ const styles = StyleSheet.create({
|
|||
flex: 1,
|
||||
justifyContent: 'space-between',
|
||||
},
|
||||
height100: {
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
},
|
||||
marginHorizontal16: {
|
||||
marginHorizontal: 16,
|
||||
},
|
||||
contentContainerStyle: {
|
||||
marginHorizontal: 16,
|
||||
},
|
||||
justifyContentCenter: {
|
||||
justifyContent: 'center',
|
||||
},
|
||||
qrCodeContainer: { borderWidth: 6, borderRadius: 8, borderColor: '#FFFFFF' },
|
||||
valueAmount: {
|
||||
flexDirection: 'row',
|
||||
justifyContent: 'center',
|
||||
paddingBottom: 8,
|
||||
},
|
||||
valueText: {
|
||||
fontSize: 32,
|
||||
fontWeight: '600',
|
||||
},
|
||||
valueSats: {
|
||||
fontSize: 16,
|
||||
marginHorizontal: 4,
|
||||
paddingBottom: 3,
|
||||
fontWeight: '600',
|
||||
alignSelf: 'flex-end',
|
||||
},
|
||||
memo: {
|
||||
color: '#9aa0aa',
|
||||
fontSize: 14,
|
||||
marginHorizontal: 4,
|
||||
paddingBottom: 6,
|
||||
fontWeight: '400',
|
||||
alignSelf: 'center',
|
||||
},
|
||||
paid: {
|
||||
flex: 3,
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
},
|
||||
paidMark: {
|
||||
marginTop: -100,
|
||||
marginBottom: 16,
|
||||
},
|
||||
detailsRoot: {
|
||||
justifyContent: 'flex-end',
|
||||
marginBottom: 24,
|
||||
alignItems: 'center',
|
||||
},
|
||||
detailsTouch: {
|
||||
flexDirection: 'row',
|
||||
alignItems: 'center',
|
||||
},
|
||||
detailsText: {
|
||||
fontSize: 14,
|
||||
marginRight: 8,
|
||||
},
|
||||
expired: {
|
||||
width: 120,
|
||||
height: 120,
|
||||
borderRadius: 60,
|
||||
alignSelf: 'center',
|
||||
justifyContent: 'center',
|
||||
marginBottom: 30,
|
||||
},
|
||||
activeRoot: {
|
||||
flex: 1,
|
||||
alignItems: 'center',
|
||||
justifyContent: 'space-between',
|
||||
},
|
||||
listHeaderText: {
|
||||
marginTop: 8,
|
||||
marginBottom: 8,
|
||||
|
@ -529,14 +440,6 @@ const styles = StyleSheet.create({
|
|||
justifyContent: 'space-between',
|
||||
alignItems: 'center',
|
||||
},
|
||||
activeQrcode: {
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
marginHorizontal: 16,
|
||||
borderWidth: 6,
|
||||
borderRadius: 8,
|
||||
borderColor: '#FFFFFF',
|
||||
},
|
||||
modalContent: {
|
||||
minHeight: 418,
|
||||
borderTopLeftRadius: 16,
|
||||
|
@ -544,29 +447,10 @@ const styles = StyleSheet.create({
|
|||
borderColor: 'rgba(0, 0, 0, 0.1)',
|
||||
padding: 24,
|
||||
},
|
||||
newChannelModalContent: {
|
||||
padding: 24,
|
||||
minHeight: 350,
|
||||
borderTopLeftRadius: 16,
|
||||
borderTopRightRadius: 16,
|
||||
borderColor: 'rgba(0, 0, 0, 0.1)',
|
||||
},
|
||||
fundingNewChannelModalContent: {
|
||||
padding: 24,
|
||||
paddingTop: 24,
|
||||
borderTopLeftRadius: 16,
|
||||
borderTopRightRadius: 16,
|
||||
borderColor: 'rgba(0, 0, 0, 0.1)',
|
||||
height: 400,
|
||||
},
|
||||
separator: {
|
||||
height: 1,
|
||||
marginTop: 16,
|
||||
},
|
||||
textHeader: {
|
||||
fontSize: 18,
|
||||
fontWeight: 'bold',
|
||||
},
|
||||
});
|
||||
|
||||
LdkInfo.navigationOptions = navigationStyle(
|
||||
|
|
|
@ -55,27 +55,6 @@ const LdkOpenChannel = (props: any) => {
|
|||
root: {
|
||||
backgroundColor: colors.elevated,
|
||||
},
|
||||
valueText: {
|
||||
color: colors.alternativeTextColor2,
|
||||
},
|
||||
valueRoot: {
|
||||
backgroundColor: colors.background,
|
||||
},
|
||||
valueSats: {
|
||||
color: colors.alternativeTextColor2,
|
||||
},
|
||||
paidMark: {
|
||||
backgroundColor: colors.success,
|
||||
},
|
||||
detailsText: {
|
||||
color: colors.alternativeTextColor,
|
||||
},
|
||||
expired: {
|
||||
backgroundColor: colors.success,
|
||||
},
|
||||
additionalInfo: {
|
||||
backgroundColor: colors.brandingColor,
|
||||
},
|
||||
});
|
||||
|
||||
/**
|
||||
|
@ -307,85 +286,19 @@ const styles = StyleSheet.create({
|
|||
root: {
|
||||
flex: 1,
|
||||
},
|
||||
contentContainerStyle: {
|
||||
flexGrow: 1,
|
||||
},
|
||||
justifyContentCenter: {
|
||||
justifyContent: 'center',
|
||||
},
|
||||
qrCodeContainer: { borderWidth: 6, borderRadius: 8, borderColor: '#FFFFFF' },
|
||||
valueAmount: {
|
||||
flexDirection: 'row',
|
||||
justifyContent: 'center',
|
||||
paddingBottom: 8,
|
||||
},
|
||||
horizontalButtons: {
|
||||
flexDirection: 'row',
|
||||
justifyContent: 'center',
|
||||
},
|
||||
valueText: {
|
||||
fontSize: 32,
|
||||
fontWeight: '600',
|
||||
},
|
||||
valueSats: {
|
||||
fontSize: 16,
|
||||
marginHorizontal: 4,
|
||||
paddingBottom: 3,
|
||||
fontWeight: '600',
|
||||
alignSelf: 'flex-end',
|
||||
},
|
||||
memo: {
|
||||
color: '#9aa0aa',
|
||||
fontSize: 14,
|
||||
marginHorizontal: 4,
|
||||
paddingBottom: 6,
|
||||
fontWeight: '400',
|
||||
alignSelf: 'center',
|
||||
},
|
||||
paid: {
|
||||
flex: 3,
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
},
|
||||
paidMark: {
|
||||
marginTop: -100,
|
||||
marginBottom: 16,
|
||||
},
|
||||
detailsRoot: {
|
||||
justifyContent: 'flex-end',
|
||||
marginBottom: 24,
|
||||
alignItems: 'center',
|
||||
},
|
||||
detailsTouch: {
|
||||
flexDirection: 'row',
|
||||
alignItems: 'center',
|
||||
},
|
||||
detailsText: {
|
||||
fontSize: 14,
|
||||
marginRight: 8,
|
||||
},
|
||||
expired: {
|
||||
width: 120,
|
||||
height: 120,
|
||||
borderRadius: 60,
|
||||
alignSelf: 'center',
|
||||
justifyContent: 'center',
|
||||
marginBottom: 30,
|
||||
},
|
||||
activeRoot: {
|
||||
flex: 1,
|
||||
alignItems: 'center',
|
||||
justifyContent: 'space-between',
|
||||
padding: 16,
|
||||
},
|
||||
activeQrcode: {
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
marginHorizontal: 16,
|
||||
borderWidth: 6,
|
||||
borderRadius: 8,
|
||||
borderColor: '#FFFFFF',
|
||||
},
|
||||
});
|
||||
|
||||
LdkOpenChannel.navigationOptions = navigationStyle(
|
||||
|
|
|
@ -484,10 +484,6 @@ const styles = StyleSheet.create({
|
|||
textAlignVertical: 'bottom',
|
||||
marginTop: 2,
|
||||
},
|
||||
error: {
|
||||
flex: 1,
|
||||
paddingTop: 20,
|
||||
},
|
||||
root: {
|
||||
flex: 1,
|
||||
justifyContent: 'space-between',
|
||||
|
|
|
@ -35,18 +35,6 @@ const LNDViewInvoice = () => {
|
|||
root: {
|
||||
backgroundColor: colors.background,
|
||||
},
|
||||
valueText: {
|
||||
color: colors.alternativeTextColor2,
|
||||
},
|
||||
valueRoot: {
|
||||
backgroundColor: colors.background,
|
||||
},
|
||||
valueSats: {
|
||||
color: colors.alternativeTextColor2,
|
||||
},
|
||||
paidMark: {
|
||||
backgroundColor: colors.success,
|
||||
},
|
||||
detailsText: {
|
||||
color: colors.alternativeTextColor,
|
||||
},
|
||||
|
@ -306,39 +294,6 @@ const styles = StyleSheet.create({
|
|||
justifyContentCenter: {
|
||||
justifyContent: 'center',
|
||||
},
|
||||
valueAmount: {
|
||||
flexDirection: 'row',
|
||||
justifyContent: 'center',
|
||||
paddingBottom: 8,
|
||||
},
|
||||
valueText: {
|
||||
fontSize: 32,
|
||||
fontWeight: '600',
|
||||
},
|
||||
valueSats: {
|
||||
fontSize: 16,
|
||||
marginHorizontal: 4,
|
||||
paddingBottom: 3,
|
||||
fontWeight: '600',
|
||||
alignSelf: 'flex-end',
|
||||
},
|
||||
memo: {
|
||||
color: '#9aa0aa',
|
||||
fontSize: 14,
|
||||
marginHorizontal: 4,
|
||||
paddingBottom: 6,
|
||||
fontWeight: '400',
|
||||
alignSelf: 'center',
|
||||
},
|
||||
paid: {
|
||||
flex: 3,
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
},
|
||||
paidMark: {
|
||||
marginTop: -100,
|
||||
marginBottom: 16,
|
||||
},
|
||||
detailsRoot: {
|
||||
justifyContent: 'flex-end',
|
||||
marginBottom: 24,
|
||||
|
|
|
@ -12,10 +12,10 @@ import {
|
|||
View,
|
||||
} from 'react-native';
|
||||
import LottieView from 'lottie-react-native';
|
||||
import QRCodeComponent from '../../components/QRCodeComponent';
|
||||
import { useNavigation, useRoute, useTheme, useFocusEffect } from '@react-navigation/native';
|
||||
import Share from 'react-native-share';
|
||||
|
||||
import QRCodeComponent from '../../components/QRCodeComponent';
|
||||
import {
|
||||
BlueLoading,
|
||||
BlueCopyTextToClipboard,
|
||||
|
@ -65,85 +65,31 @@ const ReceiveDetails = () => {
|
|||
const stylesHook = StyleSheet.create({
|
||||
modalContent: {
|
||||
backgroundColor: colors.modal,
|
||||
padding: 22,
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
borderTopLeftRadius: 16,
|
||||
borderTopRightRadius: 16,
|
||||
borderTopColor: colors.foregroundColor,
|
||||
borderWidth: colors.borderWidth,
|
||||
minHeight: 350,
|
||||
height: 350,
|
||||
},
|
||||
customAmount: {
|
||||
flexDirection: 'row',
|
||||
borderColor: colors.formBorder,
|
||||
borderBottomColor: colors.formBorder,
|
||||
borderWidth: 1.0,
|
||||
borderBottomWidth: 0.5,
|
||||
backgroundColor: colors.inputBackgroundColor,
|
||||
minHeight: 44,
|
||||
height: 44,
|
||||
marginHorizontal: 20,
|
||||
alignItems: 'center',
|
||||
marginVertical: 8,
|
||||
borderRadius: 4,
|
||||
},
|
||||
customAmountText: {
|
||||
flex: 1,
|
||||
marginHorizontal: 8,
|
||||
color: colors.foregroundColor,
|
||||
minHeight: 33,
|
||||
},
|
||||
root: {
|
||||
flexGrow: 1,
|
||||
backgroundColor: colors.elevated,
|
||||
justifyContent: 'space-between',
|
||||
},
|
||||
rootBackgroundColor: {
|
||||
backgroundColor: colors.elevated,
|
||||
},
|
||||
scrollBody: {
|
||||
marginTop: 32,
|
||||
flexGrow: 1,
|
||||
alignItems: 'center',
|
||||
paddingHorizontal: 16,
|
||||
},
|
||||
share: {
|
||||
justifyContent: 'flex-end',
|
||||
paddingVertical: 16,
|
||||
alignItems: 'center',
|
||||
marginBottom: 8,
|
||||
},
|
||||
link: {
|
||||
marginVertical: 16,
|
||||
paddingHorizontal: 32,
|
||||
},
|
||||
amount: {
|
||||
color: colors.foregroundColor,
|
||||
fontWeight: '600',
|
||||
fontSize: 36,
|
||||
textAlign: 'center',
|
||||
},
|
||||
label: {
|
||||
color: colors.foregroundColor,
|
||||
fontWeight: '600',
|
||||
textAlign: 'center',
|
||||
paddingBottom: 24,
|
||||
},
|
||||
loading: {
|
||||
alignItems: 'center',
|
||||
width: 300,
|
||||
height: 300,
|
||||
backgroundColor: colors.elevated,
|
||||
},
|
||||
modalButton: {
|
||||
backgroundColor: colors.modalButton,
|
||||
paddingVertical: 14,
|
||||
paddingHorizontal: 70,
|
||||
maxWidth: '80%',
|
||||
borderRadius: 50,
|
||||
fontWeight: '700',
|
||||
},
|
||||
});
|
||||
|
||||
|
@ -248,16 +194,16 @@ const ReceiveDetails = () => {
|
|||
const renderConfirmedBalance = () => {
|
||||
return (
|
||||
<ScrollView style={stylesHook.rootBackgroundColors} centerContent keyboardShouldPersistTaps="always">
|
||||
<View style={stylesHook.scrollBody}>
|
||||
<View style={styles.scrollBody}>
|
||||
{isCustom && (
|
||||
<>
|
||||
<BlueText style={stylesHook.label} numberOfLines={1}>
|
||||
<BlueText style={[styles.label, stylesHook.label]} numberOfLines={1}>
|
||||
{customLabel}
|
||||
</BlueText>
|
||||
</>
|
||||
)}
|
||||
<LottieView style={styles.icon} source={require('../../img/bluenice.json')} autoPlay loop={false} />
|
||||
<BlueText style={stylesHook.label} numberOfLines={1}>
|
||||
<BlueText style={[styles.label, stylesHook.label]} numberOfLines={1}>
|
||||
{displayBalance}
|
||||
</BlueText>
|
||||
</View>
|
||||
|
@ -268,20 +214,20 @@ const ReceiveDetails = () => {
|
|||
const renderPendingBalance = () => {
|
||||
return (
|
||||
<ScrollView contentContainerStyle={stylesHook.rootBackgroundColor} centerContent keyboardShouldPersistTaps="always">
|
||||
<View style={stylesHook.scrollBody}>
|
||||
<View style={styles.scrollBody}>
|
||||
{isCustom && (
|
||||
<>
|
||||
<BlueText style={stylesHook.label} numberOfLines={1}>
|
||||
<BlueText style={[styles.label, stylesHook.label]} numberOfLines={1}>
|
||||
{customLabel}
|
||||
</BlueText>
|
||||
</>
|
||||
)}
|
||||
<TransactionPendingIconBig />
|
||||
<BlueSpacing40 />
|
||||
<BlueText style={stylesHook.label} numberOfLines={1}>
|
||||
<BlueText style={[styles.label, stylesHook.label]} numberOfLines={1}>
|
||||
{displayBalance}
|
||||
</BlueText>
|
||||
<BlueText style={stylesHook.label} numberOfLines={1}>
|
||||
<BlueText style={[styles.label, stylesHook.label]} numberOfLines={1}>
|
||||
{eta}
|
||||
</BlueText>
|
||||
</View>
|
||||
|
@ -307,17 +253,17 @@ const ReceiveDetails = () => {
|
|||
|
||||
const renderReceiveDetails = () => {
|
||||
return (
|
||||
<ScrollView contentContainerStyle={stylesHook.root} keyboardShouldPersistTaps="always">
|
||||
<View style={stylesHook.scrollBody}>
|
||||
<ScrollView contentContainerStyle={[styles.root, stylesHook.root]} keyboardShouldPersistTaps="always">
|
||||
<View style={styles.scrollBody}>
|
||||
{isCustom && (
|
||||
<>
|
||||
{getDisplayAmount() && (
|
||||
<BlueText testID="CustomAmountText" style={stylesHook.amount} numberOfLines={1}>
|
||||
<BlueText testID="CustomAmountText" style={[styles.amount, stylesHook.amount]} numberOfLines={1}>
|
||||
{getDisplayAmount()}
|
||||
</BlueText>
|
||||
)}
|
||||
{customLabel?.length > 0 && (
|
||||
<BlueText testID="CustomAmountDescriptionText" style={stylesHook.label} numberOfLines={1}>
|
||||
<BlueText testID="CustomAmountDescriptionText" style={[styles.label, stylesHook.label]} numberOfLines={1}>
|
||||
{customLabel}
|
||||
</BlueText>
|
||||
)}
|
||||
|
@ -327,10 +273,10 @@ const ReceiveDetails = () => {
|
|||
<QRCodeComponent value={bip21encoded} />
|
||||
<BlueCopyTextToClipboard text={isCustom ? bip21encoded : address} />
|
||||
</View>
|
||||
<View style={stylesHook.share}>
|
||||
<View style={styles.share}>
|
||||
<BlueCard>
|
||||
<BlueButtonLink
|
||||
style={stylesHook.link}
|
||||
style={styles.link}
|
||||
testID="SetCustomAmountButton"
|
||||
title={loc.receive.details_setAmount}
|
||||
onPress={showCustomAmountModal}
|
||||
|
@ -459,16 +405,16 @@ const ReceiveDetails = () => {
|
|||
return (
|
||||
<BottomModal isVisible={isCustomModalVisible} onClose={dismissCustomAmountModal}>
|
||||
<KeyboardAvoidingView enabled={!Platform.isPad} behavior={Platform.OS === 'ios' ? 'position' : null}>
|
||||
<View style={stylesHook.modalContent}>
|
||||
<View style={[styles.modalContent, stylesHook.modalContent]}>
|
||||
<AmountInput unit={customUnit} amount={customAmount || ''} onChangeText={setCustomAmount} onAmountUnitChange={setCustomUnit} />
|
||||
<View style={stylesHook.customAmount}>
|
||||
<View style={[styles.customAmount, stylesHook.customAmount]}>
|
||||
<TextInput
|
||||
onChangeText={setCustomLabel}
|
||||
placeholderTextColor="#81868e"
|
||||
placeholder={loc.receive.details_label}
|
||||
value={customLabel || ''}
|
||||
numberOfLines={1}
|
||||
style={stylesHook.customAmountText}
|
||||
style={[styles.customAmountText, stylesHook.customAmountText]}
|
||||
testID="CustomAmountDescription"
|
||||
/>
|
||||
</View>
|
||||
|
@ -476,7 +422,7 @@ const ReceiveDetails = () => {
|
|||
<View>
|
||||
<BlueButton
|
||||
testID="CustomAmountSaveButton"
|
||||
style={stylesHook.modalButton}
|
||||
style={[styles.modalButton, stylesHook.modalButton]}
|
||||
title={loc.receive.details_create}
|
||||
onPress={createCustomAmountAddress}
|
||||
/>
|
||||
|
@ -513,7 +459,7 @@ const ReceiveDetails = () => {
|
|||
};
|
||||
|
||||
return (
|
||||
<View style={stylesHook.root}>
|
||||
<View style={[styles.root, stylesHook.root]}>
|
||||
<StatusBar barStyle="light-content" />
|
||||
{address !== undefined && showAddress && (
|
||||
<HandoffComponent
|
||||
|
@ -531,6 +477,68 @@ const ReceiveDetails = () => {
|
|||
};
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
modalContent: {
|
||||
padding: 22,
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
borderTopLeftRadius: 16,
|
||||
borderTopRightRadius: 16,
|
||||
minHeight: 350,
|
||||
height: 350,
|
||||
},
|
||||
customAmount: {
|
||||
flexDirection: 'row',
|
||||
borderWidth: 1.0,
|
||||
borderBottomWidth: 0.5,
|
||||
minHeight: 44,
|
||||
height: 44,
|
||||
marginHorizontal: 20,
|
||||
alignItems: 'center',
|
||||
marginVertical: 8,
|
||||
borderRadius: 4,
|
||||
},
|
||||
root: {
|
||||
flexGrow: 1,
|
||||
justifyContent: 'space-between',
|
||||
},
|
||||
scrollBody: {
|
||||
marginTop: 32,
|
||||
flexGrow: 1,
|
||||
alignItems: 'center',
|
||||
paddingHorizontal: 16,
|
||||
},
|
||||
share: {
|
||||
justifyContent: 'flex-end',
|
||||
paddingVertical: 16,
|
||||
alignItems: 'center',
|
||||
marginBottom: 8,
|
||||
},
|
||||
link: {
|
||||
marginVertical: 16,
|
||||
paddingHorizontal: 32,
|
||||
},
|
||||
amount: {
|
||||
fontWeight: '600',
|
||||
fontSize: 36,
|
||||
textAlign: 'center',
|
||||
},
|
||||
label: {
|
||||
fontWeight: '600',
|
||||
textAlign: 'center',
|
||||
paddingBottom: 24,
|
||||
},
|
||||
modalButton: {
|
||||
paddingVertical: 14,
|
||||
paddingHorizontal: 70,
|
||||
maxWidth: '80%',
|
||||
borderRadius: 50,
|
||||
fontWeight: '700',
|
||||
},
|
||||
customAmountText: {
|
||||
flex: 1,
|
||||
marginHorizontal: 8,
|
||||
minHeight: 33,
|
||||
},
|
||||
icon: {
|
||||
width: 400,
|
||||
height: 400,
|
||||
|
|
|
@ -40,12 +40,6 @@ const Broadcast = () => {
|
|||
const [broadcastResult, setBroadcastResult] = useState(BROADCAST_RESULT.none);
|
||||
|
||||
const stylesHooks = StyleSheet.create({
|
||||
blueArea: {
|
||||
backgroundColor: colors.background,
|
||||
},
|
||||
text: {
|
||||
color: colors.foregroundColor,
|
||||
},
|
||||
input: {
|
||||
borderColor: colors.formBorder,
|
||||
borderBottomColor: colors.formBorder,
|
||||
|
|
|
@ -218,10 +218,6 @@ const styles = StyleSheet.create({
|
|||
height: 0.5,
|
||||
marginVertical: 16,
|
||||
},
|
||||
card: {
|
||||
alignItems: 'center',
|
||||
flex: 1,
|
||||
},
|
||||
cardText: {
|
||||
fontWeight: '500',
|
||||
},
|
||||
|
|
|
@ -22,9 +22,6 @@ const IsItMyAddress = () => {
|
|||
const [resultCleanAddress, setResultCleanAddress] = useState();
|
||||
|
||||
const stylesHooks = StyleSheet.create({
|
||||
text: {
|
||||
color: colors.foregroundColor,
|
||||
},
|
||||
input: {
|
||||
borderColor: colors.formBorder,
|
||||
borderBottomColor: colors.formBorder,
|
||||
|
@ -152,14 +149,6 @@ const styles = StyleSheet.create({
|
|||
blueArea: {
|
||||
paddingTop: 19,
|
||||
},
|
||||
broadcastResultWrapper: {
|
||||
flex: 1,
|
||||
flexDirection: 'column',
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
height: '100%',
|
||||
width: '100%',
|
||||
},
|
||||
mainCard: {
|
||||
padding: 0,
|
||||
display: 'flex',
|
||||
|
@ -167,18 +156,6 @@ const styles = StyleSheet.create({
|
|||
alignItems: 'center',
|
||||
justifyContent: 'flex-start',
|
||||
},
|
||||
topFormRow: {
|
||||
flex: 0.1,
|
||||
flexBasis: 0.1,
|
||||
flexDirection: 'row',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'space-between',
|
||||
paddingBottom: 10,
|
||||
paddingTop: 0,
|
||||
paddingRight: 100,
|
||||
height: 30,
|
||||
maxHeight: 30,
|
||||
},
|
||||
input: {
|
||||
flexDirection: 'row',
|
||||
borderWidth: 1,
|
||||
|
|
|
@ -37,15 +37,9 @@ const PsbtMultisig = () => {
|
|||
textBtc: {
|
||||
color: colors.buttonAlternativeTextColor,
|
||||
},
|
||||
textDestinationFirstFour: {
|
||||
color: colors.buttonAlternativeTextColor,
|
||||
},
|
||||
textBtcUnitValue: {
|
||||
color: colors.buttonAlternativeTextColor,
|
||||
},
|
||||
textDestination: {
|
||||
color: colors.foregroundColor,
|
||||
},
|
||||
textFiat: {
|
||||
color: colors.alternativeTextColor,
|
||||
},
|
||||
|
@ -330,10 +324,6 @@ const styles = StyleSheet.create({
|
|||
flex: 90,
|
||||
marginLeft: '-11%',
|
||||
},
|
||||
scrollViewContent: {
|
||||
flexGrow: 1,
|
||||
justifyContent: 'space-between',
|
||||
},
|
||||
container: {
|
||||
flexDirection: 'column',
|
||||
paddingTop: 24,
|
||||
|
@ -399,8 +389,6 @@ const styles = StyleSheet.create({
|
|||
alignItems: 'center',
|
||||
},
|
||||
itemUnsignedWrapper: { flexDirection: 'row', paddingTop: 16 },
|
||||
textDestinationSpacingRight: { marginRight: 4 },
|
||||
textDestinationSpacingLeft: { marginLeft: 4 },
|
||||
vaultKeyTextSigned: { fontSize: 18, fontWeight: 'bold' },
|
||||
vaultKeyTextSignedWrapper: { justifyContent: 'center', alignItems: 'center', paddingLeft: 16 },
|
||||
flexDirectionRow: { flexDirection: 'row', paddingVertical: 12 },
|
||||
|
|
|
@ -125,10 +125,6 @@ const styles = StyleSheet.create({
|
|||
marginLeft: 20,
|
||||
marginRight: 20,
|
||||
},
|
||||
copyToClipboard: {
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
},
|
||||
exportButton: {
|
||||
height: 48,
|
||||
borderRadius: 8,
|
||||
|
|
|
@ -512,11 +512,6 @@ const styles = StyleSheet.create({
|
|||
marginBottom: -24,
|
||||
flexShrink: 1,
|
||||
},
|
||||
flexShrink: {
|
||||
flexShrink: 1,
|
||||
marginRight: 8,
|
||||
alignItems: 'flex-start',
|
||||
},
|
||||
inputWrap: {
|
||||
flex: 1,
|
||||
flexDirection: 'row',
|
||||
|
|
|
@ -35,9 +35,6 @@ const styles = StyleSheet.create({
|
|||
backgroundColor: 'transparent',
|
||||
flexDirection: I18nManager.isRTL ? 'row-reverse' : 'row',
|
||||
},
|
||||
torSupported: {
|
||||
color: '#81868e',
|
||||
},
|
||||
});
|
||||
|
||||
type LightingSettingsRouteProps = RouteProp<
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import React, { useState, useEffect, useContext } from 'react';
|
||||
import { View, StyleSheet } from 'react-native';
|
||||
import { View } from 'react-native';
|
||||
|
||||
import navigationStyle from '../../components/navigationStyle';
|
||||
import { BlueButton, BlueCard, BlueListItem, BlueLoading, BlueSpacing20, BlueText, SafeBlueArea } from '../../BlueComponents';
|
||||
|
@ -9,12 +9,6 @@ import alert from '../../components/Alert';
|
|||
|
||||
const torrific = require('../../blue_modules/torrific');
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
torSupported: {
|
||||
color: '#81868e',
|
||||
},
|
||||
});
|
||||
|
||||
/*
|
||||
TorSettings is not displayed in Settings menu if isTorCapable is false. No need to provide code protection.
|
||||
*/
|
||||
|
@ -77,7 +71,7 @@ const TorSettings = () => {
|
|||
|
||||
if (isLoading) {
|
||||
return (
|
||||
<View style={[styles.root]}>
|
||||
<View>
|
||||
<BlueLoading />
|
||||
</View>
|
||||
);
|
||||
|
|
|
@ -62,20 +62,6 @@ const styles = StyleSheet.create({
|
|||
fontWeight: '500',
|
||||
alignSelf: 'center',
|
||||
},
|
||||
doneWrap: {
|
||||
flex: 1,
|
||||
paddingTop: 19,
|
||||
},
|
||||
doneCard: {
|
||||
flexDirection: 'row',
|
||||
justifyContent: 'center',
|
||||
paddingTop: 76,
|
||||
paddingBottom: 16,
|
||||
},
|
||||
blueBigCheckmark: {
|
||||
marginTop: 43,
|
||||
marginBottom: 53,
|
||||
},
|
||||
});
|
||||
|
||||
export default class CPFP extends Component {
|
||||
|
|
|
@ -36,9 +36,6 @@ const TransactionsDetails = () => {
|
|||
const [memo, setMemo] = useState();
|
||||
const { colors } = useTheme();
|
||||
const stylesHooks = StyleSheet.create({
|
||||
txLink: {
|
||||
color: colors.alternativeTextColor2,
|
||||
},
|
||||
saveText: {
|
||||
color: colors.alternativeTextColor2,
|
||||
},
|
||||
|
@ -278,10 +275,6 @@ const styles = StyleSheet.create({
|
|||
fontSize: 16,
|
||||
fontWeight: '500',
|
||||
},
|
||||
txHash: {
|
||||
marginBottom: 8,
|
||||
color: 'grey',
|
||||
},
|
||||
Link: {
|
||||
fontWeight: '600',
|
||||
fontSize: 15,
|
||||
|
|
|
@ -2,27 +2,19 @@ import React, { useContext, useEffect, useRef, useState } from 'react';
|
|||
import { View, ActivityIndicator, Text, TouchableOpacity, StyleSheet, StatusBar, BackHandler } from 'react-native';
|
||||
import { Icon } from 'react-native-elements';
|
||||
import { useNavigation, useRoute, useTheme } from '@react-navigation/native';
|
||||
import ReactNativeHapticFeedback from 'react-native-haptic-feedback';
|
||||
|
||||
import {
|
||||
BlueButton,
|
||||
BlueCard,
|
||||
BlueLoading,
|
||||
BlueSpacing10,
|
||||
BlueSpacing20,
|
||||
BlueText,
|
||||
BlueTransactionIncomingIcon,
|
||||
BlueTransactionOutgoingIcon,
|
||||
BlueTransactionPendingIcon,
|
||||
SafeBlueArea,
|
||||
} from '../../BlueComponents';
|
||||
import { BlueButton, BlueCard, BlueLoading, BlueSpacing10, BlueSpacing20, BlueText, SafeBlueArea } from '../../BlueComponents';
|
||||
import TransactionIncomingIcon from '../components/icons/TransactionIncomingIcon';
|
||||
import TransactionOutgoingIcon from '../components/icons/TransactionOutgoingIcon';
|
||||
import TransactionPendingIcon from '../components/icons/TransactionPendingIcon';
|
||||
import navigationStyle from '../../components/navigationStyle';
|
||||
import HandoffComponent from '../../components/handoff';
|
||||
import { HDSegwitBech32Transaction } from '../../class';
|
||||
import { BitcoinUnit } from '../../models/bitcoinUnits';
|
||||
import HandoffComponent from '../../components/handoff';
|
||||
import loc, { formatBalanceWithoutSuffix } from '../../loc';
|
||||
import { BlueStorageContext } from '../../blue_modules/storage-context';
|
||||
import * as BlueElectrum from '../../blue_modules/BlueElectrum';
|
||||
import ReactNativeHapticFeedback from 'react-native-haptic-feedback';
|
||||
|
||||
const buttonStatus = Object.freeze({
|
||||
possible: 1,
|
||||
|
@ -391,19 +383,19 @@ const TransactionsStatus = () => {
|
|||
if (!tx.confirmations) {
|
||||
return (
|
||||
<View style={styles.icon}>
|
||||
<BlueTransactionPendingIcon />
|
||||
<TransactionPendingIcon />
|
||||
</View>
|
||||
);
|
||||
} else if (tx.value < 0) {
|
||||
return (
|
||||
<View style={styles.icon}>
|
||||
<BlueTransactionOutgoingIcon />
|
||||
<TransactionOutgoingIcon />
|
||||
</View>
|
||||
);
|
||||
} else {
|
||||
return (
|
||||
<View style={styles.icon}>
|
||||
<BlueTransactionIncomingIcon />
|
||||
<TransactionIncomingIcon />
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
@ -428,7 +420,7 @@ const TransactionsStatus = () => {
|
|||
</Text>
|
||||
</View>
|
||||
{eta ? (
|
||||
<View style={[styles.eta]}>
|
||||
<View style={styles.eta}>
|
||||
<BlueSpacing10 />
|
||||
<Text style={styles.confirmationsText}>{eta}</Text>
|
||||
</View>
|
||||
|
|
|
@ -401,10 +401,6 @@ const styles = StyleSheet.create({
|
|||
createButton: {
|
||||
flex: 1,
|
||||
},
|
||||
loading: {
|
||||
flex: 1,
|
||||
paddingTop: 20,
|
||||
},
|
||||
label: {
|
||||
flexDirection: 'row',
|
||||
borderWidth: 1,
|
||||
|
@ -455,9 +451,6 @@ const styles = StyleSheet.create({
|
|||
noPadding: {
|
||||
paddingHorizontal: 0,
|
||||
},
|
||||
typeMargin: {
|
||||
marginTop: 8,
|
||||
},
|
||||
});
|
||||
|
||||
export default WalletsAdd;
|
||||
|
|
|
@ -33,10 +33,6 @@ const WalletsAddMultisig = () => {
|
|||
textdesc: {
|
||||
color: colors.alternativeTextColor,
|
||||
},
|
||||
whiteBackground: { backgroundColor: colors.background },
|
||||
itemNameWrapper: { backgroundColor: colors.elevated },
|
||||
nativeName: { color: colors.foregroundColor },
|
||||
filteTextWrapper: { color: colors.foregroundColor, right: 0, position: 'absolute' },
|
||||
modalContentShort: {
|
||||
backgroundColor: colors.elevated,
|
||||
},
|
||||
|
@ -211,7 +207,7 @@ const WalletsAddMultisig = () => {
|
|||
</Text>
|
||||
</View>
|
||||
{isAdvancedModeEnabledRender && (
|
||||
<View style={styles.advancedOptionsContainer}>
|
||||
<View>
|
||||
<BlueListItem
|
||||
onPress={showAdvancedOptionsModal}
|
||||
title={loc.multisig.vault_advanced_customize}
|
||||
|
@ -229,13 +225,6 @@ const WalletsAddMultisig = () => {
|
|||
};
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
modalFlatList: { width: '100%' },
|
||||
itemNameWrapper: { flexDirection: 'row', paddingTop: 20, paddingBottom: 0 },
|
||||
textWrapper: { paddingLeft: 10, flex: 1, flexDirection: 'row' },
|
||||
nativeName: { fontSize: 16 },
|
||||
filteTextWrapper: { right: 0, position: 'absolute' },
|
||||
filterText: { fontSize: 16, color: 'gray' },
|
||||
advancedOptionsContainer: {},
|
||||
item: {
|
||||
paddingHorizontal: 0,
|
||||
},
|
||||
|
@ -253,30 +242,12 @@ const styles = StyleSheet.create({
|
|||
borderColor: 'rgba(0, 0, 0, 0.1)',
|
||||
minHeight: 350,
|
||||
},
|
||||
formatSelectorTextWrapper: {
|
||||
borderRadius: 6,
|
||||
paddingVertical: 12,
|
||||
paddingHorizontal: 8,
|
||||
borderColor: 0,
|
||||
},
|
||||
borderRadius6: {
|
||||
borderRadius: 6,
|
||||
},
|
||||
formatSelectorTextWrapperSelected: {
|
||||
backgroundColor: '#EEF0F4',
|
||||
borderRadius: 6,
|
||||
paddingVertical: 12,
|
||||
paddingHorizontal: 8,
|
||||
borderColor: 0,
|
||||
},
|
||||
buttonContainer: {
|
||||
padding: 24,
|
||||
},
|
||||
formatSelectorText: {
|
||||
color: '#13244D',
|
||||
fontSize: 16,
|
||||
fontWeight: '500',
|
||||
},
|
||||
column: {
|
||||
paddingRight: 20,
|
||||
paddingLeft: 20,
|
||||
|
|
|
@ -44,7 +44,7 @@ const WalletsAddMultisigHelp = () => {
|
|||
<View style={[styles.intro, stylesHook.intro]}>
|
||||
<Text style={[styles.introTitle, stylesHook.introTitle]}>{loc.multisig.ms_help_title}</Text>
|
||||
<Text style={[styles.introText, stylesHook.introText]}>{loc.multisig.ms_help_text}</Text>
|
||||
<Image style={[styles.introImage]} source={require('../../img/mshelp/mshelp-intro.png')} />
|
||||
<Image style={styles.introImage} source={require('../../img/mshelp/mshelp-intro.png')} />
|
||||
</View>
|
||||
<View style={[styles.tip, stylesHook.tip]}>
|
||||
<Text style={[styles.introTip, stylesHook.introTip]} />
|
||||
|
@ -54,22 +54,22 @@ const WalletsAddMultisigHelp = () => {
|
|||
<Text style={[styles.tipsText, stylesHook.tipsText]}>{loc.multisig.ms_help_1}</Text>
|
||||
</View>
|
||||
<View style={[styles.tips, stylesHook.tips]}>
|
||||
<Image style={[styles.imageTip]} source={require('../../img/mshelp/tip2.png')} />
|
||||
<Image style={styles.imageTip} source={require('../../img/mshelp/tip2.png')} />
|
||||
<Text style={[styles.tipsTitle, stylesHook.tipsTitle]}>{loc.multisig.ms_help_title2}</Text>
|
||||
<Text style={[styles.tipsText, stylesHook.tipsText]}>{loc.multisig.ms_help_2}</Text>
|
||||
</View>
|
||||
<View style={[styles.tips, stylesHook.tips]}>
|
||||
<Image style={[styles.imageTip]} source={require('../../img/mshelp/tip3.png')} />
|
||||
<Image style={styles.imageTip} source={require('../../img/mshelp/tip3.png')} />
|
||||
<Text style={[styles.tipsTitle, stylesHook.tipsTitle]}>{loc.multisig.ms_help_title3}</Text>
|
||||
<Text style={[styles.tipsText, stylesHook.tipsText]}>{loc.multisig.ms_help_3}</Text>
|
||||
</View>
|
||||
<View style={[styles.tips, stylesHook.tips]}>
|
||||
<Image style={[styles.imageTip]} source={require('../../img/mshelp/tip4.png')} />
|
||||
<Image style={styles.imageTip} source={require('../../img/mshelp/tip4.png')} />
|
||||
<Text style={[styles.tipsTitle, stylesHook.tipsTitle]}>{loc.multisig.ms_help_title4}</Text>
|
||||
<Text style={[styles.tipsText, stylesHook.tipsText]}>{loc.multisig.ms_help_4}</Text>
|
||||
</View>
|
||||
<View style={[styles.tips, stylesHook.tips]}>
|
||||
<Image style={[styles.imageTip]} source={require('../../img/mshelp/tip5.png')} />
|
||||
<Image style={styles.imageTip} source={require('../../img/mshelp/tip5.png')} />
|
||||
<Text style={[styles.tipsTitle, stylesHook.tipsTitle]}>{loc.multisig.ms_help_title5}</Text>
|
||||
<Text style={[styles.tipsText, stylesHook.tipsText]}>{loc.multisig.ms_help_5}</Text>
|
||||
</View>
|
||||
|
|
|
@ -75,60 +75,27 @@ const WalletsAddMultisigStep2 = () => {
|
|||
root: {
|
||||
backgroundColor: colors.elevated,
|
||||
},
|
||||
textBtc: {
|
||||
color: colors.buttonAlternativeTextColor,
|
||||
},
|
||||
textDestinationFirstFour: {
|
||||
color: colors.buttonAlternativeTextColor,
|
||||
},
|
||||
textBtcUnitValue: {
|
||||
color: colors.buttonAlternativeTextColor,
|
||||
},
|
||||
textDestination: {
|
||||
color: colors.foregroundColor,
|
||||
},
|
||||
modalContentShort: {
|
||||
backgroundColor: colors.modal,
|
||||
},
|
||||
modalContent: {
|
||||
backgroundColor: colors.modal,
|
||||
},
|
||||
textFiat: {
|
||||
color: colors.alternativeTextColor,
|
||||
},
|
||||
provideKeyButton: {
|
||||
backgroundColor: colors.buttonDisabledBackgroundColor,
|
||||
},
|
||||
exportButton: {
|
||||
backgroundColor: colors.buttonDisabledBackgroundColor,
|
||||
},
|
||||
provideKeyButtonText: {
|
||||
color: colors.buttonTextColor,
|
||||
},
|
||||
vaultKeyCircle: {
|
||||
backgroundColor: colors.buttonDisabledBackgroundColor,
|
||||
},
|
||||
vaultKeyText: {
|
||||
color: colors.alternativeTextColor,
|
||||
},
|
||||
feeFiatText: {
|
||||
color: colors.alternativeTextColor,
|
||||
},
|
||||
vaultKeyCircleSuccess: {
|
||||
backgroundColor: colors.msSuccessBG,
|
||||
},
|
||||
vaultKeyTextSigned: {
|
||||
color: colors.msSuccessBG,
|
||||
},
|
||||
word: {
|
||||
backgroundColor: colors.inputBackgroundColor,
|
||||
},
|
||||
wordText: {
|
||||
color: colors.labelText,
|
||||
},
|
||||
headerText: {
|
||||
color: colors.foregroundColor,
|
||||
},
|
||||
helpButton: {
|
||||
backgroundColor: colors.buttonDisabledBackgroundColor,
|
||||
},
|
||||
|
@ -637,7 +604,7 @@ const WalletsAddMultisigStep2 = () => {
|
|||
return (
|
||||
<View style={[styles.root, stylesHook.root]}>
|
||||
{renderHelp()}
|
||||
<View style={[styles.wrapBox]}>
|
||||
<View style={styles.wrapBox}>
|
||||
<FlatList data={data.current} renderItem={_renderKeyItem} keyExtractor={(_item, index) => `${index}`} />
|
||||
</View>
|
||||
{renderMnemonicsModal()}
|
||||
|
@ -655,11 +622,6 @@ const styles = StyleSheet.create({
|
|||
flex: 1,
|
||||
paddingHorizontal: 20,
|
||||
},
|
||||
mainBlock: {
|
||||
height: '100%',
|
||||
marginHorizontal: 20,
|
||||
marginVertical: 24,
|
||||
},
|
||||
wrapBox: {
|
||||
flex: 1,
|
||||
marginVertical: 24,
|
||||
|
@ -670,42 +632,9 @@ const styles = StyleSheet.create({
|
|||
marginBottom: 40,
|
||||
justifyContent: 'flex-end',
|
||||
},
|
||||
|
||||
itemKeyUnprovidedWrapper: { flexDirection: 'row' },
|
||||
vaultKeyCircle: {
|
||||
width: 42,
|
||||
height: 42,
|
||||
borderRadius: 25,
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
},
|
||||
vaultKeyText: { fontSize: 18, fontWeight: 'bold' },
|
||||
vaultKeyTextWrapper: { justifyContent: 'center', alignItems: 'center', paddingLeft: 16 },
|
||||
provideKeyButton: {
|
||||
marginTop: 4,
|
||||
marginLeft: 40,
|
||||
height: 48,
|
||||
borderRadius: 8,
|
||||
justifyContent: 'center',
|
||||
paddingHorizontal: 16,
|
||||
marginBottom: 8,
|
||||
},
|
||||
grayButton: {
|
||||
marginTop: 24,
|
||||
marginLeft: 40,
|
||||
height: 48,
|
||||
borderRadius: 8,
|
||||
justifyContent: 'center',
|
||||
paddingHorizontal: 16,
|
||||
marginBottom: 8,
|
||||
},
|
||||
buttonContainer: {
|
||||
flexDirection: 'row',
|
||||
marginVertical: 24,
|
||||
alignItems: 'center',
|
||||
justifyContent: 'flex-end',
|
||||
},
|
||||
provideKeyButtonText: { fontWeight: '600', fontSize: 15 },
|
||||
textDestination: { fontWeight: '600' },
|
||||
modalContent: {
|
||||
paddingHorizontal: 22,
|
||||
|
@ -750,8 +679,6 @@ const styles = StyleSheet.create({
|
|||
wordText: {
|
||||
fontWeight: 'bold',
|
||||
},
|
||||
vaultKeyTextSignedWrapper: { justifyContent: 'center', alignItems: 'center', paddingLeft: 16 },
|
||||
vaultKeyTextSigned: { fontSize: 18, fontWeight: 'bold' },
|
||||
exportButton: {
|
||||
height: 48,
|
||||
borderRadius: 8,
|
||||
|
@ -760,11 +687,8 @@ const styles = StyleSheet.create({
|
|||
paddingHorizontal: 16,
|
||||
},
|
||||
headerText: { fontSize: 15, color: '#13244D' },
|
||||
header2Text: { color: '#9AA0AA', fontSize: 14, paddingBottom: 20 },
|
||||
alignItemsCenter: { alignItems: 'center' },
|
||||
squareButtonWrapper: { height: 50, width: 250 },
|
||||
qrCodeContainer: { borderWidth: 6, borderRadius: 8, borderColor: '#FFFFFF' },
|
||||
|
||||
helpButtonWrapper: {
|
||||
alignItems: 'flex-end',
|
||||
flexDirection: I18nManager.isRTL ? 'row' : 'row-reverse',
|
||||
|
|
|
@ -48,9 +48,6 @@ import alert from '../../components/Alert';
|
|||
const prompt = require('../../blue_modules/prompt');
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
root: {
|
||||
flex: 1,
|
||||
},
|
||||
scrollViewContent: {
|
||||
flexGrow: 1,
|
||||
},
|
||||
|
|
|
@ -94,14 +94,6 @@ const styles = StyleSheet.create({
|
|||
root: {
|
||||
flex: 1,
|
||||
},
|
||||
|
||||
absolute: {
|
||||
position: 'absolute',
|
||||
top: 0,
|
||||
left: 0,
|
||||
bottom: 0,
|
||||
right: 0,
|
||||
},
|
||||
});
|
||||
|
||||
DrawerList.propTypes = {
|
||||
|
|
|
@ -939,13 +939,6 @@ const styles = StyleSheet.create({
|
|||
fontSize: 15,
|
||||
fontWeight: '600',
|
||||
},
|
||||
allOffersText: {
|
||||
fontSize: 12,
|
||||
color: '#9AA0AA',
|
||||
position: 'absolute',
|
||||
top: 0,
|
||||
left: 15,
|
||||
},
|
||||
locationText: {
|
||||
top: 0,
|
||||
left: 5,
|
||||
|
|
|
@ -408,7 +408,6 @@ const styles = StyleSheet.create({
|
|||
fontWeight: 'bold',
|
||||
color: BlueCurrentTheme.colors.feeText,
|
||||
},
|
||||
loading: { backgroundColor: BlueCurrentTheme.colors.elevated },
|
||||
emptyComponentText: { textAlign: 'center', color: '#9AA0AA', paddingHorizontal: 16, backgroundColor: BlueCurrentTheme.colors.elevated },
|
||||
itemSeparatorComponent: { height: 0.5, width: '100%', backgroundColor: '#C8C8C8' },
|
||||
flexDirectionRow: { flexDirection: 'row' },
|
||||
|
|
|
@ -157,9 +157,6 @@ const styles = StyleSheet.create({
|
|||
flatListContainer: {
|
||||
marginHorizontal: 16,
|
||||
},
|
||||
listContainer: {
|
||||
minHeight: 100,
|
||||
},
|
||||
center: {
|
||||
marginHorizontal: 16,
|
||||
alignItems: 'center',
|
||||
|
|
|
@ -26,12 +26,6 @@ const LdkViewLogs = () => {
|
|||
root: {
|
||||
backgroundColor: colors.elevated,
|
||||
},
|
||||
text: {
|
||||
borderColor: colors.formBorder,
|
||||
borderBottomColor: colors.formBorder,
|
||||
backgroundColor: colors.inputBackgroundColor,
|
||||
color: colors.foregroundColor,
|
||||
},
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
|
@ -141,31 +135,6 @@ const styles = StyleSheet.create({
|
|||
root: {
|
||||
flex: 1,
|
||||
},
|
||||
text: {
|
||||
paddingHorizontal: 8,
|
||||
paddingVertical: 8,
|
||||
marginTop: 5,
|
||||
marginHorizontal: 20,
|
||||
borderWidth: 1,
|
||||
borderBottomWidth: 0.5,
|
||||
borderRadius: 4,
|
||||
textAlignVertical: 'top',
|
||||
},
|
||||
textMessage: {
|
||||
minHeight: 50,
|
||||
},
|
||||
flex: {
|
||||
flex: 1,
|
||||
},
|
||||
loading: {
|
||||
position: 'absolute',
|
||||
top: 0,
|
||||
left: 0,
|
||||
right: 0,
|
||||
bottom: 0,
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
},
|
||||
button: {
|
||||
alignItems: 'center',
|
||||
padding: 10,
|
||||
|
|
|
@ -61,16 +61,6 @@ const WalletsList = () => {
|
|||
listHeaderText: {
|
||||
color: colors.foregroundColor,
|
||||
},
|
||||
ltRoot: {
|
||||
backgroundColor: colors.ballOutgoingExpired,
|
||||
},
|
||||
|
||||
ltTextBig: {
|
||||
color: colors.foregroundColor,
|
||||
},
|
||||
ltTextSmall: {
|
||||
color: colors.alternativeTextColor,
|
||||
},
|
||||
});
|
||||
|
||||
useFocusEffect(
|
||||
|
@ -410,28 +400,9 @@ const styles = StyleSheet.create({
|
|||
bottom: 60,
|
||||
right: 0,
|
||||
},
|
||||
wrapper: {
|
||||
flex: 1,
|
||||
},
|
||||
walletsListWrapper: {
|
||||
flex: 1,
|
||||
},
|
||||
headerStyle: {
|
||||
...Platform.select({
|
||||
ios: {
|
||||
marginTop: 44,
|
||||
height: 32,
|
||||
alignItems: 'flex-end',
|
||||
justifyContent: 'center',
|
||||
},
|
||||
android: {
|
||||
marginTop: 8,
|
||||
height: 44,
|
||||
alignItems: 'flex-end',
|
||||
justifyContent: 'center',
|
||||
},
|
||||
}),
|
||||
},
|
||||
headerTouch: {
|
||||
height: 48,
|
||||
paddingVertical: 10,
|
||||
|
@ -447,28 +418,6 @@ const styles = StyleSheet.create({
|
|||
fontSize: 24,
|
||||
marginVertical: 16,
|
||||
},
|
||||
ltRoot: {
|
||||
flexDirection: 'row',
|
||||
justifyContent: 'space-between',
|
||||
alignItems: 'center',
|
||||
marginHorizontal: 16,
|
||||
marginVertical: 16,
|
||||
padding: 16,
|
||||
borderRadius: 6,
|
||||
},
|
||||
ltTextWrap: {
|
||||
flexDirection: 'column',
|
||||
},
|
||||
ltTextBig: {
|
||||
fontSize: 16,
|
||||
fontWeight: '600',
|
||||
writingDirection: I18nManager.isRTL ? 'rtl' : 'ltr',
|
||||
},
|
||||
ltTextSmall: {
|
||||
fontSize: 13,
|
||||
fontWeight: '500',
|
||||
writingDirection: I18nManager.isRTL ? 'rtl' : 'ltr',
|
||||
},
|
||||
footerRoot: {
|
||||
top: 80,
|
||||
height: 160,
|
||||
|
@ -485,9 +434,6 @@ const styles = StyleSheet.create({
|
|||
textAlign: 'center',
|
||||
fontWeight: '600',
|
||||
},
|
||||
listHeader: {
|
||||
backgroundColor: '#FFFFFF',
|
||||
},
|
||||
transaction: {
|
||||
marginHorizontal: 0,
|
||||
},
|
||||
|
|
|
@ -220,9 +220,6 @@ const Entropy = () => {
|
|||
entropyText: {
|
||||
color: colors.foregroundColor,
|
||||
},
|
||||
coinBody: {
|
||||
borderColor: colors.lightButton,
|
||||
},
|
||||
});
|
||||
|
||||
const push = v => v && dispatch({ type: 'push', value: v.value, bits: v.bits });
|
||||
|
|
|
@ -13,10 +13,6 @@ import { BlueStorageContext } from '../../blue_modules/storage-context';
|
|||
import { GestureHandlerRootView } from 'react-native-gesture-handler';
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
loading: {
|
||||
flex: 1,
|
||||
paddingTop: 20,
|
||||
},
|
||||
root: {
|
||||
flex: 1,
|
||||
},
|
||||
|
@ -82,9 +78,6 @@ const ReorderWallets = () => {
|
|||
root: {
|
||||
backgroundColor: colors.elevated,
|
||||
},
|
||||
loading: {
|
||||
backgroundColor: colors.elevated,
|
||||
},
|
||||
tip: {
|
||||
backgroundColor: colors.ballOutgoingExpired,
|
||||
},
|
||||
|
|
|
@ -61,9 +61,6 @@ const WalletTransactions = () => {
|
|||
const walletActionButtonsRef = useRef();
|
||||
|
||||
const stylesHook = StyleSheet.create({
|
||||
advancedTransactionOptionsModalContent: {
|
||||
backgroundColor: colors.elevated,
|
||||
},
|
||||
listHeaderText: {
|
||||
color: colors.foregroundColor,
|
||||
},
|
||||
|
@ -271,7 +268,7 @@ const WalletTransactions = () => {
|
|||
<LNNodeBar canSend={lnNodeInfo.canSend} canReceive={lnNodeInfo.canReceive} itemPriceUnit={itemPriceUnit} />
|
||||
</View>
|
||||
)}
|
||||
<View style={[styles.listHeaderTextRow, stylesHook.listHeaderTextRow]}>
|
||||
<View style={styles.listHeaderTextRow}>
|
||||
<Text style={[styles.listHeaderText, stylesHook.listHeaderText]}>{loc.transactions.list_title}</Text>
|
||||
<TouchableOpacity
|
||||
accessibilityRole="button"
|
||||
|
@ -724,24 +721,6 @@ const styles = StyleSheet.create({
|
|||
marginBottom18: {
|
||||
marginBottom: 18,
|
||||
},
|
||||
modalContent: {
|
||||
backgroundColor: '#FFFFFF',
|
||||
padding: 22,
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
borderTopLeftRadius: 16,
|
||||
borderTopRightRadius: 16,
|
||||
borderColor: 'rgba(0, 0, 0, 0.1)',
|
||||
minHeight: 200,
|
||||
height: 200,
|
||||
},
|
||||
advancedTransactionOptionsModalContent: {
|
||||
padding: 22,
|
||||
borderTopLeftRadius: 16,
|
||||
borderTopRightRadius: 16,
|
||||
borderColor: 'rgba(0, 0, 0, 0.1)',
|
||||
minHeight: 130,
|
||||
},
|
||||
walletDetails: {
|
||||
justifyContent: 'center',
|
||||
alignItems: 'flex-end',
|
||||
|
|
|
@ -72,57 +72,21 @@ const ViewEditMultisigCosigners = () => {
|
|||
root: {
|
||||
backgroundColor: colors.elevated,
|
||||
},
|
||||
textBtc: {
|
||||
color: colors.buttonAlternativeTextColor,
|
||||
},
|
||||
textDestinationFirstFour: {
|
||||
color: colors.buttonAlternativeTextColor,
|
||||
},
|
||||
textBtcUnitValue: {
|
||||
color: colors.buttonAlternativeTextColor,
|
||||
},
|
||||
textDestination: {
|
||||
color: colors.foregroundColor,
|
||||
},
|
||||
modalContentShort: {
|
||||
backgroundColor: colors.elevated,
|
||||
},
|
||||
modalContent: {
|
||||
backgroundColor: colors.elevated,
|
||||
},
|
||||
textFiat: {
|
||||
color: colors.alternativeTextColor,
|
||||
},
|
||||
provideKeyButton: {
|
||||
backgroundColor: colors.buttonDisabledBackgroundColor,
|
||||
},
|
||||
exportButton: {
|
||||
backgroundColor: colors.buttonDisabledBackgroundColor,
|
||||
},
|
||||
provideKeyButtonText: {
|
||||
color: colors.buttonTextColor,
|
||||
},
|
||||
vaultKeyCircle: {
|
||||
backgroundColor: colors.buttonDisabledBackgroundColor,
|
||||
},
|
||||
vaultKeyText: {
|
||||
color: colors.alternativeTextColor,
|
||||
},
|
||||
feeFiatText: {
|
||||
color: colors.alternativeTextColor,
|
||||
},
|
||||
vaultKeyCircleSuccess: {
|
||||
backgroundColor: colors.msSuccessBG,
|
||||
},
|
||||
vaultKeyTextSigned: {
|
||||
color: colors.msSuccessBG,
|
||||
},
|
||||
word: {
|
||||
backgroundColor: colors.inputBackgroundColor,
|
||||
},
|
||||
wordText: {
|
||||
color: colors.labelText,
|
||||
},
|
||||
tipKeys: {
|
||||
color: colors.alternativeTextColor,
|
||||
},
|
||||
|
@ -609,37 +573,9 @@ const styles = StyleSheet.create({
|
|||
justifyContent: 'space-between',
|
||||
},
|
||||
itemKeyUnprovidedWrapper: { flexDirection: 'row', paddingTop: 16 },
|
||||
vaultKeyCircle: {
|
||||
width: 42,
|
||||
height: 42,
|
||||
borderRadius: 25,
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
},
|
||||
textDestination: { fontWeight: '600' },
|
||||
vaultKeyText: { fontSize: 18, fontWeight: 'bold' },
|
||||
vaultKeyTextWrapper: { justifyContent: 'center', alignItems: 'center', paddingLeft: 16 },
|
||||
provideKeyButton: {
|
||||
marginTop: 4,
|
||||
marginLeft: 40,
|
||||
height: 48,
|
||||
borderRadius: 8,
|
||||
flex: 1,
|
||||
justifyContent: 'center',
|
||||
paddingHorizontal: 16,
|
||||
marginBottom: 8,
|
||||
},
|
||||
|
||||
grayButton: {
|
||||
marginTop: 24,
|
||||
marginLeft: 40,
|
||||
height: 48,
|
||||
borderRadius: 8,
|
||||
justifyContent: 'center',
|
||||
paddingHorizontal: 16,
|
||||
marginBottom: 8,
|
||||
},
|
||||
provideKeyButtonText: { fontWeight: '600', fontSize: 15 },
|
||||
newKeyModalContent: {
|
||||
paddingHorizontal: 22,
|
||||
paddingVertical: 32,
|
||||
|
@ -657,25 +593,6 @@ const styles = StyleSheet.create({
|
|||
backgroundColor: 'white',
|
||||
minHeight: 400,
|
||||
},
|
||||
word: {
|
||||
width: 'auto',
|
||||
marginRight: 8,
|
||||
marginBottom: 8,
|
||||
paddingTop: 6,
|
||||
paddingBottom: 6,
|
||||
paddingLeft: 8,
|
||||
paddingRight: 8,
|
||||
borderRadius: 4,
|
||||
},
|
||||
secretContainer: {
|
||||
flexDirection: 'row',
|
||||
justifyContent: 'flex-start',
|
||||
flexWrap: 'wrap',
|
||||
},
|
||||
wordText: {
|
||||
fontWeight: 'bold',
|
||||
},
|
||||
flexDirectionRow: { flexDirection: 'row', paddingVertical: 12 },
|
||||
vaultKeyCircleSuccess: {
|
||||
width: 42,
|
||||
height: 42,
|
||||
|
@ -683,8 +600,6 @@ const styles = StyleSheet.create({
|
|||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
},
|
||||
vaultKeyTextSignedWrapper: { justifyContent: 'center', alignItems: 'center', paddingLeft: 16 },
|
||||
vaultKeyTextSigned: { fontSize: 18, fontWeight: 'bold' },
|
||||
exportButton: {
|
||||
height: 48,
|
||||
borderRadius: 8,
|
||||
|
@ -694,7 +609,6 @@ const styles = StyleSheet.create({
|
|||
},
|
||||
headerText: { fontSize: 15, color: '#13244D' },
|
||||
mainBlock: { marginHorizontal: 16 },
|
||||
header2Text: { color: '#9AA0AA', fontSize: 14, paddingBottom: 20 },
|
||||
alignItemsCenter: { alignItems: 'center' },
|
||||
squareButtonWrapper: { height: 50, width: 250 },
|
||||
tipKeys: {
|
||||
|
|
|
@ -3,7 +3,7 @@ import React from 'react';
|
|||
import TestRenderer from 'react-test-renderer';
|
||||
import Settings from '../../screen/settings/settings';
|
||||
import Selftest from '../../screen/selftest';
|
||||
import { BlueHeader } from '../../BlueComponents';
|
||||
import { BlueHeaderDefaultSub } from '../../BlueComponents';
|
||||
import * as BlueElectrum from '../../blue_modules/BlueElectrum';
|
||||
|
||||
jest.mock('react-native-qrcode-svg', () => 'Video');
|
||||
|
@ -21,8 +21,8 @@ afterAll(() => {
|
|||
BlueElectrum.forceDisconnect();
|
||||
});
|
||||
|
||||
it('BlueHeader works', () => {
|
||||
const rendered = TestRenderer.create(<BlueHeader />).toJSON();
|
||||
it('BlueHeaderDefaultSub works', () => {
|
||||
const rendered = TestRenderer.create(<BlueHeaderDefaultSub />).toJSON();
|
||||
expect(rendered).toBeTruthy();
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue