Skip to content

Commit 8e6c4d4

Browse files
committed
fix: method visibility
1 parent b3783d3 commit 8e6c4d4

File tree

1 file changed

+13
-16
lines changed

1 file changed

+13
-16
lines changed

src/sdk/pools/PoolService.ts

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,14 @@ export class PoolService extends SDKConstruct implements IPoolsService {
9494
if (this.sdk.tokensMeta.isKYCUnderlying(underlying)) {
9595
switch (underlying.contractType) {
9696
case KYC_UNDERLYING_DEFAULT:
97-
return this.depositTokensIn(pool, false);
97+
return this.#depositTokensIn(pool, false);
9898
case KYC_UNDERLYING_ON_DEMAND:
9999
return [underlying.asset];
100100
}
101101
}
102102

103103
// classic pool, allow direct deposit of underlying and via zappers
104-
return this.depositTokensIn(pool, true);
104+
return this.#depositTokensIn(pool, true);
105105
}
106106

107107
public getDepositTokensOut(pool: Address, tokenIn: Address): Address[] {
@@ -110,14 +110,14 @@ export class PoolService extends SDKConstruct implements IPoolsService {
110110
if (this.sdk.tokensMeta.isKYCUnderlying(underlying)) {
111111
switch (underlying.contractType) {
112112
case KYC_UNDERLYING_DEFAULT:
113-
return this.depositTokensOut(pool, tokenIn, false);
113+
return this.#depositTokensOut(pool, tokenIn, false);
114114
case KYC_UNDERLYING_ON_DEMAND:
115115
return [];
116116
}
117117
}
118118

119119
// classic pool, allow direct deposit of underlying and via zappers
120-
return this.depositTokensOut(pool, tokenIn, true);
120+
return this.#depositTokensOut(pool, tokenIn, true);
121121
}
122122

123123
public getDepositMetadata(
@@ -130,7 +130,7 @@ export class PoolService extends SDKConstruct implements IPoolsService {
130130
if (this.sdk.tokensMeta.isKYCUnderlying(underlying)) {
131131
switch (underlying.contractType) {
132132
case KYC_UNDERLYING_DEFAULT: {
133-
return this.depositMetadata(pool, tokenIn, tokenOut, false);
133+
return this.#depositMetadata(pool, tokenIn, tokenOut, false);
134134
}
135135
case KYC_UNDERLYING_ON_DEMAND:
136136
return {
@@ -141,7 +141,7 @@ export class PoolService extends SDKConstruct implements IPoolsService {
141141
}
142142
}
143143

144-
return this.depositMetadata(pool, tokenIn, tokenOut, true);
144+
return this.#depositMetadata(pool, tokenIn, tokenOut, true);
145145
}
146146

147147
public addLiquidity(props: AddLiquidityProps): PoolServiceCall | undefined {
@@ -243,10 +243,7 @@ export class PoolService extends SDKConstruct implements IPoolsService {
243243
};
244244
}
245245

246-
protected depositTokensIn(
247-
poolAddr: Address,
248-
allowDirectDeposit: boolean,
249-
): Address[] {
246+
#depositTokensIn(poolAddr: Address, allowDirectDeposit: boolean): Address[] {
250247
const { pool } = this.sdk.marketRegister.findByPool(poolAddr);
251248
const result: AddressSet = new AddressSet();
252249

@@ -271,7 +268,7 @@ export class PoolService extends SDKConstruct implements IPoolsService {
271268
return result.asArray();
272269
}
273270

274-
protected depositTokensOut(
271+
#depositTokensOut(
275272
poolAddr: Address,
276273
tokenIn: Address,
277274
allowDirectDeposit: boolean,
@@ -301,7 +298,7 @@ export class PoolService extends SDKConstruct implements IPoolsService {
301298
return result.asArray();
302299
}
303300

304-
protected depositMetadata(
301+
#depositMetadata(
305302
poolAddr: Address,
306303
tokenIn: Address,
307304
tokenOut?: Address,
@@ -312,7 +309,7 @@ export class PoolService extends SDKConstruct implements IPoolsService {
312309
}
313310
const { pool } = this.sdk.marketRegister.findByPool(poolAddr);
314311

315-
const zapper = this.getZapper(poolAddr, tokenIn, tokenOut);
312+
const zapper = this.#getZapper(poolAddr, tokenIn, tokenOut);
316313
if (!zapper && !allowDirectDeposit) {
317314
throw new Error(
318315
`No zapper found for tokenIn ${this.labelAddress(tokenIn)} and tokenOut ${this.labelAddress(tokenOut)} on pool ${this.labelAddress(poolAddr)}`,
@@ -329,7 +326,7 @@ export class PoolService extends SDKConstruct implements IPoolsService {
329326
};
330327
}
331328

332-
protected getZapper(
329+
#getZapper(
333330
pool: Address,
334331
tokenIn: Address,
335332
tokenOut: Address,
@@ -341,12 +338,12 @@ export class PoolService extends SDKConstruct implements IPoolsService {
341338
);
342339
}
343340

344-
protected mustGetZapper(
341+
#mustGetZapper(
345342
poolAddr: Address,
346343
tokenIn: Address,
347344
tokenOut: Address,
348345
): ZapperData {
349-
const result = this.getZapper(poolAddr, tokenIn, tokenOut);
346+
const result = this.#getZapper(poolAddr, tokenIn, tokenOut);
350347
if (!result) {
351348
throw new Error(
352349
`No zapper found for tokenIn ${this.labelAddress(tokenIn)} and tokenOut ${this.labelAddress(tokenOut)} on pool ${this.labelAddress(poolAddr)}`,

0 commit comments

Comments
 (0)