aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-util
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2023-10-16 10:25:58 +0200
committerFlorian Dold <florian@dold.me>2023-10-16 10:25:58 +0200
commit529993da2f14934456b4083cb1f2a3fa69248ca4 (patch)
treeacc57b5172e0262ce11290ec2266880d0582f308 /packages/taler-util
parent6a4e0ffd858a6eeb29f19de949db87a115b34097 (diff)
downloadwallet-core-529993da2f14934456b4083cb1f2a3fa69248ca4.tar.xz
wallet-core: sort transactions ASC by default to not break tests
Diffstat (limited to 'packages/taler-util')
-rw-r--r--packages/taler-util/src/taler-types.ts10
-rw-r--r--packages/taler-util/src/transactions-types.ts7
2 files changed, 12 insertions, 5 deletions
diff --git a/packages/taler-util/src/taler-types.ts b/packages/taler-util/src/taler-types.ts
index 767adb799..551b0652f 100644
--- a/packages/taler-util/src/taler-types.ts
+++ b/packages/taler-util/src/taler-types.ts
@@ -1006,8 +1006,8 @@ export class WithdrawOperationStatusResponse {
/**
* Response from the merchant.
*/
-export class TipPickupGetResponse {
- tip_amount: string;
+export class RewardPickupGetResponse {
+ reward_amount: string;
exchange_url: string;
@@ -1566,9 +1566,9 @@ export const codecForWithdrawOperationStatusResponse =
.property("wire_types", codecForList(codecForString()))
.build("WithdrawOperationStatusResponse");
-export const codecForTipPickupGetResponse = (): Codec<TipPickupGetResponse> =>
- buildCodecForObject<TipPickupGetResponse>()
- .property("tip_amount", codecForString())
+export const codecForRewardPickupGetResponse = (): Codec<RewardPickupGetResponse> =>
+ buildCodecForObject<RewardPickupGetResponse>()
+ .property("reward_amount", codecForString())
.property("exchange_url", codecForString())
.property("next_url", codecOptional(codecForString()))
.property("expiration", codecForTimestamp)
diff --git a/packages/taler-util/src/transactions-types.ts b/packages/taler-util/src/transactions-types.ts
index 63db206bd..32d10a953 100644
--- a/packages/taler-util/src/transactions-types.ts
+++ b/packages/taler-util/src/transactions-types.ts
@@ -63,6 +63,13 @@ export interface TransactionsRequest {
search?: string;
/**
+ * Sort order of the transaction items.
+ * By default, items are sorted ascending by their
+ * main timestamp.
+ */
+ sort?: "ascending" | "descending",
+
+ /**
* If true, include all refreshes in the transactions list.
*/
includeRefreshes?: boolean;