Replace updateCurrentAccount() with refreshSession() (#3910)
Replace updateCurrentAccount() with resumeSession()
This commit is contained in:
@@ -36,15 +36,6 @@ export type Action =
|
||||
newAgent: OpaqueBskyAgent
|
||||
newAccount: SessionAccount
|
||||
}
|
||||
| {
|
||||
type: 'updated-current-account'
|
||||
updatedFields: Partial<
|
||||
Pick<
|
||||
SessionAccount,
|
||||
'handle' | 'email' | 'emailConfirmed' | 'emailAuthFactor'
|
||||
>
|
||||
>
|
||||
}
|
||||
| {
|
||||
type: 'removed-account'
|
||||
accountDid: string
|
||||
@@ -134,23 +125,6 @@ export function reducer(state: State, action: Action): State {
|
||||
needsPersist: true,
|
||||
}
|
||||
}
|
||||
case 'updated-current-account': {
|
||||
const {updatedFields} = action
|
||||
return {
|
||||
accounts: state.accounts.map(a => {
|
||||
if (a.did === state.currentAgentState.did) {
|
||||
return {
|
||||
...a,
|
||||
...updatedFields,
|
||||
}
|
||||
} else {
|
||||
return a
|
||||
}
|
||||
}),
|
||||
currentAgentState: state.currentAgentState,
|
||||
needsPersist: true,
|
||||
}
|
||||
}
|
||||
case 'removed-account': {
|
||||
const {accountDid} = action
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user