fix(communities): keycard authentication marked automatically as authenticated
Closes #14174
This commit is contained in:
parent
3e76fa6179
commit
9b8401b641
|
@ -16,6 +16,9 @@ method load*(self: AccessInterface) {.base.} =
|
|||
method isLoaded*(self: AccessInterface): bool {.base.} =
|
||||
raise newException(ValueError, "No implementation available")
|
||||
|
||||
method cleanJoinEditCommunityData*(self: AccessInterface) {.base.} =
|
||||
raise newException(ValueError, "No implementation available")
|
||||
|
||||
method onActivated*(self: AccessInterface) {.base.} =
|
||||
raise newException(ValueError, "No implementation available")
|
||||
|
||||
|
|
|
@ -140,7 +140,7 @@ method delete*(self: Module) =
|
|||
self.controller.delete
|
||||
self.communityTokensModule.delete
|
||||
|
||||
proc clean(self: Module) =
|
||||
method cleanJoinEditCommunityData*(self: Module) =
|
||||
self.joiningCommunityDetails.clear()
|
||||
|
||||
method load*(self: Module) =
|
||||
|
@ -351,20 +351,20 @@ method communityMuted*(self: Module, communityId: string, muted: bool) =
|
|||
self.view.model().setMuted(communityId, muted)
|
||||
|
||||
method communityAccessRequested*(self: Module, communityId: string) =
|
||||
self.clean()
|
||||
self.cleanJoinEditCommunityData()
|
||||
self.view.communityAccessRequested(communityId)
|
||||
|
||||
method communityAccessFailed*(self: Module, communityId, err: string) =
|
||||
error "communities: ", err
|
||||
self.clean()
|
||||
self.cleanJoinEditCommunityData()
|
||||
self.view.communityAccessFailed(communityId, err)
|
||||
|
||||
method communityEditSharedAddressesSucceeded*(self: Module, communityId: string) =
|
||||
self.clean()
|
||||
self.cleanJoinEditCommunityData()
|
||||
self.view.communityEditSharedAddressesSucceeded(communityId)
|
||||
|
||||
method communityEditSharedAddressesFailed*(self: Module, communityId, error: string) =
|
||||
self.clean()
|
||||
self.cleanJoinEditCommunityData()
|
||||
self.view.communityEditSharedAddressesFailed(communityId, error)
|
||||
|
||||
method communityHistoryArchivesDownloadStarted*(self: Module, communityId: string) =
|
||||
|
@ -723,7 +723,6 @@ proc anyProfileKeyPairAddressSelectedToBeRevealed(self: Module): bool =
|
|||
method onUserAuthenticated*(self: Module, pin: string, password: string, keyUid: string) =
|
||||
if password == "" and pin == "":
|
||||
info "unsuccesful authentication"
|
||||
self.clean()
|
||||
return
|
||||
|
||||
self.joiningCommunityDetails.profilePassword = password
|
||||
|
|
|
@ -124,6 +124,9 @@ QtObject:
|
|||
proc load*(self: View) =
|
||||
self.delegate.viewDidLoad()
|
||||
|
||||
proc cleanJoinEditCommunityData*(self: View) {.slot.} =
|
||||
self.delegate.cleanJoinEditCommunityData()
|
||||
|
||||
proc communityAdded*(self: View, communityId: string) {.signal.}
|
||||
proc communityChanged*(self: View, communityId: string) {.signal.}
|
||||
proc discordOldestMessageTimestampChanged*(self: View) {.signal.}
|
||||
|
|
|
@ -135,7 +135,8 @@ Dialog {
|
|||
}
|
||||
|
||||
onClosed: {
|
||||
if (root.destroyOnClose)
|
||||
if (root.destroyOnClose) {
|
||||
root.destroy();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -328,7 +328,7 @@ StackLayout {
|
|||
}
|
||||
|
||||
onClosed: {
|
||||
destroy()
|
||||
root.rootStore.cleanJoinEditCommunityData()
|
||||
}
|
||||
|
||||
Connections {
|
||||
|
|
|
@ -415,6 +415,10 @@ QtObject {
|
|||
communitiesModuleInst.joinCommunityOrEditSharedAddresses()
|
||||
}
|
||||
|
||||
function cleanJoinEditCommunityData() {
|
||||
communitiesModuleInst.cleanJoinEditCommunityData()
|
||||
}
|
||||
|
||||
function getLatestBlockNumber(chainId) {
|
||||
return walletSection.getChainIdForSend(chainId)
|
||||
}
|
||||
|
|
|
@ -586,7 +586,7 @@ Item {
|
|||
}
|
||||
|
||||
onClosed: {
|
||||
destroy()
|
||||
root.store.cleanJoinEditCommunityData()
|
||||
}
|
||||
|
||||
Connections {
|
||||
|
|
|
@ -277,7 +277,9 @@ SettingsContentBase {
|
|||
root.rootStore.updatePermissionsModel(dialogRoot.communityId, sharedAddresses)
|
||||
}
|
||||
|
||||
onClosed: destroy()
|
||||
onClosed: {
|
||||
chatStore.cleanJoinEditCommunityData()
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: chatStore.communitiesModuleInst
|
||||
|
|
|
@ -253,6 +253,10 @@ QtObject {
|
|||
communitiesModuleInst.joinCommunityOrEditSharedAddresses()
|
||||
}
|
||||
|
||||
function cleanJoinEditCommunityData() {
|
||||
communitiesModuleInst.cleanJoinEditCommunityData()
|
||||
}
|
||||
|
||||
function updatePermissionsModel(communityId, sharedAddresses) {
|
||||
communitiesModuleInst.checkPermissions(communityId, JSON.stringify(sharedAddresses))
|
||||
}
|
||||
|
|
|
@ -735,11 +735,17 @@ QtObject {
|
|||
dialogRoot.close();
|
||||
}
|
||||
}
|
||||
|
||||
onSharedAddressesUpdated: {
|
||||
root.rootStore.updatePermissionsModel(dialogRoot.communityId, sharedAddresses)
|
||||
}
|
||||
|
||||
onAboutToShow: { root.rootStore.communityKeyToImport = dialogRoot.communityId; }
|
||||
onClosed: { root.rootStore.communityKeyToImport = ""; destroy(); }
|
||||
|
||||
onClosed: {
|
||||
root.rootStore.communityKeyToImport = "";
|
||||
root.rootStore.cleanJoinEditCommunityData()
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: root.rootStore.communitiesModuleInst
|
||||
|
@ -963,7 +969,9 @@ QtObject {
|
|||
root.rootStore.joinCommunityOrEditSharedAddresses()
|
||||
}
|
||||
|
||||
onClosed: destroy()
|
||||
onClosed: {
|
||||
root.rootStore.cleanJoinEditCommunityData()
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: root.rootStore.communitiesModuleInst
|
||||
|
|
|
@ -18,6 +18,7 @@ import SortFilterProxyModel 0.2
|
|||
StatusStackModal {
|
||||
id: root
|
||||
|
||||
destroyOnClose: true
|
||||
property bool isEditMode: false
|
||||
|
||||
required property string communityName
|
||||
|
|
Loading…
Reference in New Issue