Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

Commit

Permalink
Rename to records
Browse files Browse the repository at this point in the history
  • Loading branch information
dekz committed Jan 28, 2020
1 parent fa2ee36 commit 3d89ef4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/handlers/swap_handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ export class SwapHandlers {
}
// tslint:disable-next-line:prefer-function-over-method
public async getTokenPricesAsync(req: express.Request, res: express.Response): Promise<void> {
const prices = await this._swapService.getTokenPricesAsync(req.query.sellToken || 'WETH');
res.status(HttpStatus.OK).send({ prices });
const records = await this._swapService.getTokenPricesAsync(req.query.sellToken || 'WETH');
res.status(HttpStatus.OK).send({ records });
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/services/orderbook_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { paginationUtils } from '../utils/pagination_utils';

export class OrderBookService {
private readonly _meshClient?: WSClient;
private _connection: Connection;
private readonly _connection: Connection;
public async getOrderByHashIfExistsAsync(orderHash: string): Promise<APIOrder | undefined> {
const signedOrderEntityIfExists = await this._connection.manager.findOne(SignedOrderEntity, orderHash);
if (signedOrderEntityIfExists === undefined) {
Expand Down
6 changes: 3 additions & 3 deletions src/services/swap_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,9 @@ export class SwapService {
const sellTokenDecimals = baseAsset.decimals;
const { makerAssetAmount, totalTakerAssetAmount } = quote.bestCaseQuoteInfo;
const unitMakerAssetAmount = Web3Wrapper.toUnitAmount(makerAssetAmount, buyTokenDecimals);
const unitTakerAssetAMount = Web3Wrapper.toUnitAmount(totalTakerAssetAmount, sellTokenDecimals);
const price = unitMakerAssetAmount
.dividedBy(unitTakerAssetAMount)
const unitTakerAssetAmount = Web3Wrapper.toUnitAmount(totalTakerAssetAmount, sellTokenDecimals);
const price = unitTakerAssetAmount
.dividedBy(unitMakerAssetAmount)
.decimalPlaces(sellTokenDecimals);
return {
symbol: queryAssetData[i].symbol,
Expand Down

0 comments on commit 3d89ef4

Please sign in to comment.