From 0ef5140e334085f150a60da6f6233dc2ecfb4a89 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Wed, 12 Apr 2017 17:47:14 +0200 Subject: [PATCH] add exchanges to currency info --- src/pages/add-auditor.tsx | 2 +- src/types.ts | 10 ++++++++++ src/wallet.ts | 3 ++- 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 { } 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: [], }, ];