aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/operations/exchanges.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-wallet-core/src/operations/exchanges.ts')
-rw-r--r--packages/taler-wallet-core/src/operations/exchanges.ts45
1 files changed, 0 insertions, 45 deletions
diff --git a/packages/taler-wallet-core/src/operations/exchanges.ts b/packages/taler-wallet-core/src/operations/exchanges.ts
index 690bc3cec..13e89b16c 100644
--- a/packages/taler-wallet-core/src/operations/exchanges.ts
+++ b/packages/taler-wallet-core/src/operations/exchanges.ts
@@ -158,35 +158,6 @@ getExchangeDetails.makeContext = (db: DbAccess<typeof WalletStoresV1>) =>
db.mktx((x) => [x.exchanges, x.exchangeDetails]);
/**
- * Update the database based on the download of the terms of service.
- */
-export async function updateExchangeTermsOfService(
- ws: InternalWalletState,
- exchangeBaseUrl: string,
- tos: ExchangeTosDownloadResult,
-): Promise<void> {
- await ws.db
- .mktx((x) => [x.exchanges, x.exchangeTos, x.exchangeDetails])
- .runReadWrite(async (tx) => {
- const d = await getExchangeDetails(tx, exchangeBaseUrl);
- let tosRecord = await tx.exchangeTos.get([exchangeBaseUrl, tos.tosEtag]);
- if (!tosRecord) {
- tosRecord = {
- etag: tos.tosEtag,
- exchangeBaseUrl,
- termsOfServiceContentType: tos.tosContentType,
- termsOfServiceText: tos.tosText,
- };
- await tx.exchangeTos.put(tosRecord);
- }
- if (d) {
- d.tosCurrentEtag = tos.tosEtag;
- await tx.exchangeDetails.put(d);
- }
- });
-}
-
-/**
* Mark a ToS version as accepted by the user.
*
* @param etag version of the ToS to accept, or current ToS version of not given
@@ -740,7 +711,6 @@ export async function updateExchangeFromUrlHandler(
const updated = await ws.db
.mktx((x) => [
x.exchanges,
- x.exchangeTos,
x.exchangeDetails,
x.exchangeSignKeys,
x.denominations,
@@ -801,21 +771,6 @@ export async function updateExchangeFromUrlHandler(
const drRowId = await tx.exchangeDetails.put(newDetails);
checkDbInvariant(typeof drRowId.key === "number");
- let tosRecord = await tx.exchangeTos.get([
- exchangeBaseUrl,
- tosDownload.tosEtag,
- ]);
-
- if (!tosRecord || tosRecord.etag !== existingTosAccepted?.etag) {
- tosRecord = {
- etag: tosDownload.tosEtag,
- exchangeBaseUrl,
- termsOfServiceContentType: tosDownload.tosContentType,
- termsOfServiceText: tosDownload.tosText,
- };
- await tx.exchangeTos.put(tosRecord);
- }
-
for (const sk of keysInfo.signingKeys) {
// FIXME: validate signing keys before inserting them
await tx.exchangeSignKeys.put({