fix to prevent callback being called twice
This commit is contained in:
parent
b8e1708ee4
commit
fc55460f2e
3 changed files with 12 additions and 13 deletions
12
dist/bundle.es.js
vendored
12
dist/bundle.es.js
vendored
|
@ -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
12
dist/bundle.js
vendored
|
@ -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';
|
||||
|
|
|
@ -116,7 +116,6 @@ export function doGetSync(passedPassword, callback) {
|
|||
}
|
||||
);
|
||||
}
|
||||
|
||||
dispatch({ type: ACTIONS.GET_SYNC_COMPLETED, data });
|
||||
handleCallback();
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue