FIX: errors with route.params

This commit is contained in:
Ivan Vershigora 2020-05-28 12:53:14 +03:00
parent 1676c79185
commit abbea74db4
3 changed files with 5 additions and 7 deletions

View File

@ -87,8 +87,8 @@ export default class PsbtWithHardwareWallet extends Component {
}
static getDerivedStateFromProps(nextProps, prevState) {
const deepLinkPSBT = nextProps.props.route.params.deepLinkPSBT;
const txhex = nextProps.props.route.params.txhex;
const deepLinkPSBT = nextProps.route.params.deepLinkPSBT;
const txhex = nextProps.route.params.txhex;
if (deepLinkPSBT) {
try {
let Tx = prevState.fromWallet.combinePsbt(

View File

@ -20,8 +20,9 @@ const { width } = Dimensions.get('window');
const WalletsImport = () => {
const [isToolbarVisibleForAndroid, setIsToolbarVisibleForAndroid] = useState(false);
const { label } = useRoute().params;
const [importText, setImportText] = useState(label || '');
const route = useRoute();
const label = (route.params && route.params.label) || '';
const [importText, setImportText] = useState(label);
const navigation = useNavigation();
useEffect(() => {

View File

@ -46,9 +46,6 @@ const LocalQRCode = require('@remobile/react-native-qrcode-local-image');
export default class WalletTransactions extends Component {
static navigationOptions = ({ navigation, route }) => {
// route.params.isLoading
console.log('route.params.isLoading123321', route.params.isLoading);
// return {}
return {
headerRight: () => (
<TouchableOpacity