mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2024-11-19 01:40:12 +01:00
FIX: Lint
This commit is contained in:
parent
dcb940b0c7
commit
cb9c0044fe
14
App.tsx
14
App.tsx
@ -10,25 +10,13 @@ import { BlueDarkTheme, BlueDefaultTheme } from './components/themes';
|
||||
import MasterView from './navigation/MasterView';
|
||||
import { navigationRef } from './NavigationService';
|
||||
import { StorageProvider } from './components/Context/StorageProvider';
|
||||
import { TrueSheet } from '@lodev09/react-native-true-sheet';
|
||||
|
||||
const App = () => {
|
||||
const colorScheme = useColorScheme();
|
||||
|
||||
const onReady = () => {
|
||||
// @ts-ignore: fix later
|
||||
navigationRef.current?.addListener('beforeRemove', async (e: any) => {
|
||||
if (e.data.action.type === 'NAVIGATE') {
|
||||
e.preventDefault();
|
||||
await TrueSheet.dismiss('BottomModal');
|
||||
navigationRef.current?.dispatch(e.data.action);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
<LargeScreenProvider>
|
||||
<NavigationContainer ref={navigationRef} theme={colorScheme === 'dark' ? BlueDarkTheme : BlueDefaultTheme} onReady={onReady}>
|
||||
<NavigationContainer ref={navigationRef} theme={colorScheme === 'dark' ? BlueDarkTheme : BlueDefaultTheme}>
|
||||
<SafeAreaProvider>
|
||||
<StorageProvider>
|
||||
<SettingsProvider>
|
||||
|
@ -5,10 +5,8 @@ import {
|
||||
ActivityIndicator,
|
||||
FlatList,
|
||||
Keyboard,
|
||||
KeyboardAvoidingView,
|
||||
LayoutAnimation,
|
||||
PixelRatio,
|
||||
Platform,
|
||||
StyleSheet,
|
||||
Text,
|
||||
TextInput,
|
||||
@ -132,7 +130,7 @@ const OutputModal = ({ item: { address, txid, value, vout, confirmations = 0 },
|
||||
const amount = formatBalance(value, balanceUnit, true);
|
||||
|
||||
const oStyles = StyleSheet.create({
|
||||
container: { paddingHorizontal: 0, borderBottomColor: colors.lightBorder, backgroundColor: colors.elevated },
|
||||
container: { paddingHorizontal: 0, borderBottomColor: colors.lightBorder, backgroundColor: 'transparent' },
|
||||
avatar: { borderColor: 'white', borderWidth: 1, backgroundColor: color },
|
||||
amount: { fontWeight: 'bold', color: colors.foregroundColor },
|
||||
tranContainer: { paddingLeft: 20 },
|
||||
@ -197,6 +195,7 @@ const mStyles = StyleSheet.create({
|
||||
},
|
||||
});
|
||||
|
||||
const transparentBackground = { backgroundColor: 'transparent' };
|
||||
const OutputModalContent = ({ output, wallet, onUseCoin, frozen, setFrozen }) => {
|
||||
const { colors } = useTheme();
|
||||
const { txMetadata, saveToDisk } = useStorage();
|
||||
@ -234,7 +233,12 @@ const OutputModalContent = ({ output, wallet, onUseCoin, frozen, setFrozen }) =>
|
||||
]}
|
||||
onChangeText={onMemoChange}
|
||||
/>
|
||||
<ListItem title={loc.cc.freezeLabel} Component={TouchableWithoutFeedback} switch={switchValue} />
|
||||
<ListItem
|
||||
title={loc.cc.freezeLabel}
|
||||
containerStyle={transparentBackground}
|
||||
Component={TouchableWithoutFeedback}
|
||||
switch={switchValue}
|
||||
/>
|
||||
<BlueSpacing20 />
|
||||
<View style={mStyles.buttonContainer}>
|
||||
<Button testID="UseCoin" title={loc.cc.use_coin} onPress={() => onUseCoin([output])} />
|
||||
@ -417,12 +421,11 @@ const CoinControl = () => {
|
||||
Keyboard.dismiss();
|
||||
setOutput(false);
|
||||
}}
|
||||
backgroundColor={colors.elevated}
|
||||
contentContainerStyle={styles.modalContent}
|
||||
>
|
||||
<KeyboardAvoidingView enabled={!Platform.isPad} behavior={Platform.OS === 'ios' ? 'position' : null}>
|
||||
<View style={[styles.modalContent, { backgroundColor: colors.elevated }]}>{output && renderOutputModalContent()}</View>
|
||||
</KeyboardAvoidingView>
|
||||
{output && renderOutputModalContent()}
|
||||
</BottomModal>
|
||||
|
||||
<FlatList
|
||||
ListHeaderComponent={tipCoins}
|
||||
data={utxo}
|
||||
@ -463,10 +466,6 @@ const styles = StyleSheet.create({
|
||||
},
|
||||
modalContent: {
|
||||
padding: 22,
|
||||
justifyContent: 'center',
|
||||
borderTopLeftRadius: 16,
|
||||
borderTopRightRadius: 16,
|
||||
borderColor: 'rgba(0, 0, 0, 0.1)',
|
||||
},
|
||||
empty: {
|
||||
flex: 1,
|
||||
|
Loading…
Reference in New Issue
Block a user