diff options
author | Fabio B <kandinsky454@protonmail.ch> | 2019-01-11 18:18:18 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-11 18:18:18 +0800 |
commit | 2cf57a48dd2857dd5cf2f31f4c60dd47ae4d34a5 (patch) | |
tree | 23187637b8db2927bdcc11b1b42a2e93787ccaaa /packages/pipeline/src | |
parent | a5b7a351609a5e6689bb97990216153f64302462 (diff) | |
parent | a091b2c19d3dae1eacd9b36f71bca9683001ea33 (diff) | |
download | dexon-sol-tools-2cf57a48dd2857dd5cf2f31f4c60dd47ae4d34a5.tar dexon-sol-tools-2cf57a48dd2857dd5cf2f31f4c60dd47ae4d34a5.tar.gz dexon-sol-tools-2cf57a48dd2857dd5cf2f31f4c60dd47ae4d34a5.tar.bz2 dexon-sol-tools-2cf57a48dd2857dd5cf2f31f4c60dd47ae4d34a5.tar.lz dexon-sol-tools-2cf57a48dd2857dd5cf2f31f4c60dd47ae4d34a5.tar.xz dexon-sol-tools-2cf57a48dd2857dd5cf2f31f4c60dd47ae4d34a5.tar.zst dexon-sol-tools-2cf57a48dd2857dd5cf2f31f4c60dd47ae4d34a5.zip |
Merge pull request #1500 from 0xProject/update-prettier-version
Update prettier to version ^1.15.3
Diffstat (limited to 'packages/pipeline/src')
-rw-r--r-- | packages/pipeline/src/scripts/pull_radar_relay_orders.ts | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/packages/pipeline/src/scripts/pull_radar_relay_orders.ts b/packages/pipeline/src/scripts/pull_radar_relay_orders.ts index 40bb6fc97..03fc764f2 100644 --- a/packages/pipeline/src/scripts/pull_radar_relay_orders.ts +++ b/packages/pipeline/src/scripts/pull_radar_relay_orders.ts @@ -29,18 +29,23 @@ async function getOrderbookAsync(): Promise<void> { console.log(`Got ${rawOrders.records.length} orders.`); console.log('Parsing orders...'); // Parse the sra orders, then add source url to each. - const orders = R.pipe(parseSraOrders, R.map(setSourceUrl(RADAR_RELAY_URL)))(rawOrders); + const orders = R.pipe( + parseSraOrders, + R.map(setSourceUrl(RADAR_RELAY_URL)), + )(rawOrders); // Save all the orders and update the observed time stamps in a single // transaction. console.log('Saving orders and updating timestamps...'); const observedTimestamp = Date.now(); - await connection.transaction(async (manager: EntityManager): Promise<void> => { - for (const order of orders) { - await manager.save(SraOrder, order); - const orderObservation = createObservedTimestampForOrder(order, observedTimestamp); - await manager.save(orderObservation); - } - }); + await connection.transaction( + async (manager: EntityManager): Promise<void> => { + for (const order of orders) { + await manager.save(SraOrder, order); + const orderObservation = createObservedTimestampForOrder(order, observedTimestamp); + await manager.save(orderObservation); + } + }, + ); } const sourceUrlProp = R.lensProp('sourceUrl'); @@ -49,6 +54,8 @@ const sourceUrlProp = R.lensProp('sourceUrl'); * Sets the source url for a single order. Returns a new order instead of * mutating the given one. */ -const setSourceUrl = R.curry((sourceURL: string, order: SraOrder): SraOrder => { - return R.set(sourceUrlProp, sourceURL, order); -}); +const setSourceUrl = R.curry( + (sourceURL: string, order: SraOrder): SraOrder => { + return R.set(sourceUrlProp, sourceURL, order); + }, +); |