aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2022-10-31 17:08:42 +0100
committerFlorian Dold <florian@dold.me>2022-10-31 17:08:42 +0100
commit78b4ab19a338001010ceb103f6de7b38b1069ab6 (patch)
treed0b036f0b67a3fa3b805779ecf603130ef206a0e
parent780eb20227d07afeea654e8b883790b6b1ab8e1c (diff)
wallet-core: use string amounts for deposit response
-rw-r--r--packages/taler-util/src/wallet-types.ts4
-rw-r--r--packages/taler-wallet-core/src/operations/deposits.ts5
2 files changed, 6 insertions, 3 deletions
diff --git a/packages/taler-util/src/wallet-types.ts b/packages/taler-util/src/wallet-types.ts
index 8737bc3f0..614610bb1 100644
--- a/packages/taler-util/src/wallet-types.ts
+++ b/packages/taler-util/src/wallet-types.ts
@@ -1643,8 +1643,8 @@ export const codecForPrepareDepositRequest = (): Codec<PrepareDepositRequest> =>
.build("PrepareDepositRequest");
export interface PrepareDepositResponse {
- totalDepositCost: AmountJson;
- effectiveDepositAmount: AmountJson;
+ totalDepositCost: AmountString;
+ effectiveDepositAmount: AmountString;
}
export const codecForCreateDepositGroupRequest =
diff --git a/packages/taler-wallet-core/src/operations/deposits.ts b/packages/taler-wallet-core/src/operations/deposits.ts
index 2b27d0f8f..4d617ee13 100644
--- a/packages/taler-wallet-core/src/operations/deposits.ts
+++ b/packages/taler-wallet-core/src/operations/deposits.ts
@@ -367,7 +367,10 @@ export async function prepareDepositGroup(
payCoinSel,
);
- return { totalDepositCost, effectiveDepositAmount };
+ return {
+ totalDepositCost: Amounts.stringify(totalDepositCost),
+ effectiveDepositAmount: Amounts.stringify(effectiveDepositAmount),
+ };
}
export async function createDepositGroup(
ws: InternalWalletState,