aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2017-04-12 17:47:14 +0200
committerFlorian Dold <florian.dold@gmail.com>2017-04-12 17:47:14 +0200
commit0ef5140e334085f150a60da6f6233dc2ecfb4a89 (patch)
tree9232dafb57bd652225155f1a6f27ec087ae7faac
parente8bec33231a620579ccd1acd30824fd6c3a13dc2 (diff)
downloadwallet-core-0ef5140e334085f150a60da6f6233dc2ecfb4a89.tar.xz
add exchanges to currency info
-rw-r--r--src/pages/add-auditor.tsx2
-rw-r--r--src/types.ts10
-rw-r--r--src/wallet.ts3
3 files changed, 13 insertions, 2 deletions
diff --git a/src/pages/add-auditor.tsx b/src/pages/add-auditor.tsx
index 2eb98c4c3..3ec21f509 100644
--- a/src/pages/add-auditor.tsx
+++ b/src/pages/add-auditor.tsx
@@ -55,7 +55,7 @@ class ConfirmAuditor extends ImplicitStateComponent<ConfirmAuditorProps> {
}
if (!currency) {
- currency = { name: this.props.currency, auditors: [], fractionalDigits: 2 };
+ currency = { name: this.props.currency, auditors: [], fractionalDigits: 2, exchanges: [] };
}
let newAuditor = { auditorPub: this.props.auditorPub, baseUrl: this.props.url, expirationStamp: this.props.expirationStamp };
diff --git a/src/types.ts b/src/types.ts
index 6ac87639f..5b2fa285c 100644
--- a/src/types.ts
+++ b/src/types.ts
@@ -82,10 +82,20 @@ export interface AuditorRecord {
expirationStamp: number;
}
+export interface ExchangeForCurrencyRecord {
+ /**
+ * Priority for automatic selection when withdrawing.
+ */
+ priority: number;
+ pinnedPub: string;
+ baseUrl: string;
+}
+
export interface CurrencyRecord {
name: string;
fractionalDigits: number;
auditors: AuditorRecord[];
+ exchanges: ExchangeForCurrencyRecord[];
}
diff --git a/src/wallet.ts b/src/wallet.ts
index 506cde1f4..d52bfef6f 100644
--- a/src/wallet.ts
+++ b/src/wallet.ts
@@ -221,7 +221,8 @@ const builtinCurrencies: CurrencyRecord[] = [
expirationStamp: (new Date(2027, 1)).getTime(),
auditorPub: "XN9KMN5G2KGPCAN0E89MM5HE8FV4WBWA9KDTMTDR817MWBCYA7H0",
},
- ]
+ ],
+ exchanges: [],
},
];