Skip to content

Commit

Permalink
chore: negative bigint error
Browse files Browse the repository at this point in the history
  • Loading branch information
filoozom committed Oct 2, 2023
1 parent 0c0ad66 commit d74be21
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/Form/Form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ const Form: React.FC = () => {
abi: VaultAdapter,
functionName: "depositXDAI",
args: [receiver],
value: bigIntMin(amount, (tokenInput?.max ?? 0n) - GAS_PRICE_OFFSET),
value: bigIntMin(amount, tokenInput?.max ? tokenInput?.max - GAS_PRICE_OFFSET : 0n),
enabled: action.action === Actions.DepositXDAI,
}).config,
);
Expand Down

0 comments on commit d74be21

Please sign in to comment.