Skip to content

Commit

Permalink
Add kludge for getting dYdX price outside of input 'data' object (#491)
Browse files Browse the repository at this point in the history
  • Loading branch information
justinkaseman authored May 4, 2021
1 parent 972e00b commit 6bad6c6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
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

0 comments on commit 6bad6c6

Please sign in to comment.