diff options
author | Florian Dold <florian@dold.me> | 2022-11-01 15:31:48 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2022-11-01 15:31:48 +0100 |
commit | d63a773bf5f3b74040e094a94afb732be7218106 (patch) | |
tree | 62d90758a7561bd801be5ccee19415f4a10be4e5 /packages/taler-wallet-core/src/operations/exchanges.ts | |
parent | a0305884eb58bd3cf7451eeb2774eadbb91ae138 (diff) | |
download | wallet-core-d63a773bf5f3b74040e094a94afb732be7218106.tar.xz |
wallet-core: report supportedAgeGroups
Diffstat (limited to 'packages/taler-wallet-core/src/operations/exchanges.ts')
-rw-r--r-- | packages/taler-wallet-core/src/operations/exchanges.ts | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/packages/taler-wallet-core/src/operations/exchanges.ts b/packages/taler-wallet-core/src/operations/exchanges.ts index a8c4fec10..63e71c36c 100644 --- a/packages/taler-wallet-core/src/operations/exchanges.ts +++ b/packages/taler-wallet-core/src/operations/exchanges.ts @@ -76,6 +76,7 @@ import { runOperationHandlerForResult, } from "../util/retries.js"; import { WALLET_EXCHANGE_PROTOCOL_VERSION } from "../versions.js"; +import { isWithdrawableDenom } from "./withdraw.js"; const logger = new Logger("exchanges.ts"); @@ -657,6 +658,14 @@ export async function updateExchangeFromUrlHandler( let detailsPointerChanged = false; + let ageMask = 0; + for (const x of keysInfo.currentDenominations) { + if (isWithdrawableDenom(x) && x.denomPub.age_mask != 0) { + ageMask = x.denomPub.age_mask; + break; + } + } + const updated = await ws.db .mktx((x) => [ x.exchanges, @@ -699,6 +708,7 @@ export async function updateExchangeFromUrlHandler( wireInfo, tosCurrentEtag: tosDownload.tosEtag, tosAccepted: existingTosAccepted, + ageMask, }; if (existingDetails?.rowId) { newDetails.rowId = existingDetails.rowId; |