feat(backend): soft delete expired incoming payments with no funds#3940
Conversation
…yment record and the service get function
…ingPayments table
…on logic to the income payments service
🚀 Performance Test ResultsTest Configuration:
Test Metrics:
📜 Logs |
✅ Deploy Preview for brilliant-pasca-3e80ec canceled.
|
✅ Deploy Preview for brilliant-pasca-3e80ec canceled.
|
updated soft delete tests to check getPage does not return deleted records updated handleExpired to set processAt to null so that it is not processed further
mkurapov
left a comment
There was a problem hiding this comment.
Looking good, just two comments
| const { filter, pagination, sortOrder, tenantId, walletAddressId, client } = | ||
| options ?? {} | ||
| const query = IncomingPayment.query(deps.knex) | ||
| const query = IncomingPayment.query(deps.knex).whereNull('deletedAt') |
There was a problem hiding this comment.
Let's add a small test case for this in the getPage -> filters test section
There was a problem hiding this comment.
I had added a getPage test to the 'Soft deletes an expired incoming payment with no money' test case, starting on line 817. Would you like me to put that in getPage -> filters test section instead, or I can add another test?
There was a problem hiding this comment.
Ideally we should have these tests a bit more self-contained and scoped to a particular function in the future, e.g. describe('complete incoming payment') -> test('returns error for deleted incoming payment') but this is sufficient and is testing everything that we want
…IncomingPayment and updateIncomingPayment
Changes proposed in this pull request
Context
Fixes RAF-1224
Checklist
fixes #numberuser-docslabel (if necessary)