Skip to content

Commit

Permalink
Merge pull request #202 from balancer-labs/develop
Browse files Browse the repository at this point in the history
Release v0.1.36
  • Loading branch information
johngrantuk authored Nov 16, 2022
2 parents 49ad96d + 39187a3 commit 466ea88
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 10 deletions.
4 changes: 2 additions & 2 deletions balancer-js/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@balancer-labs/sdk",
"version": "0.1.35",
"version": "0.1.36",
"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",
Expand Down Expand Up @@ -89,7 +89,7 @@
"typescript": "^4.0.2"
},
"dependencies": {
"@balancer-labs/sor": "^4.0.1-beta.10",
"@balancer-labs/sor": "^4.0.1-beta.11",
"@balancer-labs/typechain": "^1.0.0",
"axios": "^0.24.0",
"graphql": "^15.6.1",
Expand Down
8 changes: 6 additions & 2 deletions balancer-js/src/modules/data/pool/subgraph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export class PoolsSubgraphRepository
private async fetchDefault(): Promise<Pool[]> {
console.time('fetching pools');
const { pool0, pool1000, pool2000 } = await this.client.AllPools({
where: { swapEnabled: true, totalShares_gt: '0' },
where: { swapEnabled: true, totalShares_gt: '0.000000000001' },
orderBy: Pool_OrderBy.TotalLiquidity,
orderDirection: OrderDirection.Desc,
block: await this.block(),
Expand Down Expand Up @@ -122,7 +122,11 @@ export class PoolsSubgraphRepository
return (await this.pools).find((p) => p[param] === value);
}
const { pools } = await this.client.Pools({
where: { [param]: value, swapEnabled: true, totalShares_gt: '0' },
where: {
[param]: value,
swapEnabled: true,
totalShares_gt: '0.000000000001',
},
block: await this.block(),
});
const poolsTab: Pool[] = pools.map(this.mapType.bind(this));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export class SubgraphPoolDataService implements PoolDataService {

private async getLinearPools() {
const { pool0, pool1000, pool2000 } = await this.client.AllPools({
where: { swapEnabled: true, totalShares_gt: '0' },
where: { swapEnabled: true, totalShares_gt: '0.000000000001' },
orderBy: Pool_OrderBy.TotalLiquidity,
orderDirection: OrderDirection.Desc,
});
Expand All @@ -83,7 +83,7 @@ export class SubgraphPoolDataService implements PoolDataService {

private async getNonLinearPools() {
const { pools } = await this.client.PoolsWithoutLinear({
where: { swapEnabled: true, totalShares_gt: '0' },
where: { swapEnabled: true, totalShares_gt: '0.000000000001' },
orderBy: Pool_OrderBy.TotalLiquidity,
orderDirection: OrderDirection.Desc,
first: 1000,
Expand Down
2 changes: 2 additions & 0 deletions balancer-js/src/test/factories/sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ const poolFactory = Factory.define<Pool>(({ params, afterBuild }) => {
address: '0xa6f548df93de924d73be7d25dc02554c6bd66db5',
chainId: 1,
poolType: PoolType.Weighted,
poolTypeVersion: 1,
swapFee: '0.001',
swapEnabled: true,
protocolYieldFeeCache: '0',
tokens,
tokensList: [],
totalWeight: '1',
Expand Down
8 changes: 4 additions & 4 deletions balancer-js/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -483,10 +483,10 @@
"@babel/helper-validator-identifier" "^7.18.6"
to-fast-properties "^2.0.0"

"@balancer-labs/sor@^4.0.1-beta.10":
version "4.0.1-beta.10"
resolved "https://registry.yarnpkg.com/@balancer-labs/sor/-/sor-4.0.1-beta.10.tgz#5d46c8e29fcdc4838fb455ee9b228c03639ee199"
integrity sha512-nf+r/SuUG1Z9tkShM8NYvL+bwPTV0MdkTsis9JfDS9nbjER12ho/whLzhEupOMcetnIiXNxB0KwUUIbSpyzEGg==
"@balancer-labs/sor@^4.0.1-beta.11":
version "4.0.1-beta.11"
resolved "https://registry.yarnpkg.com/@balancer-labs/sor/-/sor-4.0.1-beta.11.tgz#3edbccb307496f853911ad1602a015a80c15c72a"
integrity sha512-5qlbMXQn+YWH/ILBMuLW96mazNhc88aoh6spIRfJwBwhipsyMuNKIBXmQRLW3krY3FkYpkC/phe6E4FWwp0wAQ==
dependencies:
isomorphic-fetch "^2.2.1"

Expand Down

0 comments on commit 466ea88

Please sign in to comment.