From 8ac5e049dcf86b3913d6811072f065ffd2294af6 Mon Sep 17 00:00:00 2001 From: Daniel Schiavini Date: Wed, 16 Oct 2024 13:49:41 +0200 Subject: [PATCH 1/3] chore: add lint to pipeline --- .github/workflows/lint.yml | 15 +++++++++++++++ package.json | 3 ++- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..4169a71 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,15 @@ +name: Lint +on: + push: + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: '20' + - run: npm install + - run: npm run build + - run: npm run lint diff --git a/package.json b/package.json index 3dabbaf..ae0b69b 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,8 @@ "url": "https://github.com/curvefi/curve-lending-js/issues" }, "scripts": { - "build": "rm -rf lib && tsc -p tsconfig.build.json" + "build": "rm -rf lib && tsc -p tsconfig.build.json", + "lint": "eslint src --ext .ts" }, "type": "module", "devDependencies": { From 260e75cfde5edf2bf8eaba35ea2c5f710c3a096c Mon Sep 17 00:00:00 2001 From: Daniel Schiavini Date: Mon, 21 Oct 2024 16:21:11 +0200 Subject: [PATCH 2/3] fix: lint --- src/index.ts | 2 +- src/interfaces.ts | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/index.ts b/src/index.ts index 31dfea5..02fa635 100644 --- a/src/index.ts +++ b/src/index.ts @@ -45,7 +45,7 @@ import { async function init ( providerType: 'JsonRpc' | 'Web3' | 'Infura' | 'Alchemy', providerSettings: { url?: string, privateKey?: string, batchMaxCount? : number } | { externalProvider: ethers.Eip1193Provider } | { network?: Networkish, apiKey?: string }, - options: { gasPrice?: number, maxFeePerGas?: number, maxPriorityFeePerGas?: number, chainId?: number } = {}, + options: { gasPrice?: number, maxFeePerGas?: number, maxPriorityFeePerGas?: number, chainId?: number } = {} ): Promise { await _lending.init(providerType, providerSettings, options); // @ts-ignore diff --git a/src/interfaces.ts b/src/interfaces.ts index 7a15a6f..8d3d7fb 100644 --- a/src/interfaces.ts +++ b/src/interfaces.ts @@ -151,11 +151,6 @@ interface Rates { lendApyPcent: number; } -interface Assets { - borrowed: AssetDetail; - collateral: AssetDetail; -} - interface AssetDetail { symbol: string; decimals: number; @@ -164,6 +159,11 @@ interface AssetDetail { usdPrice: number; } +interface Assets { + borrowed: AssetDetail; + collateral: AssetDetail; +} + interface VaultShares { pricePerShare: number; totalShares: number; From f987634186400ea0b9d6be4c024a3c12ef2dba2b Mon Sep 17 00:00:00 2001 From: Daniel Schiavini Date: Tue, 21 Jan 2025 15:36:54 +0100 Subject: [PATCH 3/3] build: v2.4.1. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 870834f..f37293e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@curvefi/lending-api", - "version": "2.4.0", + "version": "2.4.1", "description": "JavaScript library for Curve Lending", "main": "lib/index.js", "author": "Macket",