Skip to content

Commit

Permalink
feat: reset mixpanels properties when the WI has been revoked from io…
Browse files Browse the repository at this point in the history
…-web
  • Loading branch information
ale-mazz committed Oct 22, 2024
1 parent c738b10 commit d95acda
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import { walletRemoveCardsByType } from "../../../newWallet/store/actions/cards"
import { isIos } from "../../../../utils/platform";
import { StoredCredential } from "../../common/utils/itwTypesUtils";
import { itwIntegrityKeyTagSelector } from "../../issuance/store/selectors";
import { updatePropertiesWalletRevoked } from "../../analytics";
import { GlobalState } from "../../../../store/reducers/types";

const getKeyTag = (credential: O.Option<StoredCredential>) =>
pipe(
Expand All @@ -17,6 +19,7 @@ const getKeyTag = (credential: O.Option<StoredCredential>) =>
);

export function* handleWalletInstanceResetSaga() {
const state: GlobalState = yield* select();
const integrityKeyTag = yield* select(itwIntegrityKeyTagSelector);
const { eid, credentials } = yield* select(itwCredentialsSelector);

Expand All @@ -34,4 +37,6 @@ export function* handleWalletInstanceResetSaga() {
RA.filterMap(identity)
);
yield* all(itwKeyTags.map(deleteKey));
// Update every mixpanel property related to the wallet instance and its credentials.
void updatePropertiesWalletRevoked(state);
}

0 comments on commit d95acda

Please sign in to comment.