From 6899d78ea0cd632b1961b4e675b20fbdf928613f Mon Sep 17 00:00:00 2001 From: marcosrdz Date: Mon, 7 Dec 2020 13:24:24 -0500 Subject: [PATCH] Update isItMyAddress.js --- screen/send/isItMyAddress.js | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/screen/send/isItMyAddress.js b/screen/send/isItMyAddress.js index 3555955f9..3be7a092c 100644 --- a/screen/send/isItMyAddress.js +++ b/screen/send/isItMyAddress.js @@ -14,17 +14,27 @@ import { } from '../../BlueComponents'; import { BlueCurrentTheme } from '../../components/themes'; import { BlueStorageContext } from '../../blue_modules/storage-context'; -import { useNavigation, useRoute } from '@react-navigation/native'; +import { useNavigation, useRoute, useTheme } from '@react-navigation/native'; const IsItMyAddress = () => { /** @type {AbstractWallet[]} */ const wallets = useContext(BlueStorageContext).wallets; - const navigation = useNavigation(); - const route = useRoute(); + const { navigate } = useNavigation(); + const { name } = useRoute(); + const { colors } = useTheme(); const [address, setAddress] = useState(''); const [result, setResult] = useState(''); + const stylesHooks = StyleSheet.create({ + blueArea: { + backgroundColor: colors.background, + }, + text: { + color: colors.foregroundColor, + }, + }); + const handleUpdateAddress = nextValue => setAddress(nextValue.trim()); const checkAddress = async () => { @@ -44,18 +54,18 @@ const IsItMyAddress = () => { }; const importScan = async () => { - navigation.navigate('ScanQRCodeRoot', { + navigate('ScanQRCodeRoot', { screen: 'ScanQRCode', params: { - launchedBy: route.name, - onBarScanned: onBarScanned, + launchedBy: name, + onBarScanned, showFileImportButton: true, }, }); }; return ( - + @@ -63,7 +73,7 @@ const IsItMyAddress = () => { {loc.is_it_my_address.enter_address}