fix: ageRestriction option was missing

This commit is contained in:
Sebastian 2022-11-25 12:12:14 -03:00
parent e05ba843a0
commit c121eb875e
No known key found for this signature in database
GPG Key ID: BE4FF68352439FC1

View File

@ -100,6 +100,7 @@ import {
WalletCoreVersion, WalletCoreVersion,
WalletNotification, WalletNotification,
codecForUserAttentionByIdRequest, codecForUserAttentionByIdRequest,
ManualWithdrawalDetails,
} from "@gnu-taler/taler-util"; } from "@gnu-taler/taler-util";
import { TalerCryptoInterface } from "./crypto/cryptoImplementation.js"; import { TalerCryptoInterface } from "./crypto/cryptoImplementation.js";
import { import {
@ -1091,12 +1092,14 @@ async function dispatchRequestInternal<Op extends WalletApiOperation>(
Amounts.parseOrThrow(req.amount), Amounts.parseOrThrow(req.amount),
req.restrictAge, req.restrictAge,
); );
return { const resp: ManualWithdrawalDetails = {
amountRaw: req.amount, amountRaw: req.amount,
amountEffective: Amounts.stringify(wi.selectedDenoms.totalCoinValue), amountEffective: Amounts.stringify(wi.selectedDenoms.totalCoinValue),
paytoUris: wi.exchangePaytoUris, paytoUris: wi.exchangePaytoUris,
tosAccepted: wi.termsOfServiceAccepted, tosAccepted: wi.termsOfServiceAccepted,
ageRestrictionOptions: wi.ageRestrictionOptions,
}; };
return resp;
} }
case WalletApiOperation.GetBalances: { case WalletApiOperation.GetBalances: {
return await getBalances(ws); return await getBalances(ws);