Skip to content

Commit

Permalink
chore: fix PR feedback on polling
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean Han committed Dec 15, 2021
1 parent 7f5e99d commit 4926775
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export default ({ api, coreSagas, networks }) => {
yield takeLatest(
actions.startPollSellQuote.type,
function* (payload: ReturnType<typeof actions.startPollSellQuote>) {
if (sellPollTask && sellPollTask.isRunning()) yield cancel(sellPollTask)
if (sellPollTask?.isRunning()) yield cancel(sellPollTask)
sellPollTask = yield fork(buySellSagas.fetchSellQuote, payload)
yield take(actions.stopPollSellQuote.type)
yield cancel(sellPollTask)
Expand All @@ -97,7 +97,7 @@ export default ({ api, coreSagas, networks }) => {
yield takeLatest(
actions.startPollBuyQuote.type,
function* (payload: ReturnType<typeof actions.startPollBuyQuote>) {
if (buyPollTask && buyPollTask.isRunning()) yield cancel(buyPollTask)
if (buyPollTask?.isRunning()) yield cancel(buyPollTask)
buyPollTask = yield fork(buySellSagas.fetchBuyQuote, payload)
yield take(actions.stopPollBuyQuote.type)
yield cancel(buyPollTask)
Expand Down

0 comments on commit 4926775

Please sign in to comment.