Skip to content

Commit 5c261b4

Browse files
review fix
1 parent 2cf8cc4 commit 5c261b4

2 files changed

Lines changed: 2 additions & 7 deletions

File tree

packages/composites/implied-price-test/src/transport/computePrice.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@ import {
1313
} from '../endpoint/computedPrice'
1414
import { calculateMedian, getOperandSourceUrls } from './utils'
1515

16-
Decimal.set({ precision: 50 })
17-
Decimal.set({ toExpPos: 50 })
18-
Decimal.set({ toExpNeg: -50 })
19-
2016
const scaleValue = (value: Decimal, inputDecimals: number, outputDecimals: number): Decimal =>
2117
value.div(new Decimal(10).pow(inputDecimals)).mul(new Decimal(10).pow(outputDecimals))
2218

@@ -142,7 +138,6 @@ export class ComputedPriceTransport extends SubscriptionTransport<ComputedPriceT
142138
throw new Error('operand2Median result is zero')
143139
}
144140

145-
// *Decimals input param all/none present validation performed at the endpoint level
146141
const areDecimalsDefined = outputDecimals !== undefined
147142

148143
validateDecimalsFieldParams(

packages/composites/implied-price-test/test/integration/__snapshots__/adapter.test.ts.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,9 @@ exports[`execute computePrice endpoint should return success for legacy division
174174
"data": {
175175
"operand1Result": "20",
176176
"operand2Result": "7.5",
177-
"result": "2.6666666666666666666666666666666666666666666666667",
177+
"result": "2.6666666666666666667",
178178
},
179-
"result": "2.6666666666666666666666666666666666666666666666667",
179+
"result": "2.6666666666666666667",
180180
"statusCode": 200,
181181
"timestamps": {
182182
"providerDataReceivedUnixMs": 978347471111,

0 commit comments

Comments
 (0)