1
0
mirror of https://github.com/trezor/trezor-wallet synced 2024-11-24 09:18:09 +00:00

clearing sendForm and sessionStorage references from SelectedAccountActions

This commit is contained in:
Szymon Lesisz 2018-09-22 18:48:28 +02:00
parent 1846d936e2
commit 52cf4f1e8e

View File

@ -3,13 +3,9 @@
import { LOCATION_CHANGE } from 'react-router-redux';
import * as ACCOUNT from 'actions/constants/account';
import * as SEND from 'actions/constants/send';
import * as NOTIFICATION from 'actions/constants/notification';
import * as PENDING from 'actions/constants/pendingTx';
import * as SendFormActions from 'actions/SendFormActions';
import * as SessionStorageActions from 'actions/SessionStorageActions';
import * as stateUtils from 'reducers/utils';
import type {
@ -36,17 +32,6 @@ export const updateSelectedValues = (prevState: State, action: Action): AsyncAct
const state: State = getState();
const { location } = state.router;
// reset form to default
if (action.type === SEND.TX_COMPLETE) {
// dispatch( SendFormActions.init() );
// linear action
// SessionStorageActions.clear(location.pathname);
}
if (prevState.sendForm !== state.sendForm) {
dispatch(SessionStorageActions.save());
}
// handle devices state change (from trezor-connect events or location change)
if (locationChange
|| prevState.accounts !== state.accounts
@ -85,11 +70,6 @@ export const updateSelectedValues = (prevState: State, action: Action): AsyncAct
payload,
});
// initialize SendFormReducer
if (location.state.send && getState().sendForm.currency === '') {
dispatch(SendFormActions.init());
}
if (location.state.send) {
const rejectedTxs = pending.filter(tx => tx.rejected);
rejectedTxs.forEach((tx) => {