Skip to content

Commit

Permalink
refactor: use handleClearAlert thunk in Routing component
Browse files Browse the repository at this point in the history
  • Loading branch information
marcinbodnar committed Jan 25, 2022
1 parent 92ef8ec commit 7d020ed
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/frontend/src/components/Routing.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { IS_MAINNET, PUBLIC_URL, SHOW_PRERELEASE_WARNING, DISABLE_CREATE_ACCOUNT
import ExampleFlag from '../ExampleFlag';
import { Mixpanel } from "../mixpanel/index";
import * as accountActions from '../redux/actions/account';
import { handleClearAlert } from '../redux/reducers/status';
import { selectAccountSlice } from '../redux/slices/account';
import { actions as tokenFiatValueActions } from '../redux/slices/tokenFiatValues';
import { CreateImplicitAccountWrapper } from '../routes/CreateImplicitAccountWrapper';
Expand All @@ -29,7 +30,6 @@ import translations_ru from '../translations/ru.global.json';
import translations_vi from '../translations/vi.global.json';
import translations_zh_hans from '../translations/zh-hans.global.json';
import translations_zh_hant from '../translations/zh-hant.global.json';
import { handleClearAlert } from '../utils/alerts';
import classNames from '../utils/classNames';
import getBrowserLocale from '../utils/getBrowserLocale';
import { getAccountIsInactive, removeAccountIsInactive, setAccountIsInactive } from '../utils/localStorage';
Expand Down Expand Up @@ -186,7 +186,8 @@ class Routing extends Component {
handleRedirectUrl,
handleClearUrl,
router,
fetchTokenFiatValues
fetchTokenFiatValues,
handleClearAlert
} = this.props;

fetchTokenFiatValues();
Expand Down Expand Up @@ -598,7 +599,8 @@ const mapDispatchToProps = {
promptTwoFactor,
redirectTo,
getAccountHelperWalletState,
fetchTokenFiatValues
fetchTokenFiatValues,
handleClearAlert
};

const mapStateToProps = (state) => ({
Expand Down

0 comments on commit 7d020ed

Please sign in to comment.