Commit 1610356a authored by Vignesh Mohankumar's avatar Vignesh Mohankumar Committed by GitHub

fix: Revert "fix: deep link by swapping sooner after user interaction" (#6092)

Revert "fix: deep link by swapping sooner after user interaction (#6073)"

This reverts commit 3eeb4672.
parent 1b8cee7e
...@@ -28,7 +28,3 @@ export const BLOCKED_PRICE_IMPACT_NON_EXPERT: Percent = new Percent(JSBI.BigInt( ...@@ -28,7 +28,3 @@ export const BLOCKED_PRICE_IMPACT_NON_EXPERT: Percent = new Percent(JSBI.BigInt(
export const ZERO_PERCENT = new Percent('0') export const ZERO_PERCENT = new Percent('0')
export const ONE_HUNDRED_PERCENT = new Percent('1') export const ONE_HUNDRED_PERCENT = new Percent('1')
// gas margin to ensure successful transactions
export const TX_GAS_MARGIN = 0.2
export const NFT_TX_GAS_MARGIN = 0.05
...@@ -3,15 +3,14 @@ import { BigNumber } from '@ethersproject/bignumber' ...@@ -3,15 +3,14 @@ import { BigNumber } from '@ethersproject/bignumber'
import { t } from '@lingui/macro' import { t } from '@lingui/macro'
import { sendAnalyticsEvent } from '@uniswap/analytics' import { sendAnalyticsEvent } from '@uniswap/analytics'
import { SwapEventName } from '@uniswap/analytics-events' import { SwapEventName } from '@uniswap/analytics-events'
import { sendTransaction } from '@uniswap/conedison/provider/index'
import { Trade } from '@uniswap/router-sdk' import { Trade } from '@uniswap/router-sdk'
import { Currency, Percent, TradeType } from '@uniswap/sdk-core' import { Currency, Percent, TradeType } from '@uniswap/sdk-core'
import { SwapRouter, UNIVERSAL_ROUTER_ADDRESS } from '@uniswap/universal-router-sdk' import { SwapRouter, UNIVERSAL_ROUTER_ADDRESS } from '@uniswap/universal-router-sdk'
import { FeeOptions, toHex } from '@uniswap/v3-sdk' import { FeeOptions, toHex } from '@uniswap/v3-sdk'
import { useWeb3React } from '@web3-react/core' import { useWeb3React } from '@web3-react/core'
import { TX_GAS_MARGIN } from 'constants/misc'
import { formatSwapSignedAnalyticsEventProperties } from 'lib/utils/analytics' import { formatSwapSignedAnalyticsEventProperties } from 'lib/utils/analytics'
import { useCallback } from 'react' import { useCallback } from 'react'
import { calculateGasMargin } from 'utils/calculateGasMargin'
import isZero from 'utils/isZero' import isZero from 'utils/isZero'
import { swapErrorToUserReadableMessage } from 'utils/swapErrorToUserReadableMessage' import { swapErrorToUserReadableMessage } from 'utils/swapErrorToUserReadableMessage'
...@@ -53,19 +52,30 @@ export function useUniversalRouterSwapCallback( ...@@ -53,19 +52,30 @@ export function useUniversalRouterSwapCallback(
...(value && !isZero(value) ? { value: toHex(value) } : {}), ...(value && !isZero(value) ? { value: toHex(value) } : {}),
} }
const response = await sendTransaction(provider, tx, TX_GAS_MARGIN).then((response) => { let gasEstimate: BigNumber
sendAnalyticsEvent( try {
SwapEventName.SWAP_SIGNED, gasEstimate = await provider.estimateGas(tx)
formatSwapSignedAnalyticsEventProperties({ trade, txHash: response.hash }) } catch (gasError) {
) console.warn(gasError)
if (tx.data !== response.data) { throw new Error('Your swap is expected to fail')
sendAnalyticsEvent(SwapEventName.SWAP_MODIFIED_IN_WALLET, { txHash: response.hash }) }
throw new InvalidSwapError( const gasLimit = calculateGasMargin(gasEstimate)
t`Your swap was modified through your wallet. If this was a mistake, please cancel immediately or risk losing your funds.` const response = await provider
.getSigner()
.sendTransaction({ ...tx, gasLimit })
.then((response) => {
sendAnalyticsEvent(
SwapEventName.SWAP_SIGNED,
formatSwapSignedAnalyticsEventProperties({ trade, txHash: response.hash })
) )
} if (tx.data !== response.data) {
return response sendAnalyticsEvent(SwapEventName.SWAP_MODIFIED_IN_WALLET, { txHash: response.hash })
}) throw new InvalidSwapError(
t`Your swap was modified through your wallet. If this was a mistake, please cancel immediately or risk losing your funds.`
)
}
return response
})
return response return response
} catch (swapError: unknown) { } catch (swapError: unknown) {
if (swapError instanceof InvalidSwapError) throw swapError if (swapError instanceof InvalidSwapError) throw swapError
......
...@@ -194,7 +194,7 @@ const Bag = () => { ...@@ -194,7 +194,7 @@ const Bag = () => {
const purchaseAssets = async (routingData: RouteResponse, purchasingWithErc20: boolean) => { const purchaseAssets = async (routingData: RouteResponse, purchasingWithErc20: boolean) => {
if (!provider || !routingData) return if (!provider || !routingData) return
const purchaseResponse = await sendTransaction( const purchaseResponse = await sendTransaction(
provider, provider?.getSigner(),
itemsInBag.filter((item) => item.status !== BagItemStatus.UNAVAILABLE).map((item) => item.asset), itemsInBag.filter((item) => item.status !== BagItemStatus.UNAVAILABLE).map((item) => item.asset),
routingData, routingData,
purchasingWithErc20 purchasingWithErc20
......
...@@ -2,11 +2,9 @@ import { Interface } from '@ethersproject/abi' ...@@ -2,11 +2,9 @@ import { Interface } from '@ethersproject/abi'
import { BigNumber } from '@ethersproject/bignumber' import { BigNumber } from '@ethersproject/bignumber'
import { hexStripZeros } from '@ethersproject/bytes' import { hexStripZeros } from '@ethersproject/bytes'
import { ContractReceipt } from '@ethersproject/contracts' import { ContractReceipt } from '@ethersproject/contracts'
import { JsonRpcProvider } from '@ethersproject/providers' import type { JsonRpcSigner } from '@ethersproject/providers'
import { sendAnalyticsEvent } from '@uniswap/analytics' import { sendAnalyticsEvent } from '@uniswap/analytics'
import { NFTEventName } from '@uniswap/analytics-events' import { NFTEventName } from '@uniswap/analytics-events'
import { sendTransaction } from '@uniswap/conedison/provider/index'
import { NFT_TX_GAS_MARGIN } from 'constants/misc'
import create from 'zustand' import create from 'zustand'
import { devtools } from 'zustand/middleware' import { devtools } from 'zustand/middleware'
...@@ -23,7 +21,7 @@ interface TxState { ...@@ -23,7 +21,7 @@ interface TxState {
clearTxHash: () => void clearTxHash: () => void
purchasedWithErc20: boolean purchasedWithErc20: boolean
sendTransaction: ( sendTransaction: (
provider: JsonRpcProvider, signer: JsonRpcSigner,
selectedAssets: UpdatedGenieAsset[], selectedAssets: UpdatedGenieAsset[],
transactionData: RouteResponse, transactionData: RouteResponse,
purchasedWithErc20: boolean purchasedWithErc20: boolean
...@@ -38,18 +36,21 @@ export const useSendTransaction = create<TxState>()( ...@@ -38,18 +36,21 @@ export const useSendTransaction = create<TxState>()(
purchasedWithErc20: false, purchasedWithErc20: false,
clearTxHash: () => set({ txHash: '' }), clearTxHash: () => set({ txHash: '' }),
setState: (newState) => set(() => ({ state: newState })), setState: (newState) => set(() => ({ state: newState })),
sendTransaction: async (provider, selectedAssets, transactionData, purchasedWithErc20) => { sendTransaction: async (signer, selectedAssets, transactionData, purchasedWithErc20) => {
const address = await provider.getSigner().getAddress() const address = await signer.getAddress()
try { try {
set({ state: TxStateType.Signing }) const txNoGasLimit = {
const tx = {
to: transactionData.to, to: transactionData.to,
value: transactionData.valueToSend ? BigNumber.from(transactionData.valueToSend) : undefined, value: transactionData.valueToSend ? BigNumber.from(transactionData.valueToSend) : undefined,
data: transactionData.data, data: transactionData.data,
} }
const res = await sendTransaction(provider, tx, NFT_TX_GAS_MARGIN)
const gasLimit = (await signer.estimateGas(txNoGasLimit)).mul(105).div(100)
// tx['gasLimit'] = gasLimit
const tx = { ...txNoGasLimit, gasLimit } // TODO test this works when firing off tx
set({ state: TxStateType.Signing })
const res = await signer.sendTransaction(tx)
set({ state: TxStateType.Confirming }) set({ state: TxStateType.Confirming })
set({ txHash: res.hash }) set({ txHash: res.hash })
set({ purchasedWithErc20 }) set({ purchasedWithErc20 })
......
...@@ -3,7 +3,6 @@ import type { TransactionResponse } from '@ethersproject/providers' ...@@ -3,7 +3,6 @@ import type { TransactionResponse } from '@ethersproject/providers'
import { Trans } from '@lingui/macro' import { Trans } from '@lingui/macro'
import { TraceEvent } from '@uniswap/analytics' import { TraceEvent } from '@uniswap/analytics'
import { BrowserEvent, InterfaceElementName, InterfaceEventName } from '@uniswap/analytics-events' import { BrowserEvent, InterfaceElementName, InterfaceEventName } from '@uniswap/analytics-events'
import { sendTransaction } from '@uniswap/conedison/provider/index'
import { Currency, CurrencyAmount, Percent } from '@uniswap/sdk-core' import { Currency, CurrencyAmount, Percent } from '@uniswap/sdk-core'
import { FeeAmount, NonfungiblePositionManager } from '@uniswap/v3-sdk' import { FeeAmount, NonfungiblePositionManager } from '@uniswap/v3-sdk'
import { useWeb3React } from '@web3-react/core' import { useWeb3React } from '@web3-react/core'
...@@ -38,7 +37,7 @@ import Row, { AutoRow, RowBetween, RowFixed } from '../../components/Row' ...@@ -38,7 +37,7 @@ import Row, { AutoRow, RowBetween, RowFixed } from '../../components/Row'
import { SwitchLocaleLink } from '../../components/SwitchLocaleLink' import { SwitchLocaleLink } from '../../components/SwitchLocaleLink'
import TransactionConfirmationModal, { ConfirmationModalContent } from '../../components/TransactionConfirmationModal' import TransactionConfirmationModal, { ConfirmationModalContent } from '../../components/TransactionConfirmationModal'
import { NONFUNGIBLE_POSITION_MANAGER_ADDRESSES } from '../../constants/addresses' import { NONFUNGIBLE_POSITION_MANAGER_ADDRESSES } from '../../constants/addresses'
import { TX_GAS_MARGIN, ZERO_PERCENT } from '../../constants/misc' import { ZERO_PERCENT } from '../../constants/misc'
import { WRAPPED_NATIVE_CURRENCY } from '../../constants/tokens' import { WRAPPED_NATIVE_CURRENCY } from '../../constants/tokens'
import { useCurrency } from '../../hooks/Tokens' import { useCurrency } from '../../hooks/Tokens'
import { ApprovalState, useApproveCallback } from '../../hooks/useApproveCallback' import { ApprovalState, useApproveCallback } from '../../hooks/useApproveCallback'
...@@ -56,6 +55,7 @@ import { TransactionType } from '../../state/transactions/types' ...@@ -56,6 +55,7 @@ import { TransactionType } from '../../state/transactions/types'
import { useIsExpertMode, useUserSlippageToleranceWithDefault } from '../../state/user/hooks' import { useIsExpertMode, useUserSlippageToleranceWithDefault } from '../../state/user/hooks'
import { ExternalLink, ThemedText } from '../../theme' import { ExternalLink, ThemedText } from '../../theme'
import approveAmountCalldata from '../../utils/approveAmountCalldata' import approveAmountCalldata from '../../utils/approveAmountCalldata'
import { calculateGasMargin } from '../../utils/calculateGasMargin'
import { currencyId } from '../../utils/currencyId' import { currencyId } from '../../utils/currencyId'
import { maxAmountSpend } from '../../utils/maxAmountSpend' import { maxAmountSpend } from '../../utils/maxAmountSpend'
import { Dots } from '../Pool/styleds' import { Dots } from '../Pool/styleds'
...@@ -288,24 +288,36 @@ export default function AddLiquidity() { ...@@ -288,24 +288,36 @@ export default function AddLiquidity() {
setAttemptingTxn(true) setAttemptingTxn(true)
sendTransaction(provider, txn, TX_GAS_MARGIN) provider
.then((response: TransactionResponse) => { .getSigner()
setAttemptingTxn(false) .estimateGas(txn)
addTransaction(response, { .then((estimate) => {
type: TransactionType.ADD_LIQUIDITY_V3_POOL, const newTxn = {
baseCurrencyId: currencyId(baseCurrency), ...txn,
quoteCurrencyId: currencyId(quoteCurrency), gasLimit: calculateGasMargin(estimate),
createPool: Boolean(noLiquidity), }
expectedAmountBaseRaw: parsedAmounts[Field.CURRENCY_A]?.quotient?.toString() ?? '0',
expectedAmountQuoteRaw: parsedAmounts[Field.CURRENCY_B]?.quotient?.toString() ?? '0', return provider
feeAmount: position.pool.fee, .getSigner()
}) .sendTransaction(newTxn)
setTxHash(response.hash) .then((response: TransactionResponse) => {
sendEvent({ setAttemptingTxn(false)
category: 'Liquidity', addTransaction(response, {
action: 'Add', type: TransactionType.ADD_LIQUIDITY_V3_POOL,
label: [currencies[Field.CURRENCY_A]?.symbol, currencies[Field.CURRENCY_B]?.symbol].join('/'), baseCurrencyId: currencyId(baseCurrency),
}) quoteCurrencyId: currencyId(quoteCurrency),
createPool: Boolean(noLiquidity),
expectedAmountBaseRaw: parsedAmounts[Field.CURRENCY_A]?.quotient?.toString() ?? '0',
expectedAmountQuoteRaw: parsedAmounts[Field.CURRENCY_B]?.quotient?.toString() ?? '0',
feeAmount: position.pool.fee,
})
setTxHash(response.hash)
sendEvent({
category: 'Liquidity',
action: 'Add',
label: [currencies[Field.CURRENCY_A]?.symbol, currencies[Field.CURRENCY_B]?.symbol].join('/'),
})
})
}) })
.catch((error) => { .catch((error) => {
console.error('Failed to send transaction', error) console.error('Failed to send transaction', error)
......
...@@ -3,7 +3,6 @@ import type { TransactionResponse } from '@ethersproject/providers' ...@@ -3,7 +3,6 @@ import type { TransactionResponse } from '@ethersproject/providers'
import { Trans } from '@lingui/macro' import { Trans } from '@lingui/macro'
import { Trace } from '@uniswap/analytics' import { Trace } from '@uniswap/analytics'
import { InterfacePageName } from '@uniswap/analytics-events' import { InterfacePageName } from '@uniswap/analytics-events'
import { sendTransaction } from '@uniswap/conedison/provider/index'
import { Currency, CurrencyAmount, Fraction, Percent, Price, Token } from '@uniswap/sdk-core' import { Currency, CurrencyAmount, Fraction, Percent, Price, Token } from '@uniswap/sdk-core'
import { NonfungiblePositionManager, Pool, Position } from '@uniswap/v3-sdk' import { NonfungiblePositionManager, Pool, Position } from '@uniswap/v3-sdk'
import { useWeb3React } from '@web3-react/core' import { useWeb3React } from '@web3-react/core'
...@@ -19,7 +18,6 @@ import { RowBetween, RowFixed } from 'components/Row' ...@@ -19,7 +18,6 @@ import { RowBetween, RowFixed } from 'components/Row'
import { Dots } from 'components/swap/styleds' import { Dots } from 'components/swap/styleds'
import Toggle from 'components/Toggle' import Toggle from 'components/Toggle'
import TransactionConfirmationModal, { ConfirmationModalContent } from 'components/TransactionConfirmationModal' import TransactionConfirmationModal, { ConfirmationModalContent } from 'components/TransactionConfirmationModal'
import { TX_GAS_MARGIN } from 'constants/misc'
import { useToken } from 'hooks/Tokens' import { useToken } from 'hooks/Tokens'
import { useV3NFTPositionManagerContract } from 'hooks/useContract' import { useV3NFTPositionManagerContract } from 'hooks/useContract'
import useIsTickAtLimit from 'hooks/useIsTickAtLimit' import useIsTickAtLimit from 'hooks/useIsTickAtLimit'
...@@ -47,6 +45,7 @@ import RateToggle from '../../components/RateToggle' ...@@ -47,6 +45,7 @@ import RateToggle from '../../components/RateToggle'
import { SwitchLocaleLink } from '../../components/SwitchLocaleLink' import { SwitchLocaleLink } from '../../components/SwitchLocaleLink'
import { usePositionTokenURI } from '../../hooks/usePositionTokenURI' import { usePositionTokenURI } from '../../hooks/usePositionTokenURI'
import { TransactionType } from '../../state/transactions/types' import { TransactionType } from '../../state/transactions/types'
import { calculateGasMargin } from '../../utils/calculateGasMargin'
import { ExplorerDataType, getExplorerLink } from '../../utils/getExplorerLink' import { ExplorerDataType, getExplorerLink } from '../../utils/getExplorerLink'
import { LoadingRows } from './styleds' import { LoadingRows } from './styleds'
...@@ -464,24 +463,36 @@ export function PositionPage() { ...@@ -464,24 +463,36 @@ export function PositionPage() {
value, value,
} }
sendTransaction(provider, txn, TX_GAS_MARGIN) provider
.then((response: TransactionResponse) => { .getSigner()
setCollectMigrationHash(response.hash) .estimateGas(txn)
setCollecting(false) .then((estimate) => {
const newTxn = {
...txn,
gasLimit: calculateGasMargin(estimate),
}
sendEvent({ return provider
category: 'Liquidity', .getSigner()
action: 'CollectV3', .sendTransaction(newTxn)
label: [currency0ForFeeCollectionPurposes.symbol, currency1ForFeeCollectionPurposes.symbol].join('/'), .then((response: TransactionResponse) => {
}) setCollectMigrationHash(response.hash)
setCollecting(false)
addTransaction(response, {
type: TransactionType.COLLECT_FEES, sendEvent({
currencyId0: currencyId(currency0ForFeeCollectionPurposes), category: 'Liquidity',
currencyId1: currencyId(currency1ForFeeCollectionPurposes), action: 'CollectV3',
expectedCurrencyOwed0: CurrencyAmount.fromRawAmount(currency0ForFeeCollectionPurposes, 0).toExact(), label: [currency0ForFeeCollectionPurposes.symbol, currency1ForFeeCollectionPurposes.symbol].join('/'),
expectedCurrencyOwed1: CurrencyAmount.fromRawAmount(currency1ForFeeCollectionPurposes, 0).toExact(), })
})
addTransaction(response, {
type: TransactionType.COLLECT_FEES,
currencyId0: currencyId(currency0ForFeeCollectionPurposes),
currencyId1: currencyId(currency1ForFeeCollectionPurposes),
expectedCurrencyOwed0: CurrencyAmount.fromRawAmount(currency0ForFeeCollectionPurposes, 0).toExact(),
expectedCurrencyOwed1: CurrencyAmount.fromRawAmount(currency1ForFeeCollectionPurposes, 0).toExact(),
})
})
}) })
.catch((error) => { .catch((error) => {
setCollecting(false) setCollecting(false)
......
import { BigNumber } from '@ethersproject/bignumber' import { BigNumber } from '@ethersproject/bignumber'
import type { TransactionResponse } from '@ethersproject/providers' import type { TransactionResponse } from '@ethersproject/providers'
import { Trans } from '@lingui/macro' import { Trans } from '@lingui/macro'
import { sendTransaction } from '@uniswap/conedison/provider/index'
import { CurrencyAmount, Percent } from '@uniswap/sdk-core' import { CurrencyAmount, Percent } from '@uniswap/sdk-core'
import { NonfungiblePositionManager } from '@uniswap/v3-sdk' import { NonfungiblePositionManager } from '@uniswap/v3-sdk'
import { useWeb3React } from '@web3-react/core' import { useWeb3React } from '@web3-react/core'
...@@ -19,7 +18,6 @@ import { AddRemoveTabs } from 'components/NavigationTabs' ...@@ -19,7 +18,6 @@ import { AddRemoveTabs } from 'components/NavigationTabs'
import { AutoRow, RowBetween, RowFixed } from 'components/Row' import { AutoRow, RowBetween, RowFixed } from 'components/Row'
import Slider from 'components/Slider' import Slider from 'components/Slider'
import Toggle from 'components/Toggle' import Toggle from 'components/Toggle'
import { TX_GAS_MARGIN } from 'constants/misc'
import { useV3NFTPositionManagerContract } from 'hooks/useContract' import { useV3NFTPositionManagerContract } from 'hooks/useContract'
import useDebouncedChangeHandler from 'hooks/useDebouncedChangeHandler' import useDebouncedChangeHandler from 'hooks/useDebouncedChangeHandler'
import useTransactionDeadline from 'hooks/useTransactionDeadline' import useTransactionDeadline from 'hooks/useTransactionDeadline'
...@@ -37,6 +35,7 @@ import { ThemedText } from 'theme' ...@@ -37,6 +35,7 @@ import { ThemedText } from 'theme'
import TransactionConfirmationModal, { ConfirmationModalContent } from '../../components/TransactionConfirmationModal' import TransactionConfirmationModal, { ConfirmationModalContent } from '../../components/TransactionConfirmationModal'
import { WRAPPED_NATIVE_CURRENCY } from '../../constants/tokens' import { WRAPPED_NATIVE_CURRENCY } from '../../constants/tokens'
import { TransactionType } from '../../state/transactions/types' import { TransactionType } from '../../state/transactions/types'
import { calculateGasMargin } from '../../utils/calculateGasMargin'
import { currencyId } from '../../utils/currencyId' import { currencyId } from '../../utils/currencyId'
import AppBody from '../AppBody' import AppBody from '../AppBody'
import { ResponsiveHeaderText, SmallMaxButton, Wrapper } from './styled' import { ResponsiveHeaderText, SmallMaxButton, Wrapper } from './styled'
...@@ -134,22 +133,34 @@ function Remove({ tokenId }: { tokenId: BigNumber }) { ...@@ -134,22 +133,34 @@ function Remove({ tokenId }: { tokenId: BigNumber }) {
value, value,
} }
sendTransaction(provider, txn, TX_GAS_MARGIN) provider
.then((response: TransactionResponse) => { .getSigner()
sendEvent({ .estimateGas(txn)
category: 'Liquidity', .then((estimate) => {
action: 'RemoveV3', const newTxn = {
label: [liquidityValue0.currency.symbol, liquidityValue1.currency.symbol].join('/'), ...txn,
}) gasLimit: calculateGasMargin(estimate),
setTxnHash(response.hash) }
setAttemptingTxn(false)
addTransaction(response, { return provider
type: TransactionType.REMOVE_LIQUIDITY_V3, .getSigner()
baseCurrencyId: currencyId(liquidityValue0.currency), .sendTransaction(newTxn)
quoteCurrencyId: currencyId(liquidityValue1.currency), .then((response: TransactionResponse) => {
expectedAmountBaseRaw: liquidityValue0.quotient.toString(), sendEvent({
expectedAmountQuoteRaw: liquidityValue1.quotient.toString(), category: 'Liquidity',
}) action: 'RemoveV3',
label: [liquidityValue0.currency.symbol, liquidityValue1.currency.symbol].join('/'),
})
setTxnHash(response.hash)
setAttemptingTxn(false)
addTransaction(response, {
type: TransactionType.REMOVE_LIQUIDITY_V3,
baseCurrencyId: currencyId(liquidityValue0.currency),
quoteCurrencyId: currencyId(liquidityValue1.currency),
expectedAmountBaseRaw: liquidityValue0.quotient.toString(),
expectedAmountQuoteRaw: liquidityValue1.quotient.toString(),
})
})
}) })
.catch((error) => { .catch((error) => {
setAttemptingTxn(false) setAttemptingTxn(false)
......
import { BigNumber } from '@ethersproject/bignumber' import { BigNumber } from '@ethersproject/bignumber'
import { TX_GAS_MARGIN } from 'constants/misc'
/** /**
* Returns the gas value plus a margin for unexpected or variable gas costs * Returns the gas value plus a margin for unexpected or variable gas costs
* @param value the gas value to pad * @param value the gas value to pad
*/ */
export function calculateGasMargin(value: BigNumber): BigNumber { export function calculateGasMargin(value: BigNumber): BigNumber {
return value.add(value.mul(Math.floor(TX_GAS_MARGIN * 100)).div(100)) return value.mul(120).div(100)
} }
...@@ -5003,10 +5003,10 @@ ...@@ -5003,10 +5003,10 @@
react "^18.2.0" react "^18.2.0"
react-dom "^18.2.0" react-dom "^18.2.0"
"@uniswap/conedison@^1.3.0", "@uniswap/conedison@^1.5.1": "@uniswap/conedison@^1.3.0", "@uniswap/conedison@^1.4.0":
version "1.5.1" version "1.4.0"
resolved "https://registry.yarnpkg.com/@uniswap/conedison/-/conedison-1.5.1.tgz#91527cc9928ce0187f30a5eb4abb705b8f0cd013" resolved "https://registry.yarnpkg.com/@uniswap/conedison/-/conedison-1.4.0.tgz#44ad96333b92913a57be34bf5effcfee6534cba1"
integrity sha512-VJqUW4l54QVj5a4vAzAlWWd193iCcT8HMugFPB28S2Uqhs2elAg/RDQmiPOf9TOFB635MdBlD0S6xUuqo7FB4A== integrity sha512-ZZMfPTjUiYpLvO0SuMPGNzkFrRpzf+bQYSL/CzaYKGSVdorRUj4XpeMdjlbuKUtHqUEunOWE8eDL3J1Hl4HOUg==
"@uniswap/default-token-list@^2.0.0": "@uniswap/default-token-list@^2.0.0":
version "2.2.0" version "2.2.0"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment