Skip to content

Commit

Permalink
resetting memory credentials after disconnect
Browse files Browse the repository at this point in the history
  • Loading branch information
nnecla committed May 22, 2024
1 parent db1def4 commit 23804d8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/shared/modules/connections/connectionsDuck.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ export function getConnectionData(
return { ...data, username: memoryUsername, password: memoryPassword }
}

return data
return { ...data, username: data.username ? data.username : memoryUsername }
}

const removeConnectionHelper = (
Expand Down Expand Up @@ -652,9 +652,10 @@ export const disconnectEpic = (action$: any, store: any) => {
.merge(action$.ofType(USER_CLEAR))
.do(() => bolt.closeConnection())
.do(() => store.dispatch(resetUseDb()))
.do((action: any) =>
.do((action: any) => {
memoryPassword = ''
store.dispatch(updateConnection({ id: action.id, password: '' }))
)
})
.map(() => setActiveConnection(null))
}
export const silentDisconnectEpic = (action$: any, store: any) => {
Expand Down

0 comments on commit 23804d8

Please sign in to comment.