fix to prevent callback being called twice

This commit is contained in:
Sean Yesmunt 2019-10-15 10:32:05 -04:00
parent b8e1708ee4
commit fc55460f2e
3 changed files with 12 additions and 13 deletions

12
dist/bundle.es.js vendored
View file

@ -2450,13 +2450,13 @@ function doGetSync(passedPassword, callback) {
handleCallback();
}
});
} else {
dispatch({
type: GET_SYNC_COMPLETED,
data
});
handleCallback();
}
dispatch({
type: GET_SYNC_COMPLETED,
data
});
handleCallback();
}).catch(() => {
if (data.hasSyncedWallet) {
const error = 'Error getting synced wallet';

12
dist/bundle.js vendored
View file

@ -4012,13 +4012,13 @@ function doGetSync(passedPassword, callback) {
handleCallback();
}
});
} else {
dispatch({
type: constants_action_types__WEBPACK_IMPORTED_MODULE_0__["GET_SYNC_COMPLETED"],
data: data
});
handleCallback();
}
dispatch({
type: constants_action_types__WEBPACK_IMPORTED_MODULE_0__["GET_SYNC_COMPLETED"],
data: data
});
handleCallback();
})["catch"](function () {
if (data.hasSyncedWallet) {
var error = 'Error getting synced wallet';

View file

@ -116,7 +116,6 @@ export function doGetSync(passedPassword, callback) {
}
);
}
dispatch({ type: ACTIONS.GET_SYNC_COMPLETED, data });
handleCallback();
})