You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When coinfloor is added as a source to lamassu-admin/server/price/feed.js, lamassu-admin process continuously restarts, displaying the following in lamassu-admin.log. Server is set to supported currency (USD).
Prevents it from being added as a default price source in the admin.
Starting SocketStream 0.3.10 in development mode...
Warning: connection.session() MemoryStore is not
designed for a production environment, as it will leak
memory, and will not scale past a single process.
/usr/local/lib/node_modules/lamassu-admin/server/price/feed.js:9
return require('lamassu-' + ticker).ticker.factory();
^
TypeError: Object function (currencies, callback) {
if (typeof currencies == "string") {
currencies = [ currencies ];
}
var remaining = currencies.length;
for (var i = 0; i < currencies.length; ++i) {
var currency = currencies[i];
if (!(currency in _tickers) && currency in assets_by_code) {
var doWatch = (function (base, counter) {
return function () {
console.log("Coinfloor: Subscribing to ticker for " + base.code + ":" + counter.code);
Coinfloor.request({
method: "WatchTicker",
base: base.id,
counter: counter.id,
watch: true,
}, function (msg) {
if (msg.error_code == 0) {
msg.base = base.id;
msg.counter = counter.id;
Coinfloor.trigger("TickerChanged", msg);
if (!--remaining) {
callback(null, _tickers);
_ticker_callback = callback;
}
}
});
};
})(_base, assets_by_code[currency]);
Coinfloor.on("Welcome", doWatch);
if (Coinfloor.isConnected()) {
doWatch();
}
}
else if (!--remaining) {
callback(null, _tickers);
_ticker_callback = callback;
}
}
} has no method 'factory'
at /usr/local/lib/node_modules/lamassu-admin/server/price/feed.js:9:46
at Array.map (native)
at Object.<anonymous> (/usr/local/lib/node_modules/lamassu-admin/server/price/feed.js:8:31)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/usr/local/lib/node_modules/lamassu-admin/app.js:62:18)
The text was updated successfully, but these errors were encountered:
It would really be helpful if there were SPI documentation. Trying to implement a Rakía module as a third party is a guessing game without documentation.
It appears that there are two different SPIs in play. lamassu-admin wants the lamassu-coinfloor module to have a property named ticker, whose value should be an object that has a method named factory that returns an instance of the ticker interface. However, lamassu-server wants the lamassu-coinfloor module to have a method named ticker — in other words, to implement the ticker interface directly. I can add glue code so that both of these SPIs are implemented, but this strikes me as haphazard and ill-defined. Could we get input from @joshmh as to which is the "correct" SPI?
A note: the string factory does not appear anywhere in lamassu-server@joshmh/master.
When
coinfloor
is added as a source tolamassu-admin/server/price/feed.js
, lamassu-admin process continuously restarts, displaying the following inlamassu-admin.log
. Server is set to supported currency (USD).Prevents it from being added as a default price source in the admin.
The text was updated successfully, but these errors were encountered: