DEL: Remove tooltip as its not needed on multisig create screen.

This commit is contained in:
marcosrdz 2021-05-15 02:53:27 -04:00
parent 5b6782b126
commit 00ca48a147
2 changed files with 8 additions and 53 deletions

View file

@ -287,7 +287,7 @@ PODS:
- React
- react-native-tor (0.1.7):
- React
- react-native-webview (11.4.0):
- react-native-webview (11.4.2):
- React-Core
- react-native-widget-center (0.0.4):
- React
@ -356,7 +356,7 @@ PODS:
- React
- RemobileReactNativeQrcodeLocalImage (1.0.4):
- React
- RNCAsyncStorage (1.15.2):
- RNCAsyncStorage (1.15.3):
- React-Core
- RNCClipboard (1.7.0):
- React-Core
@ -422,7 +422,7 @@ PODS:
- RNSentry (2.5.0-beta.1):
- React-Core
- Sentry (= 7.0.0)
- RNShare (5.2.2):
- RNShare (6.0.0):
- React-Core
- RNSVG (12.1.1):
- React
@ -745,7 +745,7 @@ SPEC CHECKSUMS:
react-native-safe-area-context: e471852c5ed67eea4b10c5d9d43c1cebae3b231d
react-native-tcp-socket: 96a4f104cdcc9c6621aafe92937f163d88447c5b
react-native-tor: 4f389f5719dad633542b57ea32744e954730e7ef
react-native-webview: fdd3c7c2ad173e8ca8c82729ed05f3fda2491a82
react-native-webview: 90ccc4add19f940dfe6c89d30659aed8134f234d
react-native-widget-center: 0f81d17beb163e7fb5848b06754d7d277fe7d99a
React-RCTActionSheet: 89a0ca9f4a06c1f93c26067af074ccdce0f40336
React-RCTAnimation: 1bde3ecc0c104c55df246eda516e0deb03c4e49b
@ -759,7 +759,7 @@ SPEC CHECKSUMS:
ReactCommon: 73d79c7039f473b76db6ff7c6b159c478acbbb3b
RealmJS: 5195064e9aeccf94ae3756bd9d0f2301b9074b07
RemobileReactNativeQrcodeLocalImage: 57aadc12896b148fb5e04bc7c6805f3565f5c3fa
RNCAsyncStorage: 502fbf425b9ee2d73ca6fa4b299dce0be411b422
RNCAsyncStorage: 68fabb4cccd2a736e5a5c9b91ca469125274cde9
RNCClipboard: dac13db8b1ce9b998f1cbc7ca33440113602847f
RNCMaskedView: f5c7d14d6847b7b44853f7acb6284c1da30a3459
RNCPushNotificationIOS: 5b1cf9ad2aaa107ecb92d5d2d7005ba521b2b97a
@ -778,7 +778,7 @@ SPEC CHECKSUMS:
RNScreens: f7ad633b2e0190b77b6a7aab7f914fad6f198d8d
RNSecureKeyStore: f1ad870e53806453039f650720d2845c678d89c8
RNSentry: 1868bcfe8c69b2c3b2451439a38b3ebea0a7510f
RNShare: 5cfe16bfd42cd2c4869a7692462181ac8cc15a6d
RNShare: 31fa0cedbd06c2744a78e0d2b7ba364778aa3506
RNSVG: 551acb6562324b1d52a4e0758f7ca0ec234e278f
RNVectorIcons: bc69e6a278b14842063605de32bec61f0b251a59
RNWatch: e4c5d19506c94506860032fb68aedd5991beb985

View file

@ -20,9 +20,6 @@ import { Icon } from 'react-native-elements';
import { useNavigation, useRoute, useTheme } from '@react-navigation/native';
import { getSystemName } from 'react-native-device-info';
import QRCode from 'react-native-qrcode-svg';
import Clipboard from '@react-native-clipboard/clipboard';
import showPopupMenu from 'react-native-popup-menu-android';
import ToolTip from 'react-native-tooltip';
import ReactNativeHapticFeedback from 'react-native-haptic-feedback';
import {
@ -67,7 +64,6 @@ const WalletsAddMultisigStep2 = () => {
const [cosignerXpubFilename, setCosignerXpubFilename] = useState('bw-cosigner.json');
const [vaultKeyData, setVaultKeyData] = useState({ keyIndex: 1, xpub: '', seed: '', isLoading: false }); // string rendered in modal
const [importText, setImportText] = useState('');
const tooltip = useRef();
const openScannerButton = useRef();
const data = useRef(new Array(n));
const hasUnsavedChanges = Boolean(cosigners.length > 0 && cosigners.length !== n);
@ -518,32 +514,6 @@ const WalletsAddMultisigStep2 = () => {
);
};
const toolTipMenuOptions = () => {
return Platform.select({
// NOT WORKING ATM.
// ios: [
// { text: this.state.wallet.hideBalance ? loc.transactions.details_balance_show : loc.transactions.details_balance_hide, onPress: this.handleBalanceVisibility },
// { text: loc.transactions.details_copy, onPress: this.handleCopyPress },
// ],
android: {
id: 'copyXpub',
label: loc.transactions.details_copy,
},
});
};
const showAndroidTooltip = () => {
showPopupMenu(toolTipMenuOptions, handleToolTipSelection, vaultKeyData.xpub);
};
const handleToolTipSelection = () => {
handleCopyPress();
};
const handleCopyPress = () => {
Clipboard.setString(vaultKeyData.xpub);
};
const renderSecret = entries => {
const component = [];
const entriesObject = entries.entries();
@ -558,24 +528,9 @@ const WalletsAddMultisigStep2 = () => {
);
} else {
component.push(
<TouchableOpacity
style={[styles.word, stylesHook.word]}
key={`${secret}${index}`}
onLongPress={() => (Platform.OS === 'ios' ? tooltip.current.showMenu() : showAndroidTooltip())}
>
{Platform.OS === 'ios' && (
<ToolTip
ref={tooltip}
actions={[
{
text: loc.transactions.details_copy,
onPress: () => handleCopyPress,
},
]}
/>
)}
<View style={[styles.word, stylesHook.word]} key={`${secret}${index}`}>
<Text style={[styles.wordText, stylesHook.wordText]}>{secret}</Text>
</TouchableOpacity>,
</View>,
);
}
}