Skip to content
This repository was archived by the owner on Jan 18, 2023. It is now read-only.

Commit a954660

Browse files
authored
Merge pull request #376 from SetProtocol/richard/add-manager-type
Add asset pair manager type and bump package
2 parents 6298a17 + c11809c commit a954660

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "setprotocol.js",
3-
"version": "1.2.8-rc8",
3+
"version": "1.2.8-rc9",
44
"description": "A javascript library for interacting with the Set protocol",
55
"keywords": [
66
"setProtocol.js",

src/api/RebalancingManagerAPI.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ export class RebalancingManagerAPI {
166166
macoManager: Address,
167167
txOpts: Tx
168168
): Promise<string> {
169-
if (managerType == ManagerType.PAIR) {
169+
if (managerType == ManagerType.PAIR || managerType == ManagerType.PAIRV2) {
170170
await this.assertAssetPairInitialPropose(macoManager);
171171
} else {
172172
await this.assertInitialPropose(managerType, macoManager);
@@ -182,7 +182,7 @@ export class RebalancingManagerAPI {
182182
macoManager: Address,
183183
txOpts: Tx
184184
): Promise<string> {
185-
if (managerType == ManagerType.PAIR) {
185+
if (managerType == ManagerType.PAIR || managerType == ManagerType.PAIRV2) {
186186
await this.assertAssetPairConfirmPropose(macoManager);
187187
} else {
188188
await this.assertConfirmPropose(managerType, macoManager);
@@ -347,7 +347,7 @@ export class RebalancingManagerAPI {
347347
): Promise<BigNumber> {
348348
this.assert.schema.isValidAddress('manager', manager);
349349

350-
if (managerType == ManagerType.PAIR) {
350+
if (managerType == ManagerType.PAIR || managerType == ManagerType.PAIRV2) {
351351
return await this.assetPairManager.recentInitialProposeTimestamp(manager);
352352
}
353353

src/types/common.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ export const ManagerType = {
8484
MACO: new BigNumber(3),
8585
MACOV2: new BigNumber(4),
8686
PAIR: new BigNumber(5),
87+
TRADING_POOL: new BigNumber(6),
88+
PAIRV2: new BigNumber(7),
8789
};
8890

8991
export interface SetUnits {

0 commit comments

Comments
 (0)