From b22bed8ab6a7a7a5ba17bfe7eb6e14d3f3951672 Mon Sep 17 00:00:00 2001 From: juan Date: Mon, 17 Apr 2023 20:33:42 +0200 Subject: [PATCH] wallet opts --- .../tabs/contacts/screens/ContactsAdd.tsx | 4 +- .../wallet/screens/WalletDetails.tsx | 56 ++++++++++--------- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/src/navigation/tabs/contacts/screens/ContactsAdd.tsx b/src/navigation/tabs/contacts/screens/ContactsAdd.tsx index 4805c9f95..695269ccb 100644 --- a/src/navigation/tabs/contacts/screens/ContactsAdd.tsx +++ b/src/navigation/tabs/contacts/screens/ContactsAdd.tsx @@ -640,9 +640,7 @@ const ContactsAdd = ({ setDomainValue(_domain); setValidDomain(true); } - } catch (err) { - console.error(err); - } + } catch (e) {} }; useEffect(() => { diff --git a/src/navigation/wallet/screens/WalletDetails.tsx b/src/navigation/wallet/screens/WalletDetails.tsx index 304cef31b..6c8b52b72 100644 --- a/src/navigation/wallet/screens/WalletDetails.tsx +++ b/src/navigation/wallet/screens/WalletDetails.tsx @@ -359,30 +359,34 @@ const WalletDetails: React.FC = ({route}) => { const ShareAddress = async () => { try { await sleep(1000); - const address = (await dispatch( - createWalletAddress({wallet: fullWalletObj, newAddress: false}), - )) as string; - - Share.share( - { - message: address, - title: t('Share Address'), - }, - { - dialogTitle: t('Share Address'), - subject: t('Share Address'), - excludedActivityTypes: [ - 'print', - 'addToReadingList', - 'markupAsPDF', - 'openInIbooks', - 'postToFacebook', - 'postToTwitter', - 'saveToCameraRoll', - 'sharePlay', - ], - }, - ); + if (showShareAddressIcon) { + setShowShareAddressModal(true); + } else { + const address = (await dispatch( + createWalletAddress({wallet: fullWalletObj, newAddress: false}), + )) as string; + + Share.share( + { + message: address, + title: t('Share Address'), + }, + { + dialogTitle: t('Share Address'), + subject: t('Share Address'), + excludedActivityTypes: [ + 'print', + 'addToReadingList', + 'markupAsPDF', + 'openInIbooks', + 'postToFacebook', + 'postToTwitter', + 'saveToCameraRoll', + 'sharePlay', + ], + }, + ); + } } catch (e) {} }; @@ -506,9 +510,7 @@ const WalletDetails: React.FC = ({route}) => { if (domainName) { setDomain({domainName, domainType: 'ENSDomain'}); } - } catch (err) { - console.error(err); - } + } catch (e) {} }, 300), [], );