diff options
author | Florian Dold <florian@dold.me> | 2022-10-31 17:08:42 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2022-10-31 17:08:42 +0100 |
commit | 78b4ab19a338001010ceb103f6de7b38b1069ab6 (patch) | |
tree | d0b036f0b67a3fa3b805779ecf603130ef206a0e | |
parent | 780eb20227d07afeea654e8b883790b6b1ab8e1c (diff) |
wallet-core: use string amounts for deposit response
-rw-r--r-- | packages/taler-util/src/wallet-types.ts | 4 | ||||
-rw-r--r-- | packages/taler-wallet-core/src/operations/deposits.ts | 5 |
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, |