We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 066e740 commit b12bcb9Copy full SHA for b12bcb9
dapp-oeth/src/hooks/useCurrencySwapper.js
@@ -16,7 +16,7 @@ import {
16
import { useWeb3React } from '@web3-react/core'
17
import addresses from 'constants/contractAddresses'
18
import curveRoutes from 'constants/curveRoutes'
19
-
+import { get } from 'lodash'
20
import { calculateSwapAmounts } from 'utils/math'
21
22
const useCurrencySwapper = ({
@@ -140,7 +140,7 @@ const useCurrencySwapper = ({
140
}
141
142
const allowance = parseFloat(
143
- allowances[coinNeedingApproval][allowanceCheckKey]
+ get(allowances, 'coinNeedingApproval[allowanceCheckKey]')
144
)
145
146
setNeedsApproval(
0 commit comments