diff --git a/client/react-native/common/components/Screens/Contacts/Detail/Detail.js b/client/react-native/common/components/Screens/Contacts/Detail/Detail.js index d22686352f..82733f38df 100644 --- a/client/react-native/common/components/Screens/Contacts/Detail/Detail.js +++ b/client/react-native/common/components/Screens/Contacts/Detail/Detail.js @@ -110,7 +110,7 @@ export default class Detail extends PureComponent { icon='share' title='Share this contact' onPress={() => shareLinkOther({ - contactId: extractPublicKeyFromId(contact.id), + id: extractPublicKeyFromId(contact.id), displayName: contact.displayName, })} /> diff --git a/client/react-native/common/helpers/contacts.js b/client/react-native/common/helpers/contacts.js index 7dad464db5..c05e66238c 100644 --- a/client/react-native/common/helpers/contacts.js +++ b/client/react-native/common/helpers/contacts.js @@ -29,10 +29,10 @@ export const extractPublicKeyFromId = contactId => { } } -export const makeShareableUrl = ({ contactId, displayName }) => `https://berty.tech/add-contact#public-key=${encodeURIComponent(contactId)}&display-name=${encodeURIComponent(displayName)}` +export const makeShareableUrl = ({ id, displayName }) => `https://berty.tech/add-contact#public-key=${encodeURIComponent(id)}&display-name=${encodeURIComponent(displayName)}` -export const shareLinkSelf = ({ contactId, displayName }) => { - const url = makeShareableUrl({ contactId, displayName }) +export const shareLinkSelf = ({ id, displayName }) => { + const url = makeShareableUrl({ id, displayName }) Share.share({ title: 'Add me on Berty', @@ -41,8 +41,8 @@ export const shareLinkSelf = ({ contactId, displayName }) => { }).catch(() => null) } -export const shareLinkOther = ({ contactId, displayName }) => { - const url = makeShareableUrl({ contactId, displayName }) +export const shareLinkOther = ({ id, displayName }) => { + const url = makeShareableUrl({ id, displayName }) Share.share({ title: `Add ${displayName} on Berty`,