Skip to content

Commit d3b1300

Browse files
committed
feat: remove the getIdentity prop from the profileSaga
1 parent 87fdafa commit d3b1300

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/modules/profile/sagas.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { Avatar } from '@dcl/schemas/dist/platform/profile'
44
import { EntityType } from '@dcl/schemas/dist/platform/entity'
55
import { PeerAPI } from '../../lib/peer'
66
import { EntitiesOperator } from '../../lib/entities'
7+
import { getIdentityOrRedirect } from '../identity/sagas'
78
import {
89
ConnectWalletSuccessAction,
910
CONNECT_WALLET_SUCCESS,
@@ -31,13 +32,11 @@ import { Profile } from './types'
3132
export const NO_IDENTITY_FOUND_ERROR_MESSAGE = 'No identity found'
3233

3334
type CreateProfileSagaOptions = {
34-
getIdentity: () => AuthIdentity | undefined
3535
peerUrl: string
3636
peerWithNoGbCollectorUrl?: string
3737
}
3838

3939
export function createProfileSaga({
40-
getIdentity,
4140
peerUrl,
4241
peerWithNoGbCollectorUrl
4342
}: CreateProfileSagaOptions) {
@@ -139,7 +138,7 @@ export function createProfileSaga({
139138
const profileMetadata: Profile = {
140139
avatars: [newAvatar, ...profileWithContentHashes.avatars.slice(1)]
141140
}
142-
const identity = getIdentity()
141+
const identity: AuthIdentity | null = yield call(getIdentityOrRedirect)
143142

144143
if (identity) {
145144
yield call(

0 commit comments

Comments
 (0)