mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-03-25 07:07:39 +03:00
Bump
This commit is contained in:
@@ -90,7 +90,7 @@ export default class FarmingManager {
|
||||
|
||||
const poolsConfig = await simpleFetch(this.orionUnit.orionBlockchain.getPoolsConfig)();
|
||||
const pool = poolsConfig.pools[poolName];
|
||||
if (pool === undefined) throw new Error(`Pool ${poolName} not found`);
|
||||
if (!pool) throw new Error(`Pool ${poolName} not found`);
|
||||
|
||||
const pairContract = IUniswapV2Pair__factory
|
||||
.connect(pool.lpTokenAddress, this.orionUnit.provider);
|
||||
@@ -183,7 +183,7 @@ export default class FarmingManager {
|
||||
|
||||
if (assetAIsNativeCurrency || assetBIsNativeCurrency) {
|
||||
const contractBalance = balances[nativeCryptocurrency]?.exchange;
|
||||
if (contractBalance === undefined) throw new Error(`No balance for '${nativeCryptocurrency}'`);
|
||||
if (!contractBalance) throw new Error(`No balance for '${nativeCryptocurrency}'`);
|
||||
const nativeAssetAmount = assetBIsNativeCurrency ? assetBAmount : assetAAmount;
|
||||
|
||||
if (nativeAssetAmount.gt(contractBalance)) {
|
||||
@@ -242,7 +242,7 @@ export default class FarmingManager {
|
||||
|
||||
const poolsConfig = await simpleFetch(this.orionUnit.orionBlockchain.getPoolsConfig)();
|
||||
const pool = poolsConfig.pools[poolName];
|
||||
if (pool === undefined) throw new Error(`Pool ${poolName} not found`);
|
||||
if (!pool) throw new Error(`Pool ${poolName} not found`);
|
||||
|
||||
const walletAddress = await signer.getAddress();
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ export default class OrionUnit {
|
||||
constructor(config: VerboseOrionUnitConfig) {
|
||||
this.config = config;
|
||||
const chainInfo = chains[config.chainId];
|
||||
if (chainInfo === undefined) throw new Error('Chain info is required');
|
||||
if (!chainInfo) throw new Error('Chain info is required');
|
||||
|
||||
// if ('env' in config)
|
||||
// this.env = config.env;
|
||||
|
||||
Reference in New Issue
Block a user