Skip to content

Commit

Permalink
fix: Use correct actions
Browse files Browse the repository at this point in the history
  • Loading branch information
LautaroPetaccio committed Jun 3, 2024
1 parent 6c774c3 commit e241c6d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions webapp/src/modules/identity/sagas.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { call } from 'redux-saga/effects'
import { expectSaga } from 'redux-saga-test-plan'
import { AuthIdentity } from '@dcl/crypto'
import { localStorageClearIdentity, localStorageGetIdentity } from '@dcl/single-sign-on-client'
import { connectWalletSuccess, disconnectWallet } from 'decentraland-dapps/dist/modules/wallet/actions'
import { connectWalletSuccess, disconnectWalletSuccess } from 'decentraland-dapps/dist/modules/wallet/actions'
import { Wallet } from 'decentraland-dapps/dist/modules/wallet/types'
import { generateIdentitySuccess } from './actions'
import { identitySaga, setAuxAddress } from './sagas'
Expand Down Expand Up @@ -76,7 +76,7 @@ describe('when handling the disconnect', () => {
})

it('should call the sso client to clear the identity in the local storage', async () => {
await expectSaga(identitySaga).dispatch(disconnectWallet()).run({ silenceTimeout: true })
await expectSaga(identitySaga).dispatch(disconnectWalletSuccess()).run({ silenceTimeout: true })

expect(localStorageClearIdentity).toHaveBeenCalledWith(address)
})
Expand All @@ -88,7 +88,7 @@ describe('when handling the disconnect', () => {
})

it('should not call the sso client to clear the identity', async () => {
await expectSaga(identitySaga).dispatch(disconnectWallet()).run({ silenceTimeout: true })
await expectSaga(identitySaga).dispatch(disconnectWalletSuccess()).run({ silenceTimeout: true })

expect(localStorageClearIdentity).not.toHaveBeenCalled()
})
Expand Down
4 changes: 2 additions & 2 deletions webapp/src/modules/wallet/sagas.spec.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { expectSaga } from 'redux-saga-test-plan'
import { changeAccount, disconnectWallet } from 'decentraland-dapps/dist/modules/wallet/actions'
import { changeAccount, disconnectWalletSuccess } from 'decentraland-dapps/dist/modules/wallet/actions'
import { Wallet } from 'decentraland-dapps/dist/modules/wallet/types'
import { walletSaga } from './sagas'

describe.each([
['change account', changeAccount({} as Wallet)],
['disconnect wallet', disconnectWallet()]
['disconnect wallet', disconnectWalletSuccess()]
])('when handling the %s action', (_, action) => {
beforeEach(() => {
Object.defineProperty(window, 'location', {
Expand Down

0 comments on commit e241c6d

Please sign in to comment.