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