aboutsummaryrefslogtreecommitdiffstats
path: root/packages/pipeline/src
diff options
context:
space:
mode:
authorAlex Browne <stephenalexbrowne@gmail.com>2018-12-05 12:08:32 +0800
committerFred Carlsen <fred@sjelfull.no>2018-12-06 19:06:35 +0800
commita3718803a0a56d82092f15b6f190a01ba299280f (patch)
tree885839bf7a17981e3812635f1c9ca33473c337e8 /packages/pipeline/src
parent6742142ca567d49e2e67d0ab0f5fc55b1351ec7c (diff)
downloaddexon-0x-contracts-a3718803a0a56d82092f15b6f190a01ba299280f.tar.gz
dexon-0x-contracts-a3718803a0a56d82092f15b6f190a01ba299280f.tar.zst
dexon-0x-contracts-a3718803a0a56d82092f15b6f190a01ba299280f.zip
Fix prettier
Diffstat (limited to 'packages/pipeline/src')
-rw-r--r--packages/pipeline/src/scripts/pull_radar_relay_orders.ts29
1 files changed, 11 insertions, 18 deletions
diff --git a/packages/pipeline/src/scripts/pull_radar_relay_orders.ts b/packages/pipeline/src/scripts/pull_radar_relay_orders.ts
index bbbef9b47..6c18bcaef 100644
--- a/packages/pipeline/src/scripts/pull_radar_relay_orders.ts
+++ b/packages/pipeline/src/scripts/pull_radar_relay_orders.ts
@@ -29,22 +29,17 @@ 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...');
- await connection.transaction(
- async (manager: EntityManager): Promise<void> => {
- for (const order of orders) {
- await manager.save(SraOrder, order);
- const observedTimestamp = createObservedTimestampForOrder(order);
- await manager.save(observedTimestamp);
- }
- },
- );
+ await connection.transaction(async (manager: EntityManager): Promise<void> => {
+ for (const order of orders) {
+ await manager.save(SraOrder, order);
+ const observedTimestamp = createObservedTimestampForOrder(order);
+ await manager.save(observedTimestamp);
+ }
+ });
}
const sourceUrlProp = R.lensProp('sourceUrl');
@@ -53,8 +48,6 @@ 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);
+});