Update selected item color in Pass menu
[ProtonMail-WebClient.git] / packages / pass / store / sagas / vaults / vault-transfer-owner.saga.ts
blobefc524747b7774a31fb242bb761cbf4269cc4166
1 import { put, takeEvery } from 'redux-saga/effects';
3 import { vaultTransferOwner } from '@proton/pass/lib/vaults/vault.requests';
4 import {
5     vaultTransferOwnerIntent,
6     vaultTransferOwnershipFailure,
7     vaultTransferOwnershipSuccess,
8 } from '@proton/pass/store/actions';
10 function* resendInviteWorker({ payload, meta: { request } }: ReturnType<typeof vaultTransferOwnerIntent>) {
11     try {
12         yield vaultTransferOwner(payload);
13         yield put(vaultTransferOwnershipSuccess(request.id, payload.shareId, payload.userShareId));
14     } catch (err) {
15         yield put(vaultTransferOwnershipFailure(request.id, err));
16     }
19 export default function* watcher() {
20     yield takeEvery(vaultTransferOwnerIntent.match, resendInviteWorker);