mirror of
https://github.com/oceanprotocol/ocean.js.git
synced 2024-11-26 20:39:05 +01:00
parent
f96ccb0c56
commit
548f31ced3
1931
package-lock.json
generated
1931
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -1019,7 +1019,7 @@ export class Pool {
|
||||
)
|
||||
let result = null
|
||||
|
||||
const maxSwap = await getMaxSwapExactOut(this, poolAddress, tokenInOutMarket.tokenIn)
|
||||
const maxSwap = await getMaxSwapExactOut(this, poolAddress, tokenInOutMarket.tokenOut)
|
||||
if (new Decimal(amountsInOutMaxFee.tokenAmountOut).greaterThan(maxSwap)) {
|
||||
throw new Error(`tokenAmountOut is greater than ${maxSwap.toString()}`)
|
||||
}
|
||||
@ -1519,7 +1519,7 @@ export class Pool {
|
||||
this.config
|
||||
)
|
||||
|
||||
const maxSwap = await getMaxSwapExactOut(this, poolAddress, tokenIn)
|
||||
const maxSwap = await getMaxSwapExactOut(this, poolAddress, tokenOut)
|
||||
|
||||
if (new Decimal(tokenAmountOut).greaterThan(maxSwap)) {
|
||||
throw new Error(`tokenAmountOut is greater than ${maxSwap.toString()}`)
|
||||
|
@ -5,7 +5,7 @@ import { minAbi } from './minAbi'
|
||||
import LoggerInstance from './Logger'
|
||||
import { TransactionReceipt } from 'web3-core'
|
||||
import Web3 from 'web3'
|
||||
import { GASLIMIT_DEFAULT } from '.'
|
||||
import { GASLIMIT_DEFAULT } from './Constants'
|
||||
|
||||
/**
|
||||
* Estimate gas cost for approval function
|
||||
|
Loading…
x
Reference in New Issue
Block a user