From 27d432b4c8a8134d3f7ee9ee709b10f5782a4c25 Mon Sep 17 00:00:00 2001 From: JonathanAmenechi <7217608+JonathanAmenechi@users.noreply.github.com> Date: Tue, 31 May 2022 14:43:17 -0400 Subject: [PATCH] feat: update to latest order-utils --- package.json | 4 ++-- src/client.ts | 9 +++------ 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 9ae068a..02363ca 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@polymarket/clob-client", "description": "Typescript client for Polymarket's CLOB", - "version": "1.0.26", + "version": "1.0.27", "contributors": [ { "name": "Jonathan Amenechi", @@ -23,7 +23,7 @@ "@ethersproject/random": "^5.5.0", "@ethersproject/transactions": "^5.5.0", "@ethersproject/wallet": "^5.5.0", - "@polymarket/order-utils": "1.2.12", + "@polymarket/order-utils": "^1.2.13", "axios": "^0.21.1", "commitizen": "^4.2.1", "cz-conventional-changelog": "^3.3.0", diff --git a/src/client.ts b/src/client.ts index 30e19a4..605de07 100644 --- a/src/client.ts +++ b/src/client.ts @@ -80,8 +80,7 @@ export class ClobClient { } public async getOrderBook(tokenID: string): Promise { - const endpoint = `${this.host}${GET_ORDER_BOOK}?market=${tokenID}`; - return get(endpoint); + return get(`${this.host}${GET_ORDER_BOOK}?market=${tokenID}`); } public async getMidpoint(tokenID: string): Promise { @@ -92,12 +91,10 @@ export class ClobClient { return get(`${this.host}${PRICE}?market=${tokenID}&side=${side}`); } - public async getLastTradePrice(tokenID: string, side:string): Promise { - const endpoint = `${this.host}${GET_LAST_TRADE_PRICE}?market=${tokenID}&side=${side}`; - return get(endpoint); + public async getLastTradePrice(tokenID: string, side: string): Promise { + return get(`${this.host}${GET_LAST_TRADE_PRICE}?market=${tokenID}&side=${side}`); } - // L1 Authed /**