From 7c205094848971d9034fd9cee71daa45895d34e9 Mon Sep 17 00:00:00 2001 From: Marton Lederer Date: Sun, 1 Jun 2025 09:31:42 +0200 Subject: [PATCH 1/4] feat: start date for earnings --- src/functions/lend/getEarnings.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/functions/lend/getEarnings.ts b/src/functions/lend/getEarnings.ts index 6a197881..fb2b90ce 100644 --- a/src/functions/lend/getEarnings.ts +++ b/src/functions/lend/getEarnings.ts @@ -12,6 +12,7 @@ export interface GetEarnings { export interface GetEarningsRes { base: bigint; profit: bigint; + startDate?: number; } export async function getEarnings( @@ -95,8 +96,12 @@ export async function getEarnings( // they have deposited (without the interest!!) const base = sumDeposited - sumWithdrawn; + // the first mint date + const startDate = lendConfirmations?.edges?.[0]?.node?.block?.timestamp; + return { base, - profit: collateralization - base + profit: collateralization - base, + startDate }; } From a38d8392216b938fef2b5967871b477291361b8e Mon Sep 17 00:00:00 2001 From: Marton Lederer Date: Sun, 1 Jun 2025 09:35:17 +0200 Subject: [PATCH 2/4] fix: first date --- src/functions/lend/getEarnings.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/functions/lend/getEarnings.ts b/src/functions/lend/getEarnings.ts index fb2b90ce..290ca973 100644 --- a/src/functions/lend/getEarnings.ts +++ b/src/functions/lend/getEarnings.ts @@ -97,7 +97,7 @@ export async function getEarnings( const base = sumDeposited - sumWithdrawn; // the first mint date - const startDate = lendConfirmations?.edges?.[0]?.node?.block?.timestamp; + const startDate = lendConfirmations?.edges?.[lendConfirmations?.edges?.length - 1 || 0]?.node?.block?.timestamp; return { base, From 96478bf4c46add98c251826f5cf74a6c7889b045 Mon Sep 17 00:00:00 2001 From: Marton Lederer Date: Sun, 1 Jun 2025 09:35:32 +0200 Subject: [PATCH 3/4] feat: increase version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f16409a8..a5f0184c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "liquidops", - "version": "1.1.3", + "version": "1.1.31", "author": "Lorimer Jenkins , Marton Lederer ", "repository": { "type": "git", From 7f225199671924701f93ff0bdaf1ca9e1258c9f5 Mon Sep 17 00:00:00 2001 From: Marton Lederer Date: Wed, 11 Jun 2025 12:02:28 +0200 Subject: [PATCH 4/4] chore: 1.2.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1f876750..bbacf446 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "liquidops", - "version": "1.2.1", + "version": "1.2.2", "author": "Lorimer Jenkins , Marton Lederer ", "repository": { "type": "git",