-fix schema validation
This commit is contained in:
parent
55f868d5e8
commit
e3bdfe61a8
@ -42,6 +42,7 @@ import {
|
||||
codecForString,
|
||||
codecForList,
|
||||
codecForAny,
|
||||
codecForBoolean,
|
||||
} from "./codec.js";
|
||||
import {
|
||||
RefreshReason,
|
||||
@ -586,6 +587,7 @@ export const codecForTransactionsRequest = (): Codec<TransactionsRequest> =>
|
||||
buildCodecForObject<TransactionsRequest>()
|
||||
.property("currency", codecOptional(codecForString()))
|
||||
.property("search", codecOptional(codecForString()))
|
||||
.property("includeRefreshes", codecOptional(codecForBoolean()))
|
||||
.build("TransactionsRequest");
|
||||
|
||||
// FIXME: do full validation here!
|
||||
|
@ -24,6 +24,7 @@ import {
|
||||
constructPayPullUri,
|
||||
constructPayPushUri,
|
||||
ExtendedStatus,
|
||||
j2s,
|
||||
Logger,
|
||||
OrderShortInfo,
|
||||
PaymentStatus,
|
||||
@ -958,6 +959,8 @@ export async function getTransactions(
|
||||
transactions.push(buildTransactionForPullPaymentDebit(pi));
|
||||
});
|
||||
|
||||
logger.info(`tx request: ${j2s(transactionsRequest)}`);
|
||||
|
||||
if (transactionsRequest?.includeRefreshes) {
|
||||
tx.refreshGroups.iter().forEachAsync(async (rg) => {
|
||||
if (shouldSkipCurrency(transactionsRequest, rg.currency)) {
|
||||
|
Loading…
Reference in New Issue
Block a user