commit 0ef5140e334085f150a60da6f6233dc2ecfb4a89
parent e8bec33231a620579ccd1acd30824fd6c3a13dc2
Author: Florian Dold <florian.dold@gmail.com>
Date: Wed, 12 Apr 2017 17:47:14 +0200
add exchanges to currency info
Diffstat:
3 files changed, 13 insertions(+), 2 deletions(-)
diff --git 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
@@ -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
@@ -221,7 +221,8 @@ const builtinCurrencies: CurrencyRecord[] = [
expirationStamp: (new Date(2027, 1)).getTime(),
auditorPub: "XN9KMN5G2KGPCAN0E89MM5HE8FV4WBWA9KDTMTDR817MWBCYA7H0",
},
- ]
+ ],
+ exchanges: [],
},
];