aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/operations/exchanges.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2021-05-20 13:14:47 +0200
committerFlorian Dold <florian@dold.me>2021-05-20 13:15:11 +0200
commit851ac5602cea0beb7b3e29dc9a95c2093a0ed906 (patch)
tree294e00a40e752c52706b65c86807028ffc450938 /packages/taler-wallet-core/src/operations/exchanges.ts
parent0299e719ce4c97748090fa238cb5f68303fb4abf (diff)
downloadwallet-core-851ac5602cea0beb7b3e29dc9a95c2093a0ed906.tar.xz
add UIDs for deletion tombstones to auditor/exchange trust management
Diffstat (limited to 'packages/taler-wallet-core/src/operations/exchanges.ts')
-rw-r--r--packages/taler-wallet-core/src/operations/exchanges.ts37
1 files changed, 0 insertions, 37 deletions
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,