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
emojiPopup: statusEmojiPopup.item
stickersPopup: statusStickersPopupLoader.item
sendViaPersonalChatEnabled: featureFlagsStore.sendViaPersonalChatEnabled
sendViaPersonalChatEnabled: featureFlagsStore.sendViaPersonalChatEnabled && appMain.networkConnectionStore.sendBuyBridgeEnabled
onProfileButtonClicked: {
Global.changeAppSectionBySectionType(Constants.appSection.profile);

View File

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

View File

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