File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ const StyledAddressButton = styled.div`
59
59
text-decoration: none;
60
60
background: black;
61
61
color: grey;
62
- margin-bottom: 0.2em ;
62
+ margin-bottom: 0em ;
63
63
&:hover {
64
64
color: ${ ( props ) => props . theme . color . white } ;
65
65
}
Original file line number Diff line number Diff line change 1
1
import { useCallback } from 'react'
2
2
import { useWeb3React } from '@web3-react/core'
3
3
import { Operation } from '@/constants/index'
4
- import ethers from 'ethers'
4
+ import ethers , { BigNumber } from 'ethers'
5
5
import ERC20 from '@primitivefi/contracts/artifacts/ERC20.json'
6
6
import { parseEther , formatEther , parseUnits } from 'ethers/lib/utils'
7
7
@@ -28,7 +28,7 @@ const approve = async (
28
28
const erc20 = new ethers . Contract ( tokenAddress , ERC20 . abi , signer )
29
29
tx = await erc20 . approve (
30
30
spender ,
31
- parseUnits ( amount . toString ( ) ) . toString ( )
31
+ BigNumber . from ( parseUnits ( amount ) ) . mul ( BigNumber . from ( '2' ) ) . toString ( )
32
32
) // 0 gwei approval
33
33
} else throw 'Approval Error'
34
34
return tx
You can’t perform that action at this time.
0 commit comments