Skip to content

Commit

Permalink
fix(everypay): adding faster polling
Browse files Browse the repository at this point in the history
  • Loading branch information
pedroapfilho committed Dec 7, 2021
1 parent 36d0703 commit 5e0c3b2
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1154,7 +1154,7 @@ export default ({ api, coreSagas, networks }: { api: APIType; coreSagas: any; ne

const pollBSCard = function* ({ payload }: ReturnType<typeof A.pollCard>) {
let retryAttempts = 0
const maxRetryAttempts = 20
const maxRetryAttempts = 40

let card: ReturnType<typeof api.getBSCard> = yield call(api.getBSCard, payload)
let step = S.getStep(yield select())
Expand All @@ -1173,7 +1173,7 @@ export default ({ api, coreSagas, networks }: { api: APIType; coreSagas: any; ne
) {
yield cancel()
}
yield delay(3000)
yield delay(1500)
}

switch (card.state) {
Expand All @@ -1198,7 +1198,7 @@ export default ({ api, coreSagas, networks }: { api: APIType; coreSagas: any; ne

const pollBSOrder = function* ({ payload }: ReturnType<typeof A.pollOrder>) {
let retryAttempts = 0
const maxRetryAttempts = 20
const maxRetryAttempts = 40

let order: ReturnType<typeof api.getBSOrder> = yield call(api.getBSOrder, payload)
let step = S.getStep(yield select())
Expand All @@ -1214,7 +1214,7 @@ export default ({ api, coreSagas, networks }: { api: APIType; coreSagas: any; ne
) {
yield cancel()
}
yield delay(3000)
yield delay(1500)
}

yield put(A.setStep({ order, step: 'ORDER_SUMMARY' }))
Expand Down

0 comments on commit 5e0c3b2

Please sign in to comment.