16 lines
435 B
JavaScript
16 lines
435 B
JavaScript
const strom = require("strom").strom();
|
|
const pricing = require("../stores/pricing");
|
|
|
|
module.exports = function ({
|
|
seed = undefined,
|
|
pricingStore = pricing.global({ seed }),
|
|
} = {}) {
|
|
return strom.map(({ ticker, price }) => {
|
|
if (price) {
|
|
pricingStore.set(ticker, parseFloat(price));
|
|
}
|
|
console.log(`Pricing for ${ticker} set to ${pricingStore.get(ticker)}`);
|
|
return;
|
|
});
|
|
};
|