2021-09-25 05:36:08 +02:00
|
|
|
import React, { useContext } from 'react';
|
|
|
|
import Handoff from 'react-native-handoff';
|
|
|
|
import { BlueStorageContext } from '../blue_modules/storage-context';
|
|
|
|
import PropTypes from 'prop-types';
|
|
|
|
|
|
|
|
const HandoffComponent = props => {
|
|
|
|
const { isHandOffUseEnabled } = useContext(BlueStorageContext);
|
2021-01-19 04:40:11 +01:00
|
|
|
|
2021-09-25 05:36:08 +02:00
|
|
|
return isHandOffUseEnabled ? <Handoff {...props} /> : null;
|
|
|
|
};
|
2021-01-19 04:40:11 +01:00
|
|
|
export default HandoffComponent;
|
2021-09-25 05:36:08 +02:00
|
|
|
|
|
|
|
HandoffComponent.propTypes = {
|
|
|
|
url: PropTypes.string,
|
|
|
|
};
|
|
|
|
|
|
|
|
HandoffComponent.activityTypes = {
|
|
|
|
ReceiveOnchain: 'io.bluewallet.bluewallet.receiveonchain',
|
|
|
|
Xpub: 'io.bluewallet.bluewallet.xpub',
|
|
|
|
ViewInBlockExplorer: 'io.bluewallet.bluewallet.blockexplorer',
|
|
|
|
};
|