From 851ac5602cea0beb7b3e29dc9a95c2093a0ed906 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Thu, 20 May 2021 13:14:47 +0200 Subject: add UIDs for deletion tombstones to auditor/exchange trust management --- .../taler-wallet-core/src/operations/exchanges.ts | 37 ---------------------- 1 file changed, 37 deletions(-) (limited to 'packages/taler-wallet-core/src/operations/exchanges.ts') diff --git a/packages/taler-wallet-core/src/operations/exchanges.ts b/packages/taler-wallet-core/src/operations/exchanges.ts index f48b08ff7..e8833699d 100644 --- a/packages/taler-wallet-core/src/operations/exchanges.ts +++ b/packages/taler-wallet-core/src/operations/exchanges.ts @@ -527,43 +527,6 @@ async function updateExchangeFromUrlImpl( return updatedExchange; } -/** - * Check if and how an exchange is trusted and/or audited. - */ -export async function getExchangeTrust( - ws: InternalWalletState, - exchangeInfo: ExchangeRecord, -): Promise<{ isTrusted: boolean; isAudited: boolean }> { - let isTrusted = false; - let isAudited = false; - const exchangeDetails = exchangeInfo.details; - if (!exchangeDetails) { - throw Error(`exchange ${exchangeInfo.baseUrl} details not available`); - } - const currencyRecord = await ws.db.get( - Stores.currencies, - exchangeDetails.currency, - ); - if (currencyRecord) { - for (const trustedExchange of currencyRecord.exchanges) { - if ( - trustedExchange.exchangeMasterPub === exchangeDetails.masterPublicKey - ) { - isTrusted = true; - break; - } - } - for (const trustedAuditor of currencyRecord.auditors) { - for (const exchangeAuditor of exchangeDetails.auditors) { - if (trustedAuditor.auditorPub === exchangeAuditor.auditor_pub) { - isAudited = true; - break; - } - } - } - } - return { isTrusted, isAudited }; -} export async function getExchangePaytoUri( ws: InternalWalletState, -- cgit v1.2.3