feat@(desktop/wallet): Launch SednModal when an address or ens name is detected in a 1-1 chat and validate it when launched

closes #16293
This commit is contained in:
Khushboo Mehta 2024-09-17 19:41:04 +02:00 committed by Khushboo-dev-cpp
parent 5771a33eaa
commit b3e336987c
3 changed files with 11 additions and 4 deletions

View File

@ -1353,7 +1353,7 @@ Item {
currencyStore: appMain.currencyStore currencyStore: appMain.currencyStore
emojiPopup: statusEmojiPopup.item emojiPopup: statusEmojiPopup.item
stickersPopup: statusStickersPopupLoader.item stickersPopup: statusStickersPopupLoader.item
sendViaPersonalChatEnabled: featureFlagsStore.sendViaPersonalChatEnabled sendViaPersonalChatEnabled: featureFlagsStore.sendViaPersonalChatEnabled && appMain.networkConnectionStore.sendBuyBridgeEnabled
onProfileButtonClicked: { onProfileButtonClicked: {
Global.changeAppSectionBySectionType(Constants.appSection.profile); Global.changeAppSectionBySectionType(Constants.appSection.profile);

View File

@ -67,7 +67,15 @@ Loader {
} }
case Helpers.RecipientAddressObjectType.Address: { case Helpers.RecipientAddressObjectType.Address: {
root.addressText = root.selectedRecipient root.addressText = root.selectedRecipient
root.item.input.text = root.addressText
// Resolve before using
if (Utils.isValidEns(root.selectedRecipient)) {
d.isPending = true
d.resolveENS(root.selectedRecipient)
}
else {
root.item.input.text = root.addressText
}
break break
} }
} }

View File

@ -733,8 +733,7 @@ Loader {
onLinkActivated: { onLinkActivated: {
if (link.startsWith(Constants.sendViaChatPrefix)) { if (link.startsWith(Constants.sendViaChatPrefix)) {
const addressOrEns = link.replace(Constants.sendViaChatPrefix, ""); const addressOrEns = link.replace(Constants.sendViaChatPrefix, "");
// TODO:: will be removed in the PRs to follow Global.openSendModal(addressOrEns)
Global.displayToastMessage(qsTr("TODO:: Send Via 1-1"), addressOrEns, "", false, 0, "")
return return
} }
if (link.startsWith('//')) { if (link.startsWith('//')) {