[Session] Base (#3541)
* Add readLastActiveAccount to use accounts[] as source of truth * Add public service constant, use
This commit is contained in:
@@ -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)
|
||||
}
|
||||
Reference in New Issue
Block a user