diff options
author | Florian Dold <florian.dold@gmail.com> | 2020-07-23 19:24:00 +0530 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2020-07-23 19:24:00 +0530 |
commit | 56ece296e0e13de3c796a4ac317c6ce9e4fd7c28 (patch) | |
tree | c5d009987c5937ab1ecf17985222d1edc80323ab /src/types/transactions.ts | |
parent | 80433b939962815ad8807b0d6e957d66dbd0e306 (diff) | |
download | wallet-core-56ece296e0e13de3c796a4ac317c6ce9e4fd7c28.tar.xz |
implement common wallet-core API handler
Diffstat (limited to 'src/types/transactions.ts')
-rw-r--r-- | src/types/transactions.ts | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/types/transactions.ts b/src/types/transactions.ts index d62622648..a6ea37e7a 100644 --- a/src/types/transactions.ts +++ b/src/types/transactions.ts @@ -26,6 +26,7 @@ */ import { Timestamp } from "../util/time"; import { AmountString, Product } from "./talerTypes"; +import { Codec, makeCodecForObject, makeCodecOptional, codecForString } from "../util/codec"; export interface TransactionsRequest { /** @@ -300,3 +301,10 @@ interface TransactionRefresh extends TransactionCommon { // Amount that will be paid as fees for the refresh amountEffective: AmountString; } + + +export const codecForTransactionsRequest = (): Codec<TransactionsRequest> => + makeCodecForObject<TransactionsRequest>() + .property("currency", makeCodecOptional(codecForString)) + .property("search", makeCodecOptional(codecForString)) + .build("TransactionsRequest");
\ No newline at end of file |