Skip to content

Commit cec3f79

Browse files
fix(cards): createdAt bug and remove failed transactions (#1996)
* feat(wallet-backend): debug cards transactions response * fix(wallet-backend): filter out 'Advice' transactions in new transactions response and transactions that have the same createdAt date * refactor(wallet-backend): remove debug logging for fetched transactions
1 parent e38fa41 commit cec3f79

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

packages/wallet/backend/src/transaction/service.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,9 @@ export class TransactionService implements ITransactionService {
147147

148148
const newTransactions = transactionsResponse.data.filter(
149149
(transaction) =>
150-
!latestTransaction ||
151-
latestTransaction.createdAt.toISOString() <= transaction.createdAt
150+
transaction.transactionClassification !== 'Advice' &&
151+
(!latestTransaction ||
152+
latestTransaction.createdAt.toISOString() < transaction.createdAt)
152153
)
153154

154155
if (newTransactions.length === 0) {

packages/wallet/shared/src/types/card.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ export interface ICardTransaction {
5555
mastercardConversion?: {
5656
convRate?: string
5757
}
58+
transactionClassification?: 'Advice'
5859
}
5960

6061
export interface IPagination {

0 commit comments

Comments
 (0)