1
1
import { useEffect , useState } from 'react'
2
2
import BigNumber from 'bignumber.js'
3
3
import { useWallet } from 'use-wallet'
4
- import { provider } from 'web3-core'
5
4
import { Contract } from 'web3-eth-contract'
6
5
import useSushi from './useSushi'
7
6
import { getAllowance } from '../utils/erc20'
@@ -10,7 +9,7 @@ import { getLotteryContract } from '../sushi/lotteryUtils'
10
9
11
10
const useAllowance = ( lpContract : Contract ) => {
12
11
const [ allowance , setAllowance ] = useState ( new BigNumber ( 0 ) )
13
- const { account } : { account : string ; ethereum : provider } = useWallet ( )
12
+ const { account } : { account : string } = useWallet ( )
14
13
const sushi = useSushi ( )
15
14
const masterChefContract = getMasterChefContract ( sushi )
16
15
@@ -32,7 +31,7 @@ const useAllowance = (lpContract: Contract) => {
32
31
33
32
export const useSousAllowance = ( lpContract : Contract , sousId ) => {
34
33
const [ allowance , setAllowance ] = useState ( new BigNumber ( 0 ) )
35
- const { account } : { account : string ; ethereum : provider } = useWallet ( )
34
+ const { account } : { account : string } = useWallet ( )
36
35
const sushi = useSushi ( )
37
36
const sousChefContract = getSousChefContract ( sushi , sousId )
38
37
@@ -54,7 +53,7 @@ export const useSousAllowance = (lpContract: Contract, sousId) => {
54
53
55
54
export const useLotteryAllowance = ( ) => {
56
55
const [ allowance , setAllowance ] = useState ( new BigNumber ( 0 ) )
57
- const { account } : { account : string ; ethereum : provider } = useWallet ( )
56
+ const { account } : { account : string } = useWallet ( )
58
57
const sushi = useSushi ( )
59
58
const lotteryContract = getLotteryContract ( sushi )
60
59
const cakeContract = getSushiContract ( sushi )
0 commit comments