Skip to content
Permalink
Browse files

[DDW-893] updates mnemonicsConfirmationDate

  • Loading branch information...
daniloprates committed Sep 12, 2019
1 parent 3f3a427 commit 24d3cf1994bbdd0c1e3d815be5f8019894020c83
@@ -18,10 +18,17 @@ export default class WalletRecoveryPhraseStep2Container extends Component<Props>
onClose: () => {},
};

updateWalletLocalData = () => {
const { wallets } = this.props.stores;
const activeWallet = wallets.active;
activeWallet.updateWalletLocalData();
};

handleVerify = successful => {
const dialog = successful
? WalletRecoveryPhraseStep3Dialog
: WalletRecoveryPhraseStep4Dialog;
if (successful) this.updateWalletLocalData();
this.props.actions.dialogs.open.trigger({
dialog,
});
@@ -2,7 +2,10 @@
import { pick } from 'lodash';
import { observable, computed, action, runInAction } from 'mobx';
import BigNumber from 'bignumber.js';
import { getWalletLocalData } from '../utils/walletLocalStorage';
import {
getWalletLocalData,
updateWalletLocalData,
} from '../utils/walletLocalStorage';
import type {
WalletAssuranceLevel,
WalletAssuranceMode,
@@ -84,6 +87,16 @@ export default class Wallet {
});
};

@action updateWalletLocalData = async () => {
const { id } = this;
const mnemonicsConfirmationDate = new Date();
this.mnemonicsConfirmationDate = mnemonicsConfirmationDate;
await updateWalletLocalData({
id,
mnemonicsConfirmationDate,
});
};

@action update(other: Wallet) {
Object.assign(
this,

0 comments on commit 24d3cf1

Please sign in to comment.
You can’t perform that action at this time.