Lots of development

This commit is contained in:
Josh Harvey 2017-03-31 16:45:14 +03:00
parent 5cbec6bd23
commit 3a244f691e
19 changed files with 594 additions and 837 deletions

View file

@ -14,7 +14,7 @@ function lookupExchange (settings, cryptoCode) {
function fetchExchange (settings, cryptoCode) {
return Promise.resolve()
.then(() => {
const plugin = lookupExchange(cryptoCode)
const plugin = lookupExchange(settings, cryptoCode)
if (!plugin) throw noExchangeError(cryptoCode)
const account = settings.accounts[plugin]
const exchange = require('lamassu-' + plugin)
@ -33,7 +33,7 @@ function sell (settings, cryptoAtoms, fiatCode, cryptoCode) {
.then(r => r.exchange.sell(r.account, cryptoAtoms, fiatCode, cryptoCode))
}
function active (settings, fiatCode, cryptoCode) {
function active (settings, cryptoCode) {
return !!lookupExchange(settings, cryptoCode)
}