Skip to content
This repository has been archived by the owner on Apr 25, 2024. It is now read-only.

Commit

Permalink
back down to jsbi 3.1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
zhongeric committed Mar 20, 2024
1 parent 265f327 commit 08d841a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
10 changes: 8 additions & 2 deletions src/entities/protocols/uniswap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@ import {
partitionMixedRouteByProtocol,
} from '@uniswap/router-sdk'
import { Permit2Permit } from '../../utils/inputTokens'
import { Currency, TradeType, CurrencyAmount, Percent } from '@uniswap/sdk-core'
import { Currency, TradeType, CurrencyAmount, Percent, Fraction } from '@uniswap/sdk-core'
import { Command, RouterTradeType, TradeConfig } from '../Command'
import { SENDER_AS_RECIPIENT, ROUTER_AS_RECIPIENT, CONTRACT_BALANCE, ETH_ADDRESS } from '../../utils/constants'
import { encodeFeeBips } from '../../utils/numbers'
import { BigNumber, BigNumberish } from 'ethers'
import JSBI from 'jsbi'

export type FlatFeeOptions = {
amount: BigNumberish
Expand Down Expand Up @@ -177,11 +178,16 @@ function addV2Swap<TInput extends Currency, TOutput extends Currency>(
tradeType
)

const ZERO = JSBI.BigInt(0);
console.log(typeof ZERO, ZERO instanceof JSBI)
console.log(new Fraction(ZERO) instanceof Fraction)


console.log(
'ur-sdk',
options.slippageTolerance.toFixed(),
options.slippageTolerance.isPercent,
options.slippageTolerance
options.slippageTolerance.lessThan(new Fraction(ZERO))
)

if (tradeType == TradeType.EXACT_INPUT) {
Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5728,9 +5728,9 @@ js-yaml@^3.13.1:
esprima "^4.0.0"

jsbi@^3.1.4:
version "3.2.5"
resolved "https://registry.npmjs.org/jsbi/-/jsbi-3.2.5.tgz"
integrity sha512-aBE4n43IPvjaddScbvWRA2YlTzKEynHzu7MqOyTipdHucf/VxS63ViCjxYRg86M8Rxwbt/GfzHl1kKERkt45fQ==
version "3.1.4"
resolved "https://registry.yarnpkg.com/jsbi/-/jsbi-3.1.4.tgz#9654dd02207a66a4911b4e4bb74265bc2cbc9dd0"
integrity sha512-52QRRFSsi9impURE8ZUbzAMCLjPm4THO7H2fcuIvaaeFTbSysvkodbQQXIVsNgq/ypDbq6dJiuGKL0vZ/i9hUg==

jsbn@~0.1.0:
version "0.1.1"
Expand Down

0 comments on commit 08d841a

Please sign in to comment.