aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/dbless.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-wallet-core/src/dbless.ts')
-rw-r--r--packages/taler-wallet-core/src/dbless.ts18
1 files changed, 3 insertions, 15 deletions
diff --git a/packages/taler-wallet-core/src/dbless.ts b/packages/taler-wallet-core/src/dbless.ts
index 0aad477e4..11c6c0f74 100644
--- a/packages/taler-wallet-core/src/dbless.ts
+++ b/packages/taler-wallet-core/src/dbless.ts
@@ -159,11 +159,7 @@ export async function withdrawCoin(args: {
reservePriv: reserveKeyPair.reservePriv,
reservePub: reserveKeyPair.reservePub,
secretSeed: encodeCrock(getRandomBytes(32)),
- value: {
- currency: denom.currency,
- fraction: denom.amountFrac,
- value: denom.amountVal,
- },
+ value: Amounts.parseOrThrow(denom.value),
});
const reqBody: ExchangeWithdrawRequest = {
@@ -211,11 +207,7 @@ export function findDenomOrThrow(
): DenominationRecord {
const denomselAllowLate = options.denomselAllowLate ?? false;
for (const d of exchangeInfo.keys.currentDenominations) {
- const value: AmountJson = {
- currency: d.currency,
- fraction: d.amountFrac,
- value: d.amountVal,
- };
+ const value: AmountJson = Amounts.parseOrThrow(d.value);
if (
Amounts.cmp(value, amount) === 0 &&
isWithdrawableDenom(d, denomselAllowLate)
@@ -303,11 +295,7 @@ export async function refreshCoin(req: {
denomPub: x.denomPub,
denomPubHash: x.denomPubHash,
feeWithdraw: x.fees.feeWithdraw,
- value: Amounts.stringify({
- currency: x.currency,
- fraction: x.amountFrac,
- value: x.amountVal,
- }),
+ value: x.value,
})),
meltCoinMaxAge: oldCoin.maxAge,
});