Skip to content

Commit 2ac4c4b

Browse files
committed
update handleSetMax function to account txn fees
1 parent 637377c commit 2ac4c4b

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)