From 38895fcf621c3fd6ce8dc8081800aef8f48af89d Mon Sep 17 00:00:00 2001 From: "Miquel A. Cabot" Date: Mon, 6 Jun 2022 09:09:55 +0200 Subject: [PATCH] Move MAX_UINT_256 constant to Constants file --- src/contracts/pools/Pool.ts | 14 ++++++-------- src/utils/Constants.ts | 2 ++ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/contracts/pools/Pool.ts b/src/contracts/pools/Pool.ts index 5f5dd1ee..381912fd 100644 --- a/src/contracts/pools/Pool.ts +++ b/src/contracts/pools/Pool.ts @@ -16,7 +16,8 @@ import { getMaxAddLiquidity, getMaxRemoveLiquidity, getMaxSwapExactIn, - getMaxSwapExactOut + getMaxSwapExactOut, + MAX_UINT_256 } from '../../utils' import { CurrentFees, @@ -27,9 +28,6 @@ import { } from '../../@types' import { Config, ConfigHelper } from '../../config' -const MaxUint256 = - '115792089237316195423570985008687907853269984665640564039457584007913129639934' - /** * Provides an interface to Ocean friendly fork from Balancer BPool */ @@ -803,7 +801,7 @@ export class Pool { await this.getBaseToken(poolAddress), amountsInOutMaxFee.maxPrice ) - : MaxUint256 + : MAX_UINT_256 return estimateGas( address, @@ -868,7 +866,7 @@ export class Pool { await this.getBaseToken(poolAddress), amountsInOutMaxFee.maxPrice ) - : MaxUint256 + : MAX_UINT_256 const estGas = await estimateGas( address, @@ -954,7 +952,7 @@ export class Pool { await this.getBaseToken(poolAddress), amountsInOutMaxFee.maxPrice ) - : MaxUint256 + : MAX_UINT_256 return estimateGas( address, @@ -1015,7 +1013,7 @@ export class Pool { await this.getBaseToken(poolAddress), amountsInOutMaxFee.maxPrice ) - : MaxUint256 + : MAX_UINT_256 const estGas = await estimateGas( account, diff --git a/src/utils/Constants.ts b/src/utils/Constants.ts index 7295e074..2b97edbf 100644 --- a/src/utils/Constants.ts +++ b/src/utils/Constants.ts @@ -1,2 +1,4 @@ export const ZERO_ADDRESS = '0x0000000000000000000000000000000000000000' export const GASLIMIT_DEFAULT = 1000000 +export const MAX_UINT_256 = + '115792089237316195423570985008687907853269984665640564039457584007913129639934'