timelock-sdk 0.0.40 → 0.0.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client.cjs +1 -0
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.ts +56 -56
- package/dist/client.js +1 -0
- package/dist/client.js.map +1 -1
- package/dist/{index-B20z73_3.d.ts → index-CRhFaRiq.d.ts} +92 -92
- package/dist/package.d.ts +1 -1
- package/package.json +1 -1
package/dist/client.cjs
CHANGED
|
@@ -553,6 +553,7 @@ const getResolutionConfig = (resolution) => {
|
|
|
553
553
|
const getPriceHistory = async (poolAddress, resolution, startTimestamp, endTimestamp) => {
|
|
554
554
|
const network = "monad-testnet";
|
|
555
555
|
const { timeframe, aggregate, seconds } = getResolutionConfig(resolution);
|
|
556
|
+
if (endTimestamp.getTime() > Date.now()) endTimestamp = new Date(Date.now());
|
|
556
557
|
const startSecs = Math.floor(startTimestamp.getTime() / 1e3);
|
|
557
558
|
const endSecs = Math.floor(endTimestamp.getTime() / 1e3);
|
|
558
559
|
const diffSeconds = endSecs - startSecs;
|