Skip to content

Commit

Permalink
fix: Do not display 'release modal' for users setting up new account
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick1904 committed May 25, 2022
1 parent 5092431 commit c61a9a4
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { KeyPair } from 'near-api-js';
import { parseSeedPhrase } from 'near-seed-phrase';
import React, { useState } from 'react';
import React, { useState, useEffect } from 'react';
import { useDispatch } from 'react-redux';

import { IMPORT_ZERO_BALANCE_ACCOUNT } from '../../../../features';
Expand All @@ -9,7 +9,8 @@ import EnterVerificationCode from '../components/accounts/EnterVerificationCode'
import { Mixpanel } from '../mixpanel';
import { redirectTo, saveAccount } from '../redux/actions/account';
import { showCustomAlert } from '../redux/actions/status';
import { wallet } from '../utils/wallet';
import { setReleaseNotesClosed } from '../utils/localStorage';
import { wallet, RELEASE_NOTES_MODAL_VERSION } from '../utils/wallet';

export function SetupRecoveryImplicitAccountWrapper() {
const dispatch = useDispatch();
Expand All @@ -23,6 +24,10 @@ export function SetupRecoveryImplicitAccountWrapper() {
const [seedPhrasePublicKey, setSeedPhrasePublicKey] = useState(null);
const [isInitializingRecoveryLink, setIsInitializingRecoveryLink] = useState(false);

useEffect(() => {
setReleaseNotesClosed(RELEASE_NOTES_MODAL_VERSION);
}, []);

const handleInititalizeEmailRecoveryLink = async () => {
const passPhrase = await wallet.initializeRecoveryMethodNewImplicitAccount({ kind: 'email', detail: email });
const { publicKey, secretKey } = parseSeedPhrase(passPhrase);
Expand Down

0 comments on commit c61a9a4

Please sign in to comment.