Skip to content

Commit 9cced64

Browse files
Merge pull request #83 from growindiedev/inc/dec-gasfee
update handleSetMax function to account txn fees
2 parents 637377c + 2ac4c4b commit 9cced64

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

components/WrapperForm.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ const WrapperForm: React.FC<WrapperFormProps> = ({ action }) => {
5656
const { writeWithdraw } = useWithdraw(watch('amount'));
5757

5858
const handleSetMax: any = (): void => {
59-
const eth = +ethBalance;
59+
const eth = +ethBalance - +txFeeEther;
6060
const weth = +wethBalance;
6161
setValue(
6262
'amount',

0 commit comments

Comments
 (0)