From b2cbc1d26a6bc1f91b2c4f5eab7788f2e98c2205 Mon Sep 17 00:00:00 2001 From: bronco Date: Thu, 6 Oct 2022 22:16:56 +0200 Subject: [PATCH 1/2] version bump --- balancer-js/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/balancer-js/package.json b/balancer-js/package.json index bb9aa2923..1691b082e 100644 --- a/balancer-js/package.json +++ b/balancer-js/package.json @@ -1,6 +1,6 @@ { "name": "@balancer-labs/sdk", - "version": "0.1.26", + "version": "0.1.27", "description": "JavaScript SDK for interacting with the Balancer Protocol V2", "license": "GPL-3.0-only", "homepage": "https://github.com/balancer-labs/balancer-sdk/balancer-js#readme", From 1f02c346a64d0de8fcb2c0209ca718b7e96b0e2d Mon Sep 17 00:00:00 2001 From: bronco Date: Thu, 6 Oct 2022 22:23:04 +0200 Subject: [PATCH 2/2] aave-rates fix for polygon --- balancer-js/src/modules/data/token-prices/aave-rates.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/balancer-js/src/modules/data/token-prices/aave-rates.ts b/balancer-js/src/modules/data/token-prices/aave-rates.ts index bd449ae8f..25329bae9 100644 --- a/balancer-js/src/modules/data/token-prices/aave-rates.ts +++ b/balancer-js/src/modules/data/token-prices/aave-rates.ts @@ -27,7 +27,7 @@ export class AaveRates { const [, res] = await this.multicall.aggregate(payload); const rates = addresses.reduce((p: { [key: string]: number }, a, i) => { - p[a] ||= parseFloat(formatUnits(res[i], 27)); + p[a] ||= res[i] == '0x' ? 0 : parseFloat(formatUnits(res[i], 27)); return p; }, {}); console.timeEnd('Fetching aave rates');