feat: hook edit shared addresses to backend (#11951)

Fixes #11822
This commit is contained in:
Jonathan Rainville 2023-08-21 16:03:08 -04:00 committed by GitHub
parent 8332a685c4
commit 7274e6156e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 5 deletions

View File

@ -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: {

View File

@ -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) {

View File

@ -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()
}
}