add exchanges to currency info
This commit is contained in:
parent
e8bec33231
commit
0ef5140e33
@ -55,7 +55,7 @@ class ConfirmAuditor extends ImplicitStateComponent<ConfirmAuditorProps> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!currency) {
|
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 };
|
let newAuditor = { auditorPub: this.props.auditorPub, baseUrl: this.props.url, expirationStamp: this.props.expirationStamp };
|
||||||
|
10
src/types.ts
10
src/types.ts
@ -82,10 +82,20 @@ export interface AuditorRecord {
|
|||||||
expirationStamp: number;
|
expirationStamp: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface ExchangeForCurrencyRecord {
|
||||||
|
/**
|
||||||
|
* Priority for automatic selection when withdrawing.
|
||||||
|
*/
|
||||||
|
priority: number;
|
||||||
|
pinnedPub: string;
|
||||||
|
baseUrl: string;
|
||||||
|
}
|
||||||
|
|
||||||
export interface CurrencyRecord {
|
export interface CurrencyRecord {
|
||||||
name: string;
|
name: string;
|
||||||
fractionalDigits: number;
|
fractionalDigits: number;
|
||||||
auditors: AuditorRecord[];
|
auditors: AuditorRecord[];
|
||||||
|
exchanges: ExchangeForCurrencyRecord[];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -221,7 +221,8 @@ const builtinCurrencies: CurrencyRecord[] = [
|
|||||||
expirationStamp: (new Date(2027, 1)).getTime(),
|
expirationStamp: (new Date(2027, 1)).getTime(),
|
||||||
auditorPub: "XN9KMN5G2KGPCAN0E89MM5HE8FV4WBWA9KDTMTDR817MWBCYA7H0",
|
auditorPub: "XN9KMN5G2KGPCAN0E89MM5HE8FV4WBWA9KDTMTDR817MWBCYA7H0",
|
||||||
},
|
},
|
||||||
]
|
],
|
||||||
|
exchanges: [],
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user