[BAC-513] Add public clients [BAC-516]#2
Merged
samweinberg23 merged 3 commits intomasterfrom Oct 21, 2020
Merged
Conversation
Kenadia
reviewed
Oct 20, 2020
Contributor
Kenadia
left a comment
There was a problem hiding this comment.
(let's use axios instead of request-promise-native)
tsconfig.json
Outdated
| "compilerOptions": { | ||
| "outDir": "build" | ||
| "outDir": "build", | ||
| "esModuleInterop": true |
Contributor
There was a problem hiding this comment.
this is part of the base config already
src/modules/public/impl.ts
Outdated
| } | ||
| } | ||
|
|
||
| async function sendPublicGetRequest(uri: string): Promise<void> { |
src/modules/public/impl.ts
Outdated
| // TODO make production | ||
| await request({ | ||
| method: 'GET', | ||
| uri: `https://api.stage.dydx.exchange/${uri}`, |
Contributor
There was a problem hiding this comment.
Pass in host: string, in the constructor
src/modules/public/impl.ts
Outdated
|
|
||
| async function sendPublicGetRequest(uri: string): Promise<void> { | ||
| // TODO make production | ||
| await request({ |
Contributor
There was a problem hiding this comment.
Let's return the result even if we're not using it yet -- can use type Promise<{}>
0923c00 to
9378ac7
Compare
9378ac7 to
a95f07b
Compare
Kenadia
approved these changes
Oct 20, 2020
Contributor
Kenadia
left a comment
There was a problem hiding this comment.
approved with some comments
package.json
Outdated
| "devDependencies": { | ||
| "@dydxprotocol/node-service-base-dev": "0.0.10" | ||
| "@dydxprotocol/node-service-base-dev": "0.0.10", | ||
| "@types/request-promise-native": "^1.0.17" |
| getStats(): void {} | ||
| getTrades(): void {} | ||
| getHistoricalFunding(): void {} | ||
| host: string; |
src/modules/public/impl.ts
Outdated
| } | ||
|
|
||
| private sendPublicGetRequest(requestPath: string): Promise<{}> { | ||
| // TODO make production |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.