@tokemak/queries 0.0.18 → 0.0.19
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/index.cjs +6 -2
- package/dist/index.js +6 -2
- package/package.json +5 -5
package/dist/index.cjs
CHANGED
|
@@ -8864,6 +8864,7 @@ var getAutopoolHistory = async (autopool) => {
|
|
|
8864
8864
|
};
|
|
8865
8865
|
|
|
8866
8866
|
// functions/getAutopoolUserHistory.ts
|
|
8867
|
+
var import_utils57 = require("@tokemak/utils");
|
|
8867
8868
|
var getAutopoolUserHistory = async ({
|
|
8868
8869
|
userAddress,
|
|
8869
8870
|
autopool,
|
|
@@ -8913,8 +8914,11 @@ var getAutopoolUserHistory = async ({
|
|
|
8913
8914
|
const matchingAutopoolDayData = autopoolDayData.find(
|
|
8914
8915
|
(autopoolDay) => autopoolDay.date.toDateString() === userVaultDayData.date.toDateString()
|
|
8915
8916
|
);
|
|
8916
|
-
const userPortionOfVault = userVaultDayData.totalShares / matchingAutopoolDayData?.totalSupply;
|
|
8917
|
-
const userNav = userPortionOfVault *
|
|
8917
|
+
const userPortionOfVault = (0, import_utils57.formatEtherNum)(userVaultDayData.totalShares) / (0, import_utils57.formatEtherNum)(matchingAutopoolDayData?.totalSupply);
|
|
8918
|
+
const userNav = userPortionOfVault * (0, import_utils57.formatUnitsNum)(
|
|
8919
|
+
BigInt(matchingAutopoolDayData?.nav || 0),
|
|
8920
|
+
autopool?.baseAsset.decimals
|
|
8921
|
+
);
|
|
8918
8922
|
const eventsForDay = userActivity.events?.filter((event) => {
|
|
8919
8923
|
const eventDate = new Date(Number(event.timestamp) * 1e3);
|
|
8920
8924
|
const windowStart = new Date(
|
package/dist/index.js
CHANGED
|
@@ -8827,6 +8827,7 @@ var getAutopoolHistory = async (autopool) => {
|
|
|
8827
8827
|
};
|
|
8828
8828
|
|
|
8829
8829
|
// functions/getAutopoolUserHistory.ts
|
|
8830
|
+
import { formatEtherNum as formatEtherNum15, formatUnitsNum as formatUnitsNum7 } from "@tokemak/utils";
|
|
8830
8831
|
var getAutopoolUserHistory = async ({
|
|
8831
8832
|
userAddress,
|
|
8832
8833
|
autopool,
|
|
@@ -8876,8 +8877,11 @@ var getAutopoolUserHistory = async ({
|
|
|
8876
8877
|
const matchingAutopoolDayData = autopoolDayData.find(
|
|
8877
8878
|
(autopoolDay) => autopoolDay.date.toDateString() === userVaultDayData.date.toDateString()
|
|
8878
8879
|
);
|
|
8879
|
-
const userPortionOfVault = userVaultDayData.totalShares / matchingAutopoolDayData?.totalSupply;
|
|
8880
|
-
const userNav = userPortionOfVault *
|
|
8880
|
+
const userPortionOfVault = formatEtherNum15(userVaultDayData.totalShares) / formatEtherNum15(matchingAutopoolDayData?.totalSupply);
|
|
8881
|
+
const userNav = userPortionOfVault * formatUnitsNum7(
|
|
8882
|
+
BigInt(matchingAutopoolDayData?.nav || 0),
|
|
8883
|
+
autopool?.baseAsset.decimals
|
|
8884
|
+
);
|
|
8881
8885
|
const eventsForDay = userActivity.events?.filter((event) => {
|
|
8882
8886
|
const eventDate = new Date(Number(event.timestamp) * 1e3);
|
|
8883
8887
|
const windowStart = new Date(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tokemak/queries",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.19",
|
|
4
4
|
"main": "./dist/index.cjs",
|
|
5
5
|
"module": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -25,12 +25,12 @@
|
|
|
25
25
|
"viem": "2.x",
|
|
26
26
|
"@wagmi/core": "2.x",
|
|
27
27
|
"wagmi": "2.x",
|
|
28
|
-
"@tokemak/abis": "0.0.3",
|
|
29
|
-
"@tokemak/constants": "0.0.4",
|
|
30
|
-
"@tokemak/graph-cli": "0.0.10",
|
|
31
28
|
"@tokemak/config": "0.0.4",
|
|
29
|
+
"@tokemak/constants": "0.0.4",
|
|
30
|
+
"@tokemak/abis": "0.0.3",
|
|
32
31
|
"@tokemak/tokenlist": "0.0.3",
|
|
33
|
-
"@tokemak/utils": "0.0.5"
|
|
32
|
+
"@tokemak/utils": "0.0.5",
|
|
33
|
+
"@tokemak/graph-cli": "0.0.10"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
36
36
|
"build": "tsup",
|