Fix double alert on swap timeout (#1034)
This commit is contained in:
parent
8a9e5b34d6
commit
4e092d5177
|
@ -1,7 +1,6 @@
|
|||
import { TShowNotification } from 'actions/notifications';
|
||||
import {
|
||||
TRestartSwap,
|
||||
TStartOrderTimerSwap,
|
||||
TStartPollBityOrderStatus,
|
||||
TStartPollShapeshiftOrderStatus,
|
||||
TStopOrderTimerSwap,
|
||||
|
@ -30,7 +29,6 @@ interface ReduxStateProps {
|
|||
|
||||
interface ReduxActionProps {
|
||||
restartSwap: TRestartSwap;
|
||||
startOrderTimerSwap: TStartOrderTimerSwap;
|
||||
startPollBityOrderStatus: TStartPollBityOrderStatus;
|
||||
stopPollBityOrderStatus: TStopPollBityOrderStatus;
|
||||
startPollShapeshiftOrderStatus: TStartPollShapeshiftOrderStatus;
|
||||
|
@ -47,7 +45,6 @@ export default class PartThree extends PureComponent<ReduxActionProps & ReduxSta
|
|||
} else {
|
||||
this.props.startPollBityOrderStatus();
|
||||
}
|
||||
this.props.startOrderTimerSwap();
|
||||
}
|
||||
|
||||
public componentWillUnmount() {
|
||||
|
|
|
@ -319,19 +319,19 @@ export function* shapeshiftOrderTimeRemaining(): SagaIterator {
|
|||
} else {
|
||||
switch (swap.shapeshiftOrderStatus) {
|
||||
case 'no_deposits':
|
||||
if (!hasShownNotification) {
|
||||
hasShownNotification = true;
|
||||
yield put(orderTimeSwap(0));
|
||||
yield put(stopPollShapeshiftOrderStatus());
|
||||
yield put(stopLoadShapeshiftRatesSwap());
|
||||
if (!hasShownNotification) {
|
||||
hasShownNotification = true;
|
||||
yield put(showNotification('danger', ORDER_TIMEOUT_MESSAGE, Infinity));
|
||||
}
|
||||
break;
|
||||
case 'failed':
|
||||
yield put(stopPollShapeshiftOrderStatus());
|
||||
yield put(stopLoadShapeshiftRatesSwap());
|
||||
if (!hasShownNotification) {
|
||||
hasShownNotification = true;
|
||||
yield put(stopPollShapeshiftOrderStatus());
|
||||
yield put(stopLoadShapeshiftRatesSwap());
|
||||
yield put(showNotification('danger', ORDER_TIMEOUT_MESSAGE, Infinity));
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue