[Session] Base (#3541)
* Add readLastActiveAccount to use accounts[] as source of truth * Add public service constant, use
This commit is contained in:
parent
5b82b15007
commit
6aded4f257
5 changed files with 14 additions and 5 deletions
6
src/state/session/util/readLastActiveAccount.ts
Normal file
6
src/state/session/util/readLastActiveAccount.ts
Normal file
|
@ -0,0 +1,6 @@
|
|||
import * as persisted from '#/state/persisted'
|
||||
|
||||
export function readLastActiveAccount() {
|
||||
const {currentAccount, accounts} = persisted.get('session')
|
||||
return accounts.find(a => a.did === currentAccount?.did)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue