Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Zapper-fi/studio
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.11.1
Choose a base ref
...
head repository: Zapper-fi/studio
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.11.2
Choose a head ref
  • 2 commits
  • 4 files changed
  • 2 contributors

Commits on Apr 29, 2022

  1. Copy the full SHA
    be0e820 View commit details
  2. Copy the full SHA
    a0a86db View commit details
Showing with 13 additions and 5 deletions.
  1. +7 −0 CHANGELOG.md
  2. +1 −1 package.json
  3. +4 −4 src/apps/balancer-v2/helpers/balancer-v2.pool.token-helper.ts
  4. +1 −0 src/apps/balancer-v2/index.ts
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -4,6 +4,13 @@

[1]: https://www.npmjs.com/package/@zapper-fi/studio?activeTab=versions

### [0.11.2](https://github.com/Zapper-fi/studio/compare/v0.11.1...v0.11.2) (2022-04-29)


### Bug Fixes

* **balancer:** Add missing exports for zapper api ([#329](https://github.com/Zapper-fi/studio/issues/329)) ([be0e820](https://github.com/Zapper-fi/studio/commit/be0e820b46bc43bfe521275ca78d05f25bc87002))

### [0.11.1](https://github.com/Zapper-fi/studio/compare/v0.11.0...v0.11.1) (2022-04-29)


2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@zapper-fi/studio",
"version": "0.11.1",
"version": "0.11.2",
"description": "Community build apps for Zapper.fi",
"license": "MIT",
"main": "dist/lib/index.js",
8 changes: 4 additions & 4 deletions src/apps/balancer-v2/helpers/balancer-v2.pool.token-helper.ts
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@ import { Network } from '~types/network.interface';

import { BalancerV2ContractFactory } from '../contracts';

export enum PoolLabelStrategy {
export enum BalancerV2PoolLabelStrategy {
TOKEN_SYMBOLS = 'token-symbols',
POOL_NAME = 'pool-name',
}
@@ -35,7 +35,7 @@ type GetBalancerV2PoolTokensParams = {
appId: string;
network: Network;
}) => Promise<{ address: string; volume: number }[]>;
resolvePoolLabelStrategy?: () => PoolLabelStrategy;
resolvePoolLabelStrategy?: () => BalancerV2PoolLabelStrategy;
};

@Injectable()
@@ -53,7 +53,7 @@ export class BalancerV2PoolTokensHelper {
vaultAddress,
minLiquidity = 0,
resolvePoolTokenAddresses,
resolvePoolLabelStrategy = () => PoolLabelStrategy.TOKEN_SYMBOLS,
resolvePoolLabelStrategy = () => BalancerV2PoolLabelStrategy.TOKEN_SYMBOLS,
}: GetBalancerV2PoolTokensParams) {
const multicall = this.appToolkit.getMulticall(network);
const prices = await this.appToolkit.getBaseTokenPrices(network);
@@ -109,7 +109,7 @@ export class BalancerV2PoolTokensHelper {
// Display Props
const labelStrategy = resolvePoolLabelStrategy();
const label =
labelStrategy === PoolLabelStrategy.POOL_NAME
labelStrategy === BalancerV2PoolLabelStrategy.POOL_NAME
? await multicall.wrap(poolContract).name()
: tokens.map(v => v.symbol).join(' / ');
const secondaryLabel = reservePercentages.map(p => `${Math.round(p * 100)}%`).join(' / ');
1 change: 1 addition & 0 deletions src/apps/balancer-v2/index.ts
Original file line number Diff line number Diff line change
@@ -3,3 +3,4 @@ export { BalancerV2ContractFactory } from './contracts';

// Helpers
export { BalancerV2SpotPriceHelper } from './helpers/balancer-v2.spot-price.helper';
export { BalancerV2PoolLabelStrategy, BalancerV2PoolTokensHelper } from './helpers/balancer-v2.pool.token-helper';