about summary refs log tree commit diff
path: root/src/state/session/util/readLastActiveAccount.ts
blob: e0768b8a83202566a19353d4a4f15d3e319714e9 (plain) (blame)
1
2
3
4
5
6
import * as persisted from '#/state/persisted'

export function readLastActiveAccount() {
  const {currentAccount, accounts} = persisted.get('session')
  return accounts.find(a => a.did === currentAccount?.did)
}