BlueWallet/components/handoff.js

22 lines
661 B
JavaScript
Raw Normal View History

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
return isHandOffUseEnabled ? <Handoff {...props} /> : null;
};
2021-01-19 04:40:11 +01:00
export default HandoffComponent;
HandoffComponent.propTypes = {
url: PropTypes.string,
};
HandoffComponent.activityTypes = {
ReceiveOnchain: 'io.bluewallet.bluewallet.receiveonchain',
Xpub: 'io.bluewallet.bluewallet.xpub',
ViewInBlockExplorer: 'io.bluewallet.bluewallet.blockexplorer',
};