Skip to content

Commit

Permalink
fix(login): Prevent duplicate alerts on login failure
Browse files Browse the repository at this point in the history
  • Loading branch information
morgsmccauley committed Mar 29, 2022
1 parent 9735098 commit b540817
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions packages/frontend/src/components/login/v2/ConfirmLoginWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { useSelector, useDispatch } from 'react-redux';

import { Mixpanel } from '../../../mixpanel/index';
import { allowLogin } from '../../../redux/actions/account';
import { showCustomAlert } from '../../../redux/actions/status';
import {
selectAccountLocalStorageAccountId,
selectAccountUrlReferrer
Expand Down Expand Up @@ -33,20 +32,7 @@ export default ({
publicKey={publicKey}
contractId={contractId}
onClickCancel={onClickCancel}
onClickConnect={async () => {
await Mixpanel.withTracking('LOGIN',
async () => {
await dispatch(allowLogin());
},
(e) => {
dispatch(showCustomAlert({
success: false,
messageCodeHeader: 'error',
errorMessage: e.message
}));
}
);
}}
onClickConnect={() => Mixpanel.withTracking('LOGIN', () => dispatch(allowLogin()))}
contractIdUrl={contractIdUrl}
successUrlIsValid={successUrlIsValid}
/>
Expand Down

0 comments on commit b540817

Please sign in to comment.