-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CAL - fetch pending transaction #794
base: master
Are you sure you want to change the base?
Conversation
fixes #791 |
Hi @galbarm thanks for the contribution. I'll quickly play with it soon and if everything works i'll merge it. Thank you for your patience |
@esakal any chance you find time for this? |
@galbarm sorry for the late response, my availability and access to the computer is small during Jule/Aug. |
@eshaham I cannot merge it due to the CI checks for node v16 Can you please merge? |
@esakal, this is different - the v16 tests did not run because the branch has not taken the latest code from the |
@esakal we need to resolve conflicts first, tried to take a look, but it was a bit confusing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, I solved the conflict, let's just solve the throw
comment and continue.
src/scrapers/visa-cal.ts
Outdated
if (pendingData?.statusCode !== 1 && pendingData?.statusCode !== 96) throw new Error(`failed to fetch pending transactions for card ${card.last4Digits}. Message: ${pendingData?.title || ''}`); | ||
if (!this.isCardPendingTransactionDetails(pendingData)) { | ||
throw new Error('pendingData is not of type CardTransactionDetails'); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure we should throw when the pending transactions phase is failed.
Most of the users want the transactions even without the pendings.
This reverts commit d6eca23.
Fix #791
Pending transactions in CAL, are retrieved via a separate endpoint than the completed transactions.
Added a request to fetch pending transactions from the new endpoint.