[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-wallet-webex] 02/03: check trust by key, not by URL
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-wallet-webex] 02/03: check trust by key, not by URL |
Date: |
Sun, 04 Jun 2017 20:25:39 +0200 |
This is an automated email from the git hooks/post-receive script.
dold pushed a commit to branch master
in repository wallet-webex.
commit 00b25fa66a2263ac675b070c969295973101098d
Author: Florian Dold <address@hidden>
AuthorDate: Sun Jun 4 20:25:28 2017 +0200
check trust by key, not by URL
---
src/types.ts | 7 +------
src/wallet.ts | 6 +++---
2 files changed, 4 insertions(+), 9 deletions(-)
diff --git a/src/types.ts b/src/types.ts
index 9a7a79ac..68fde269 100644
--- a/src/types.ts
+++ b/src/types.ts
@@ -154,14 +154,9 @@ export interface AuditorRecord {
*/
export interface ExchangeForCurrencyRecord {
/**
- * Priority for automatic selection when withdrawing.
* FIXME: unused?
*/
- priority: number;
- /**
- * FIXME: unused?
- */
- pinnedPub?: string;
+ exchangePub: string;
/**
* Base URL of the exchange.
*/
diff --git a/src/wallet.ts b/src/wallet.ts
index 2f5fa294..0d4a8e0d 100644
--- a/src/wallet.ts
+++ b/src/wallet.ts
@@ -1158,7 +1158,7 @@ export class Wallet {
}
if (!isAudited && !isTrusted) {
- currencyRecord.exchanges.push({baseUrl: req.exchange, priority: 0});
+ currencyRecord.exchanges.push({baseUrl: req.exchange, exchangePub:
exchangeInfo.masterPublicKey});
}
await this.q()
@@ -1445,14 +1445,14 @@ export class Wallet {
const currencyRecord = await this.q().get(Stores.currencies,
exchangeInfo.currency);
if (currencyRecord) {
for (const trustedExchange of currencyRecord.exchanges) {
- if (trustedExchange.baseUrl === exchangeInfo.baseUrl) {
+ if (trustedExchange.exchangePub === exchangeInfo.masterPublicKey) {
isTrusted = true;
break;
}
}
for (const trustedAuditor of currencyRecord.auditors) {
for (const exchangeAuditor of exchangeInfo.auditors) {
- if (trustedAuditor.baseUrl === exchangeAuditor.auditor_url) {
+ if (trustedAuditor.auditorPub === exchangeAuditor.auditor_pub) {
isAudited = true;
break;
}
--
To stop receiving notification emails like this one, please contact
address@hidden