Identify purchases user in session reducer

This commit is contained in:
Eric Bailey
2024-10-28 14:26:45 -05:00
parent 5ac8c3d653
commit 009e238c30
3 changed files with 15 additions and 0 deletions
+2
View File
@@ -1,5 +1,6 @@
import {AtpSessionEvent} from '@atproto/api'
import {identifyUser as identifyPurchasesUser} from '#/state/purchases/identifyUser'
import {createPublicAgent} from './agent'
import {wrapSessionReducerForLogging} from './logging'
import {SessionAccount} from './types'
@@ -118,6 +119,7 @@ let reducer = (state: State, action: Action): State => {
}
case 'switched-to-account': {
const {newAccount, newAgent} = action
identifyPurchasesUser(newAccount)
return {
accounts: [
newAccount,