Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dYdX write adapter result path #491

Merged
merged 1 commit into from
May 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dydx-stark/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@chainlink/dydx-stark-adapter",
"version": "0.0.2",
"version": "0.0.3",
"description": "Chainlink dydx-stark adapter.",
"keywords": [
"Chainlink",
Expand Down
6 changes: 5 additions & 1 deletion dydx-stark/src/endpoint/send.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ export const execute: ExecuteWithConfig<Config> = async (request, config) => {
const { asset, ...data } = validator.validated.data

const dataPath = data.dataPath || DEFAULT_DATA_PATH
const price = <number | string>objectPath.get(data, dataPath)
let price = <number | string>objectPath.get(data, dataPath)

/* Remove me May 10th 2021 */
if (!price) price = <number | string>objectPath.get(request, dataPath)
/**************************/

const priceData: PriceDataPoint = {
oracleName: config.oracleName,
Expand Down