diff --git a/ui/app/AppLayouts/Profile/views/CommunitiesView.qml b/ui/app/AppLayouts/Profile/views/CommunitiesView.qml index 5b188947f2..1f3b074104 100644 --- a/ui/app/AppLayouts/Profile/views/CommunitiesView.qml +++ b/ui/app/AppLayouts/Profile/views/CommunitiesView.qml @@ -241,7 +241,7 @@ SettingsContentBase { assetsModel: chatStore.assetsModel collectiblesModel: chatStore.collectiblesModel - onJoined: chatStore.requestToJoinCommunityWithAuthentication(communityIntroDialog.communityId, root.rootStore.userProfileInst.name, JSON.stringify(sharedAddresses), airdropAddress) + onJoined: chatStore.requestToJoinCommunityWithAuthentication(communityIntroDialog.communityId, root.rootStore.userProfileInst.name, sharedAddresses, airdropAddress) onCancelMembershipRequest: root.rootStore.cancelPendingRequest(communityIntroDialog.communityId) onSharedAddressesUpdated: { diff --git a/ui/app/AppLayouts/stores/RootStore.qml b/ui/app/AppLayouts/stores/RootStore.qml index 8beb5f781b..be5163bb7c 100644 --- a/ui/app/AppLayouts/stores/RootStore.qml +++ b/ui/app/AppLayouts/stores/RootStore.qml @@ -234,7 +234,13 @@ QtObject { } function requestToJoinCommunityWithAuthentication(communityId, ensName, addressesToShare = [], airdropAddress = "") { - communitiesModuleInst.requestToJoinCommunityWithAuthenticationWithSharedAddresses(communityId, ensName, JSON.stringify(addressesToShare), airdropAddress) + communitiesModuleInst.requestToJoinCommunityWithAuthenticationWithSharedAddresses( + communityId, ensName, JSON.stringify(addressesToShare), airdropAddress) + } + + function editSharedAddressesWithAuthentication(communityId, addressesToShare = [], airdropAddress = "") { + communitiesModuleInst.editSharedAddressesWithAuthentication( + communityId, JSON.stringify(addressesToShare), airdropAddress) } function updatePermissionsModel(communityId, sharedAddresses) { diff --git a/ui/app/mainui/Popups.qml b/ui/app/mainui/Popups.qml index d895f22859..a1b38a2643 100644 --- a/ui/app/mainui/Popups.qml +++ b/ui/app/mainui/Popups.qml @@ -530,7 +530,7 @@ QtObject { } assetsModel: root.rootStore.assetsModel collectiblesModel: root.rootStore.collectiblesModel - onJoined: root.rootStore.requestToJoinCommunityWithAuthentication(communityIntroDialog.communityId, communityIntroDialog.name, JSON.stringify(sharedAddresses), airdropAddress) + onJoined: root.rootStore.requestToJoinCommunityWithAuthentication(communityIntroDialog.communityId, communityIntroDialog.name, sharedAddresses, airdropAddress) onCancelMembershipRequest: root.rootStore.cancelPendingRequest(communityIntroDialog.communityId) Connections { target: root.communitiesStore.communitiesModuleInst @@ -720,8 +720,10 @@ QtObject { assetsModel: chatStore.assetsModel collectiblesModel: chatStore.collectiblesModel - onSaveSelectedAddressesClicked: console.warn("!!! FIXME implement saving the shared & airdrop addresses for the community", - JSON.stringify(sharedAddresses), airdropAddress) + onSharedAddressesChanged: root.rootStore.updatePermissionsModel( + editSharedAddressesPopup.communityId, sharedAddresses) + onSaveSelectedAddressesClicked: root.rootStore.editSharedAddressesWithAuthentication( + editSharedAddressesPopup.communityId, sharedAddresses, airdropAddress) onClosed: destroy() } }